# 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>


---

# 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://nitro-finance.gitbook.io/ftl/core-interactions/repaying.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.
