# Unlock & Close

Before unlocking, users must ensure that the entire borrowed amount (e.g., USDC) has been repaid, including interest. Only when the loan is repaid, users can safely close their position and retrieve their BTC collateral.

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

**Unlock:** After repaying, clicking on “Unlock” will automatically start the process whereby your collateral will be released from escrow and becomes available for unlocking back to the user's connected wallet.

Once you have unlocked your collateral, the lending position is officially closed, and all associated metrics—such as health factor, LTV, and liquidation price are reset.


---

# 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://docs.optimex.com/optimex-revolutionizing-bitcoin-finance/optimex-borrow/user-guide/unlock-and-close.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.
