> For the complete documentation index, see [llms.txt](https://nitro-finance.gitbook.io/ftl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nitro-finance.gitbook.io/ftl/core-interactions/repaying.md).

# Repaying

The repayment process involves the return of the borrowed asset and the corresponding release of the collateral asset. The protocol checks the debt NFT associated with the debt and retrieves the following information:

* **ID**: The unique identifier for the debt NFT
* **Collateral Size**: The amount of collateral provided during borrowing.
* **Borrow Price**: The price at which the asset was borrowed
* **Borrow Type**: Indicates whether the borrowing occurred above or below the active market price.

### Example 1: Repaying Debt Borrowed Below Market Price

* The contract checks the debt NFT data which includes:
  * ID: 12345
  * Collateral Value: 1 NAD
  * Borrow Price: 1000 USDC
* Repay Fee: 0.03% as an example&#x20;
* To Repay: 1000.3 USDC = $$(\text {collateral size} \times \text {borrow price})+\text{repay fee}$$

### Example 2: Repaying Debt Borrowed Above the Market Price

* The contract checks the debt NFT data which includes:
  * ID: 67890
  * Collateral size: 1000 USDC
  * Borrow Price: 2250 USDC
* Repay Fee: 0.11% as an example
* To Repay: 0.449 NAD =$$(\dfrac {\text{collateral size}} {\text{borrow price}})+\text{repay fee}$$

{% hint style="success" %}
Repayment is restricted for debts that are either  [<mark style="color:purple;">blacklisted or inactive</mark>](/ftl/core-interactions/debt-recovery.md):

* **Blacklisted Debts**: Expired debts absorbed into the protocol and no longer repayable.
* **Inactive Debts**: Temporarily locked due to price crossover with the active market price
  {% endhint %}

### REPAY ARCHITECTURE

<figure><img src="/files/jLzWhax01SHkR2rvbpsE" alt=""><figcaption></figcaption></figure>
