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
  • Select Methods
  • issue()
  • redeem()
  • initialize()
  • Select View Methods
  • getRequiredComponentIssuanceUnits()
  • getRequiredComponentRedemptionUnits()
  1. Protocol
  2. Index Protocol
  3. Modules

Debt Issuance Module v2

PreviousBasic Issuance ModuleNextNAV Issuance Module

Last updated 1 year ago

The DebtIssuanceModuleV2 module () is a smart contract that enables users to issue and redeem that contain default and all external positions, including debt positions. Module hooks are added to allow for syncing of positions, and component-level hooks are added to ensure positions are replicated correctly. The manager can define arbitrary issuance logic in the manager hook, as well as specify issue and redeem fees.

Select Methods

issue()

function issue(ISetToken _setToken, uint256 _quantity, address _to)‌

Deposits components to the SetToken, replicates any external module component positions, and mints the SetToken. If the token has a debt position all collateral will be transferred in first then debt will be returned to the minting address. If specified, a fee will be charged on issuance.

NOTE: Overrides DebtIssuanceModule#issue external function and adds under-collateralization checks in place of the previous default strict balances checks. The under-collateralization checks are implemented in IssuanceValidationUtils library and they revert upon under-collateralization of the SetToken post-component transfer.

Parameter Name

Type

Description

_setToken

ISetToken

Instance of the SetToken

_quantity

uint256

Quantity of the SetToken to mint

_to

address

Address to mint SetToken to

redeem()

function redeem( ISetToken _setToken, uint256 _quantity,address _to)‌

Returns components from the SetToken, unwinds any external module component positions and burns the SetToken. If the token has debt positions, the module transfers in the required debt amounts from the caller and uses those funds to repay the debts on behalf of the SetToken. All debt will be paid down first then equity positions will be returned to the minting address. If specified, a fee will be charged on redeem.

NOTE: Overrides DebtIssuanceModule#redeem internal function and adds under-collateralization checks in place of the previous default strict balances checks. The under-collateralization checks are implemented in IssuanceValidationUtils library and they revert upon under-collateralization of the SetToken post-component transfer.

Parameter Name

Type

Description

_setToken

ISetToken

Address of the SetToken

_quantity

uint256

Quantity of the SetToken toredeem

_to

address

Address to redeem components to‌

initialize()

function initialize(ISetToken _setToken, uint256 _maxManagerFee, uint256 _managerIssueFee, uint256 _managerRedeemFee, address _feeRecipient, IManagerIssuanceHook _managerIssuanceHook)‌

Manager only. Initializes this module to the SetToken with issuance-related hooks. Only callable by the SetToken's manager. Hook addresses are optional. Address(0) means that no hook will be called

Parameter Name

Type

Description

_setToken

ISetToken

Address of the SetToken

_maxManagerFee

uint256

Max manager fee

_managerIssueFee

uint256

Issuance fee

_managerRedeemFee

uint256

Redemption fee

_feeRecipient

address

Fee recipient address

_preIssueHook

IManagerIssuanceHook

Instance of the Manager Contract with the Pre-Issuance Hook function

Select View Methods

getRequiredComponentIssuanceUnits()

function getRequiredComponentIssuanceUnits(ISetToken _setToken, uint256 _quantity) view returns (address[] memory, uint256[] memory, uint256[] memory)‌

Retrieves the addresses and units required to mint a particular quantity of SetToken.

Parameter Name

Type

Description

_setToken

ISetToken

Address of the SetToken

_quantity

uint256

Quantity of the SetToken to issue

Return Name

Type

Description

componentAddresses

address[]

Array of component addresses making up the Set

equityNotional

uint256[]

Array of equity notional amounts of each component, respectively, represented as uint256

debtNotional

uint256[]

Array of debt notional amounts of each component, respectively, represented as uint256

getRequiredComponentRedemptionUnits()

function getRequiredComponentRedemptionUnits(ISetToken _setToken, uint256 _quantity) view returns (address[] memory, uint256[] memory, uint256[] memory)‌

Retrieves the addresses and units required to mint a particular quantity of SetToken.

Parameter Name

Type

Description

_setToken

ISetToken

Address of the SetToken

_quantity

uint256

Quantity of the SetToken to redeem

Return Name

Type

Description

componentAddresses

address[]

Array of component addresses making up the Set

equityNotional

uint256[]

Array of equity notional amounts of each component, respectively, represented as uint256

debtNotional

uint256[]

Array of debt notional amounts of each component, respectively, represented as uint256

Etherscan
SetTokens