> For the complete documentation index, see [llms.txt](https://docs.lendle.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lendle.xyz/user-guide-for-ui-v1/markets/borrow/repaying-a-loan.md).

# Repaying a loan

Repaying your loan can be done from the [Dashboard](/user-guide-for-ui-v1/dashboard.md)\
\
In this tutorial we will unwind the positions that we've created by following [How-To-Deposit](/user-guide-for-ui-v1/markets/deposit/how-to-deposit.md) & [How-To-Borrow](/user-guide-for-ui-v1/markets/borrow/how-to-borrow.md)<br>

Head over to the Dashboard of Lendle:

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

On the right, we can see all our borrows, in this case, ETH. Click on Repay to start the process.\ <br>

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

In this screen, you can see the amount of WETH we have borrowed. The amount we have to repay is higher than what we borrowed, this is because of the interest we owe to the protocol.\
In this example, I want to remove the deposited DAI in the end, so I have to repay the whole loan.\
By pressing MAX we will see the full amount we owe. Press Continue to start repaying.

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

Verify the amount we're about to return to the protocol and take note of the new [Health Factor](/key-protocol-insights/health-factor.md).

When you are ready, press Approve and use default again in your MetaMask to only allow spending for the amount you put in.\
\
Then press Repay and sign the tx again. \
\
Success! You've now repaid your loan.

*Note:*

Sometimes your loan will not be paid off in full. This is because during the time you started to repay and the time the funds were received, another epoch happened and thus more money is owed to the protocol.\
\
It will look something like this:\ <br>

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

By pressing MAX again you will see the exact amount you owe the protocol. \
Go through the process again to repay, until you have 0 borrow open on the [Dashboard](/user-guide-for-ui-v1/dashboard.md)\
For this example, it took 4 transactions to repay the loan in full.


---

# 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.lendle.xyz/user-guide-for-ui-v1/markets/borrow/repaying-a-loan.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.
