> For the complete documentation index, see [llms.txt](https://docs.reserve.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.reserve.org/core-components/index-dtfs/pricing.md).

# Pricing

### NAV <a href="#nav" id="nav"></a>

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 DTF's price as:

<figure><img src="/files/H8BteWAMQLdwUo0mfLB5" alt="" width="268"><figcaption></figcaption></figure>

### Onchain pricing <a href="#onchain-pricing" id="onchain-pricing"></a>

The `toAssets()` function is used to convert a DTF share to its underlying assets. It will return the one-to-many exchange rate of the DTF.

```
function toAssets(uint256 shares, Math.Rounding rounding) returns (address[] memory _assets, uint256[] memory _amounts);
```

Solidity Code: [Folio.toAssets()](https://github.com/reserve-protocol/reserve-index-dtf/blob/main/contracts/Folio.sol#L311)

#### Inputs <a href="#inputs" id="inputs"></a>

* `shares` Number of DTF shares to quote
* `rounding` Rounding method for output values (enum). One of:
  * \[0] Floor (Toward negative infinity)
  * \[1] Ceil (Toward positive infinity)
  * \[2] Trunc (Toward zero)
  * \[3] Expand (Away from zero)

#### Outputs <a href="#outputs" id="outputs"></a>

* `_assets` Array of addresses for each asset in the quote
* `_amounts` Array of amounts of each asset in the quote


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.reserve.org/core-components/index-dtfs/pricing.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
