# Closing a Position

#### To Close a Position:

1. **Repay Borrowed Assets:** You need to repay the borrowed amount to close your position. Go to the "Vaults" tab, choose your vault, and close your position. If your borrowed amount + yield generated is enough, you do not need to pay extra, and you will receive your profit.
2. **Withdraw Collateral:** Once your debt is cleared, you can withdraw your collateral.
3. **Confirm Transactions:** Approve both the repayment and the withdrawal transactions in your wallet.

Make sure your collateral and borrowing positions are healthy before withdrawing to avoid liquidation risks.


---

# 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.beracana.com/guide/closing-a-position.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.
