All Blog Posts

Leverage Token Guide for Programmatic Issuance and Redemption

Get all the contracts and calls you need for accessing FLIs programmatically.

The legacy FLI tokens have been migrated to the new ETH2x and BTC2x tokens. Under the hood of the FLIs, traditional cToken positions have been exchanged for the new 2x tokens built on Index Protocol. As a result, programmatic redemption of FLIs has changed slightly, and a secondary redemption transaction is required to unwind the nested 2x tokens. This resource outlines the relevant contracts and calls you may need for accessing FLIs programmatically.

Are you a liquidity provider for FLIs? If so, contact us in Discord about potential gas refunds for migrating your liquidity to the new 2x tokens

____________________________________________________________

Redeeming FLI Tokens via Set Debt Issuance Module V2

For context, the legacy FLI tokens have historically used the Set Debt Issuance Module (eth:0x39F024d621367C044BacE2bf0Fb15Fb3612eCB92) for issuance and redemption transactions. However, as a result of the migration, the Set Debt Issuance Module V2 (eth:0x69a592D2129415a4A1d1b1E309C17051B7F28d57) must now be used to redeem or issue FLI tokens. The relevant calls are identical on the V1 and V2 modules.

Token Approvals: you may need to approve FLI tokens for spending on the DIMv2

redeem 100 ETH2x-FLI tokens

redeem 50 BTC2x-FLI tokens

Here are some onchain examples where 674 ETH2x-FLI and 814 BTC2x-FLI were redeemed.

Once you redeem a FLI token, you will receive a new 2x token as the output; this is attributed to the migration, which replaced the previous cToken components with the new 2x tokens. The new 2x tokens have been deployed with an initial price of $100, so the exchange rate between ETH2x-FLI/ETH2x is currently 0.324 and the exchange rate between BTC2x-FLI/BTC2x is 0.257; you can find current exchange rates and broader leverage token data in this Dune dashboard. To completely close the leverage position at this point, you will need to execute another redemption for the new 2x tokens (info below).

____________________________________________________________

Redeeming New 2x Tokens via Index Debt Issuance Module V2_1

To redeem or issue the new 2x tokens, you must use the Index Protocol Debt Issuance Module 2_1 (eth:0x04b59F9F09750C044D7CfbC177561E409085f0f3). This is the most modern version of the Debt Issuance Module deployed for Index Protocol. issue and redeem calls are identical to earlier versions of the module on Set Protocol.

Token Approvals: you may need to approve 2x tokens for spending on the module

redeem ETH2x (example: 100 tokens)

redeem BTC2x (example: 50 tokens)

Because these 2x tokens have open debt positions in Aave V3, the module will transfer in the required debt amounts from the caller and use those funds to repay the debt on behalf of the SetToken. All debt is paid down first, then equity positions are returned to the specified address. There is a 0.10% redemption fee on the new 2x tokens.

____________________________________________________________

Issuing New 2x Tokens via Index Debt Issuance Module V2_1

Token Approvals: you may need to approve aToken components for spending on the DIMv2_1

issue ETH2x (example: 100 tokens)

issue BTC2x (example: 50 tokens)

Because the new 2x tokens include open debt positions, all collateral will be transferred in first then debt will be returned to the minting address. There is also a 0.10% issuance fee on the new 2x tokens.

____________________________________________________________

Redemptions are also supported via the Index Coop App, with a separate guide for “Unwrapping FLIs” available here. The Flash Mint SDK is also available for minting and redeeming the new 2x tokens using ETH or ERC20s, abstracting away the complexity of the debt positions.

Are you a liquidity provider for FLIs? If so, contact us in Discord about potential gas refunds for migrating your liquidity to the new 2x tokens

Disclaimer: This content is for informational purposes only and is not legal, tax, investment, financial, or other advice. You should not take, or refrain from taking, any action based on any information contained herein, or any other information that we make available at any time, including blog posts, data, articles, links to third-party content, discord content, news feeds, tutorials, tweets, and videos. Before you make any financial, legal, technical, or other decisions, you should seek independent professional advice from a licensed and qualified individual in the area for which such advice would be appropriate. This information is not intended to be comprehensive or address all aspects of Index or its products. There is additional documentation on Index’s website about the functioning of Index Coop, and its ecosystem and community.

You shall not purchase or otherwise acquire our restricted token products if you are: a citizen, resident (tax or otherwise), and/or green card holder, incorporated in, owned or controlled by a person or entity in, located in, or have a registered office or principal place of business in the U.S. (defined as a U.S. person), or if you are a person in any jurisdiction in which such offer, sale, and/or purchase of any of our token products is unlawful, prohibited, or unauthorized (together with U.S. persons, a “Restricted Person”).  The term “Restricted Person” includes, but is not limited to, any natural person residing in, or any firm, company, partnership, trust, corporation, entity, government, state or agency of a state, or any other incorporated or unincorporated body or association, association or partnership (whether or not having separate legal personality) that is established and/or lawfully existing under the laws of, a jurisdiction in which such offer, sale, and/or purchase of any of our token products is unlawful, prohibited, or unauthorized).

Recent Posts