Index Coop Resource Center
  • Welcome to The Index Coop.
  • Products
    • Trade
      • Index Coop Leverage Suite
      • Leverage Token Parameters
      • Leverage Token Keepers
      • Trading Interface Guide
      • Ripcord Guide
    • Earn
      • High Yield ETH Index (hyETH)
      • Interest Compounding ETH Index (icETH)
    • Asset Management
      • Product Development Process
      • Product Revenue Tokens (PRTs)
    • Legacy Products
      • How to Redeem Legacy Products
      • DeFi Pulse Index (DPI)
      • Bankless BED Index (BED)
      • Metaverse Index (MVI)
      • Diversified Staked ETH Index (dsETH)
      • Index Coop CoinDesk ETH Trend Index (cdETI)
      • Index Coop Large Cap Index (ic21)
      • ETH 2x Flexible Leverage Index (ETH2x-FLI)
      • BTC 2x Flexible Leverage Index (BTC2x-FLI)
      • Flexible Leverage Index- Polygon (FLI-Ps)
        • ETH 2x Flexible Leverage Index (ETH2x-FLI-P)
        • Inverse ETH Flexible Leverage Index (iETH-FLI-P)
        • BTC 2x Flexible Leverage Index (BTC2x-FLI-P)
        • Inverse BTC Flexible Leverage Index (iBTC-FLI-P)
        • MATIC 2x Flexible Leverage Index (MATIC2x-FLI-P)
        • Inverse MATIC Flexible Leverage Index (iMATIC-FLI-P)
      • Market Neutral Yield ETH (MNYe)
      • Bankless DeFi Innovation Index (GMI)
      • Data Economy Index (DATA)
      • Legacy Contract Addresses
      • Gitcoin Staked ETH Index (gtcETH)
  • Protocol
    • Index Protocol
      • Core Contracts
        • Set Token
        • Set Token Creator
        • Controller
        • Integration Registry
        • Price Oracle
        • Set Valuer
      • Modules
        • Basic Issuance Module
        • Debt Issuance Module v2
        • NAV Issuance Module
        • Trade Module
        • Streaming Fee Module
        • Wrap Module
        • Airdrop Module
        • Claim Module
        • Governance Module
        • Compound Leverage Module
        • Aave v2 Leverage Module
        • Aave v3 Leverage Module
        • Auction Rebalance Module
    • Set Protocol v2
    • Security and Audits
    • Contract Verification
    • Programmatic Redemptions
  • Resources
    • Governance
      • $INDEX - Governance Token
      • Index Improvement Proposals (IIP) Overview
        • IIP Step-by-Step
        • Governance Representatives
        • IIP Template
        • Product (DG) Template
      • Meta-Governance
      • Delegation
    • Data & Analytics
    • Multisigs
    • Press Kit
Powered by GitBook
On this page
  • Step 1: Identify the Correct Contracts
  • Step 2: Find the uint256 Value of Your Tokens
  • Step 3: Approve the Issuance Module to Spend Tokens
  • Step 4: Redeem Your Product Tokens
  • Questions?
  1. Protocol

Programmatic Redemptions

a step-by-step guide for redeeming Index Coop products at the smart contract level

PreviousContract VerificationNextGovernance

Last updated 3 months ago

All Index Coop products can be permissionlessly redeemed for their underlying assets at any time. In the absence of app or front-end support, this can be accomplished by interacting directly with the product's issuance module on the chain where it is natively deployed. This guide will provide a step-by-step walkthrough for programmatic redemptions using Etherscan.

Please note that this guide is limited to non-leverage tokens. products are more complex to redeem because of the associated debt positions; a separate guide for leverage token redemptions will be published as soon as it is available.


Step 1: Identify the Correct Contracts

Each product is represented by a unique token contract, which can be found in the table below. Different products utilize different issuance modules, so the primary issuance module contract for each product is listed in the table below too.

Start by identifying the product you want to redeem and matching it with the relevant issuance module; you'll need both addresses for subsequent steps.

For this example, we will redeem dsETH (0x341c05c0E9b33C0E38d64de76516b2Ce970bB3BE) using the Debt Issuance Module v2_1 (0x04b59F9F09750C044D7CfbC177561E409085f0f3) on Index Protocol V1.

Product
Protocol
Token Contract
Issuance Module Contract

Step 2: Find the uint256 Value of Your Tokens

Next, go to your product's token contract on Etherscan and navigate to the Contract > Read Contract tab. Select the balanceOf function and paste in the wallet address that holds your tokens. After hitting the Query button, save the uint256 value that it returns.

See the example for dsETH below, with a uint256 value of 47910320749244497.

Make sure to copy your uint256 value and/or leave the Etherscan tab open - you'll need it for the next step!


Step 3: Approve the Issuance Module to Spend Tokens

Next, you must allow the issuance module to "spend" your product tokens in exchange for the underlying components.

Go to the product token page on Etherscan and navigate to the Contract > Write Contract tab. Select the approve function and carefully paste in the corresponding values...

See the dsETH example below:

If you haven't already, connect the wallet that holds your product tokens to Etherscan. This will allow you to "write" to the contract and grant the issuance module permission to spend your tokens.

After double-checking your inputs and confirming your wallet is connected, click the Write button; this should trigger a transaction in the connected wallet. Carefully review the transaction before signing, and note that this approval transaction will cost gas.


Step 4: Redeem Your Product Tokens

Finally, you can redeem your product tokens for the underlying components by interacting directly with the issuance module contract.

Go to the relevant issuance module contract on Etherscan and navigate to the Contract > Write Contract tab. Connect the wallet that holds your product tokens, then select the redeem function. Carefully paste in the corresponding values collected during previous steps...

  • _to = the address that should receive the underlying components (i.e. your wallet)

See an example for dsETH below:

After double-checking your inputs and confirming your wallet is connected, click the Write button; this should trigger a transaction in the connected wallet. Carefully review the transaction before signing, and note that this approval transaction will cost more gas than the previous approval step.

Once you have executed this transaction, the product tokens will be burned and the underlying components will be sent to your wallet (or to a different _to address that you provided).

And that's it! You have successfully redeemed your product for the underlying components.


Questions?

spender = the relevant issuance module contract address (from )

amount = the uint256 value representing your wallet balance (from )

A for dsETH can be seen below:

_setToken = the product's token contract address (from )

_quantity = the uint256 value that represents your wallet balance (from )

A for dsETH can be found below:

Drop into the - this is the fastest way to have a real person answer any questions you have!

Leverage
successful approval transaction
successful redemption transaction
Index Coop Discord Server
Step 1
Step 2
Step 1
Step 2
DPI
Set V2
0x1494CA1F11D487c2bBe4543E90080AeBa4BA3C2b
0xd8EF3cACe8b4907117a45B0b125c68560532F94D
MVI
Set V2
0x72e364F2ABdC788b7E918bc238B21f109Cd634D7
0xd8EF3cACe8b4907117a45B0b125c68560532F94D
BED
Set V2
0x2aF1dF3AB0ab157e1E2Ad8F88A7D04fbea0c7dc6
0xd8EF3cACe8b4907117a45B0b125c68560532F94D
ic21
Index V1
0x1B5E16C5b20Fb5EE87C61fE9Afe735Cca3B21A65
0x04b59F9F09750C044D7CfbC177561E409085f0f3
DATA
Set V2
0x33d63Ba1E57E54779F7dDAeaA7109349344cf5F1
0xd8EF3cACe8b4907117a45B0b125c68560532F94D
GMI
Set V2
0x47110d43175f7f2C2425E7d15792acC5817EB44f
0x39F024d621367C044BacE2bf0Fb15Fb3612eCB92
hyETH
Index V1
0xc4506022Fb8090774E8A628d5084EED61D9B99Ee
0x04b59F9F09750C044D7CfbC177561E409085f0f3
dsETH
Index V1
0x341c05c0E9b33C0E38d64de76516b2Ce970bB3BE
0x04b59F9F09750C044D7CfbC177561E409085f0f3
gtcETH
Index V1
0x36c833Eed0D376f75D1ff9dFDeE260191336065e
0x04b59F9F09750C044D7CfbC177561E409085f0f3
cdETI
Index V1
0x55b2CFcfe99110C773f00b023560DD9ef6C8A13B
0x04b59F9F09750C044D7CfbC177561E409085f0f3
Before Connecting vs After Connecting