Reserve Index DTFs

Minting & Redeeming

Minting and redeeming of Index DTFs

Minting & Redeeming

DTFs are always instantly mintable with and redeemable for a pro-rata share of their underlying assets. The mint() and redeem() functions can be called by anyone at anytime.

Minting

function mint(uint256 shares, address receiver, uint256 minSharesOut) returns (address[] memory _assets, uint256[] memory _amounts);

Solidity Code: Folio.mint()

Be sure to approve each asset to the DTF before minting.

Inputs

  • shares Amount of shares to mint
  • receiver The address to receive the minted shares
  • minSharesOut Minimum amount of shares the caller must receive after fees

Outputs

  • _assets Array of assets sent to the DTF in order to mint it
  • _amounts Array of amounts of the assets used to mint the DTF

Redeeming

function redeem(uint256 shares, address receiver, address[] calldata assets, uint256[] calldata minAmountsOut) returns (uint256[] memory _amounts);

Solidity Code: Folio.redeem()

Inputs

  • shares Amount of shares to redeem
  • receiver The address to receive the redeemed assets
  • assets Assets to receive, must match basket exactly
  • minAmountsOut Minimum amounts of each asset to receive

Outputs

  • _amounts Actual amounts transferred of each asset

Zapper

In order to make life easier for users, ABC Labs provides use of a Zapper via the Register UI. Users can zap from a single token into a DTF, and vice a versa. The Zapper will route the input token through DeFi and into the DTF. The Zapper will also intelligently choose to purhcase the DTF directly from the market if it is more efficient than collecting the underlying.

When minting via the Zapper, due to the volatile nature of DEXs, it is common to receive dust amounts of certain tokens. Generally, the amount of dust is on the order of 1-10bps of the input value.