Debt Issuance

DebtIssuanceModuleV2.sol

Module that enables users to issue and redeem SetTokens that contain default and all external positions, including debt positions.

issue

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.

function issue(ISetToken _setToken, uint256 _quantity, address _to)
  • _setToken Address of the SetToken instance

  • _quantity Quantity of the SetToken to mint

  • _to Address to mint SetToken to

redeem

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.

function redeem( ISetToken _setToken, uint256 _quantity,address _to)
  • _setToken Instance of the SetToken

  • _quantity Quantity of the SetToken to redeem

  • _to Address to redeem components to

initialize

This function can only be called by the manager of SetToken. It initializes this module to the SetToken with issuance-related hooks.

function initialize(ISetToken _setToken, uint256 _maxManagerFee, uint256 _managerIssueFee, uint256 _managerRedeemFee, address _feeRecipient, IManagerIssuanceHook _managerIssuanceHook)
  • _setToken Address of the SetToken instance

  • _maxManagerFee Max manager fee

  • _mangerIssueFee Issuance fee

  • _managerRedeemFee Redemption fee

  • _feeRecipient Fee recipient address

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

getRequiredComponentIssuanceUnits()

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

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

Parameters:

  • _setToken Address of SetToken instance

  • _quantity Quantity of the SetToken to issue

Returns:

  • componentAddresses Array of component addresses making up the Set

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

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

getRequiredComponentRedemptionUnits()

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

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

Parameters: Same as getRequiredComponentIssuanceUnits()

Returns: Same as getRequiredComponentIssuanceUnits()

Last updated