> For the complete documentation index, see [llms.txt](https://docs.mellow.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mellow.finance/resources/mellow-lrt-depreciated/modules/tvlmodules/defaultbondtvlmodule.md).

# DefaultBondTvlModule

### Overview

`DefaultBondTvlModule` contract computes the total value locked (TVL) for bond-based assets in a vault.

### Key Features

* **Parameter Management**: Allows the configuration of bonds associated with a vault.
* **TVL Calculation**: Computes the TVL for each bond in the vault, returning detailed data structures.
* **Access Control**: Ensures only authorized admins can modify bond parameters.

### Methods

1. **Parameter Management**
   * `setParams(address, address[])`: Sets bond parameters for a given vault.
     * **vault**: Address of the vault.
     * **bonds**: An array of bond addresses to associate with the vault.
     * **Event**:
       * `DefaultBondTvlModuleSetParams(address, address[])`: Emitted after bond parameters are set for a vault.
         * **vault**: Address of the vault.
         * **bonds**: Array of bond addresses.
2. **TVL Calculation**
   * `tvl(address)`: Computes the total value locked for all bonds in the vault.
     * **vault**: Address of the vault.
     * **Returns**: An array of `Data` structures with the following details:
       * **token**: Address of the bond.
       * **underlyingToken**: Address of the asset used by the bond.
       * **amount**: Balance of the bond in the vault.
       * **underlyingAmount**: Identical to `amount`.


---

# 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.mellow.finance/resources/mellow-lrt-depreciated/modules/tvlmodules/defaultbondtvlmodule.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.
