> For the complete documentation index, see [llms.txt](https://nukemloans.gitbook.io/nukemloans/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nukemloans.gitbook.io/nukemloans/nukem-loans-beta-dapp/repay.md).

# Repay

Repay a loan and close a borrowing position.

Users can check all their open borrowing/collateral/leverage positions in NUKEM LOANS interface > POSITIONS:

<figure><img src="https://2037880979-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTz1DtBGUcpuhpSKPaTV0%2Fuploads%2FqjrstSFWC0e7zGLb6VPT%2Fgerhwhwthwhjt.png?alt=media&amp;token=e8c234c8-079c-4bb4-a867-b54fbf267de3" alt=""><figcaption><p>Positions section</p></figcaption></figure>

After clicking on POSITIONS the following interface is presented:

<figure><img src="https://2037880979-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTz1DtBGUcpuhpSKPaTV0%2Fuploads%2FUrWbWP9BFqx4SverGzC8%2Ffaegwhwegw.png?alt=media&amp;token=a1a522a5-0181-43c0-8a3d-4cc2956bd8e3" alt=""><figcaption><p>Your open LOAN positions will be shown here</p></figcaption></figure>

* **Collateral** - The value of assets used as collateral.
* **Debt** - The outstanding debt amount. This metric increases over time as the position remains open.
* **Daily Interest** - The current daily interest paid on the debt (*Compounding!*).
* **Risk** - Loan-to-Value or Debt-to-Collateral ratio. The higher this number, the riskier the position.&#x20;

{% hint style="info" %}
*For example, if the debt is $1000 and collateral is $2000, the risk is 50%.*
{% endhint %}

* **Treshold** - The ratio of the Debt-to-Collateral ratio when the position becomes eligible for liquidation.
* **Actions**&#x20;
  * **Pay** - Presented if the **borrowing** position is open. When the user chooses this option to close the borrowing position, the debt will be paid from the **user's wallet**.
  * **Sell** - Presented if the **borrowing** position is open. When the user chooses this option to close the borrowing position, the debt will be paid from the **collateral**.
  * **Reclaim** - Presented if only **collateral** is deposited without debt. The user can withdraw collateral with this option.

## Repaying the loan - Pay option

When a user chooses the 'PAY' option on an open borrowing position, the following interface is presented:

<figure><img src="https://2037880979-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTz1DtBGUcpuhpSKPaTV0%2Fuploads%2Fc5TGTuVbj0tNp07ChVjb%2Fwerergwgwb2.png?alt=media&amp;token=3af74bc2-3f3e-4628-b06d-cda42fe578fe" alt="" width="493"><figcaption><p>Pay option</p></figcaption></figure>

In this option, the User will pay the debt **directly from the wallet**. If the entire debt is repaid in this way, the user will receive the full amount of initially deposited collateral. The user can choose to pay a portion of the debt (to derisk the position) or to repay the whole debt easily by clicking on the 'Max' button in the 'I will repay' window. ***Repaying only a portion of the debt will not return any collateral.***\
\
To initiate the debt repayment procedure:

* Input desired amount of assets in the 'I will repay' interface, and click on **Approve** (Step 1 of 2).
* Metamask will pop-up with signature request. Click **Sign** to proceed.
* Upon signing, User will be presented with another button - **Repay** (Step 2/2).
* After clicking on it, Metamask will pop-up with repayment confirmation details. Click **Confirm** to finalize repayment process.

## Repaying the loan - Sell option

When a user chooses the 'SELL' option on an open borrowing position, the following interface is presented:

<figure><img src="https://2037880979-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTz1DtBGUcpuhpSKPaTV0%2Fuploads%2F9WbBOdkVwDuWYh5K21ND%2Ffegwegqqwfd.png?alt=media&amp;token=40d73fb2-ebe8-4aee-995b-641a5d41f0dd" alt="" width="494"><figcaption><p>Sell option</p></figcaption></figure>

In this option, the User will pay the debt **by selling a portion of deposited collateral**. If the entire debt is repaid in this way, the user will receive the remaining amount of initially deposited collateral. The user can choose to pay a portion of the debt (to derisk the position) or to repay the whole debt easily by clicking on the 'Max' button in the 'I will sell' window. ***Repaying only a portion of the debt will not return any collateral.***\
\
To initiate the debt repayment procedure:

* Input desired amount of assets in the 'I will sell' interface, and click on **Approve** (Step 1 of 2).
* Metamask will pop-up with signature request. Click **Sign** to proceed.
* Upon signing, User will be presented with another button - **Repay** (Step 2/2).
* After clicking on it, Metamask will pop-up with repayment confirmation details. Click **Confirm** to finalize repayment process.

Congrats! You successfully closed your borrowing position and dodged a nuke!
