> For the complete documentation index, see [llms.txt](https://docs.metastreet.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.metastreet.xyz/liquidity-layer/borrow/manual-loan-repayment.md).

# Manual Loan Repayment

1. Find the original <mark style="color:red;">`Loan Origination`</mark> transaction

{% hint style="warning" %}
Example Link: <https://etherscan.io/tx/0xa26a78f3905d9b458eb261cef8e0029c0906dafa3c1710d62b06b4915b60a25c>
{% endhint %}

2. Copy the long <mark style="color:red;">`loanReceipt`</mark> chunk under data from the <mark style="color:red;">`LoanOriginated`</mark> event

{% hint style="warning" %}
Example Link: <https://etherscan.io/tx/0xa26a78f3905d9b458eb261cef8e0029c0906dafa3c1710d62b06b4915b60a25c#eventlog>
{% endhint %}

For the above transaction, the <mark style="color:red;">`loanReceipt`</mark> is the following:

{% code overflow="wrap" %}

```html
0100000000000000000000000000000000000000000000000022B1C8C1227A000000000000000000000000000000000000000000000000000022FAC900712AFF00D543A0BE0684F0556786586B83F4C9FD16A4DC350000000064EA6F7F0000000000278D0057A204AA1042F6E66DD7730813F4024114D74F3700000000000000000000000000000000000000000000000000000000000001E100000000000000000030927F74C9DE000040000000000000000022B1C8C1227A0000000000000000000022FAC90071-2AFF00
```

{% endcode %}

3. Click on the contract address that the above transaction <mark style="color:red;">`Interacted With (To)`</mark>&#x20;

{% hint style="warning" %}
Contract Address:

<https://etherscan.io/address/0xe13f46cf28835047cc4ac5553de05d98a479625f>
{% endhint %}

4. Click <mark style="color:red;">`Contract`</mark> -> <mark style="color:red;">`Write as Proxy`</mark>
5. Click <mark style="color:red;">`Connect to Web3`</mark> to connect your wallet that the Loan was originated with
6. Scroll down to <mark style="color:red;">`10. Repay`</mark>
7. Type <mark style="color:red;">`0x`</mark> followed by pasting the loan receipt above (long string from Step 2)
8. Click <mark style="color:red;">`Write`</mark>, this will generate a transaction to repay the loan
9. <mark style="color:red;">`Confirm`</mark> the transaction in your wallet


---

# 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.metastreet.xyz/liquidity-layer/borrow/manual-loan-repayment.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.
