# Redemption of Bonds

### <mark style="color:green;">Before Maturity</mark>

To redeem a bond before maturity, the bondholder will use the Redemption Bonds dApp, which will call the redeem function on the smart contract and specify the number of bonds they wish to redeem. The smart contract will then transfer the face value of the bonds to the bondholder's account and release the required collateral from the collateral pool. The formula for calculating the required collateral to release is:

| requiredCollateral = redeemedBonds \* bondDenomination \* collateralizationRatio |
| -------------------------------------------------------------------------------- |

Where redeemedBonds is the number of bonds being redeemed.

### <mark style="color:green;">At Maturity</mark>

To redeem a bond at maturity, the bondholder can simply hold onto the bond until it reaches maturity. At maturity, the bondholder will call the redeem function on the smart contract and the face value of the bond and Profits earned will be transferred to the bondholder's account.

When a bondholder wants to redeem their bond at maturity, they can simply call the redeem function on the smart contract using dApp. The smart contract will then calculate the face value of the bond and the profits earned based on the bond's denomination and the maturity period. The profit calculation is based on a fixed rate of return for a fixed period. The smart contract uses a formula to calculate the profit based on the face value of the bond, the profit rate, and the maturity period. The formula for calculating profit is:

| Total Transferable Value  = Denomination \* (1 + Profit Rate \* Maturity Period) |
| -------------------------------------------------------------------------------- |

Where:

<mark style="color:green;">**`‘Denomination’`**</mark> is the value of the bond denomination

<mark style="color:green;">**`‘Profit Rate’`**</mark> is the fixed profit rate offered by the Redemption Bonds

<mark style="color:green;">**`‘Maturity Period’`**</mark> is the number of days between the issuance date and maturity date

<br>


---

# Agent Instructions: 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:

```
GET https://docs.redemptiontoken.com/how-to-earn/redemption-bonds/technical-specifications/redemption-of-bonds.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
