> For the complete documentation index, see [llms.txt](https://docs.prl.one/buttonwood/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.prl.one/buttonwood/developers/tranche/tranche.md).

# Tranche

ERC20 token to represent a single tranche for a ButtonTranche bond

## API Documentation

## `constructor()` (public)

Constructor for Tranche ERC20 token

## `init(string name, string symbol, address admin, address _collateralToken)` (public)

Constructor for Tranche ERC20 token

## `mint(address to, uint256 amount)` (external)

Mint `amount` tokens to `to` Only callable by the owner (bond controller). Used to manage bonds, specifically creating tokens upon deposit

## `burn(address from, uint256 amount)` (external)

Burn `amount` tokens from `from`'s balance Only callable by the owner (bond controller). Used to manage bonds, specifically burning tokens upon redemption

## `redeem(address from, address to, uint256 amount)` (external)

Burn `amount` tokens from `from` and return the proportional value of the collateral token to `to`

## `decimals() → uint8` (public)

Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`).

Uses the same number of decimals as the collateral token

NOTE: This information is only used for *display* purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.


---

# 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.prl.one/buttonwood/developers/tranche/tranche.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.
