Reserve Index DTFs
Pricing
Pricing of Index DTFs
NAV
The Price of a DTF is based on a NAV (Net Asset Value) calculation.
Given a DTF with a basket of n
tokens, each with a spot price p
, we can calculate the price as:
Onchain Pricing
The toAssets()
function is used to convert a DTF share to its underlying assets. It will return the one:many exchange rate of the DTF.
function toAssets(uint256 shares, Math.Rounding rounding) returns (address[] memory _assets, uint256[] memory _amounts);
Solidity Code: Folio.toAssets()
Inputs
shares
Amount of shares to quoterounding
enum, one of:- [0] Floor (Toward negative infinity)
- [1] Ceil (Toward positive infinity)
- [2] Trunc (Toward zero)
- [3] Expand (Away from zero)
Outputs
_assets
Array of assets in the quote_amounts
Array of amounts of assets in the quote
Pricing API
Info about the pricing API here