Index Cooperative Launch App
Index Coop News

Leverage Token Guide for Programmatic Issuance and Redemption

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

3/15/2024

Index Coop

Index Coop

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

Dive deeper

Watch, read, and learn everything you need to master our leverage tokens.

Subscribe to our newsletter

Join over 6,000 subscribers in receiving weekly updates about our products, DeFi, and the onchain structured products space.

FAQs