> For the complete documentation index, see [llms.txt](https://betafinance.gitbook.io/betafinance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://betafinance.gitbook.io/betafinance/refilling-and-repaying.md).

# Refilling and Repaying

## Refilling

Refilling on Beta Finance means to add additional collateral to a current borrow or short position. Users are able to add more of the existing collateral used to the position in order to decrease the loan-to-value (LTV) percentage to avoid liquidation. &#x20;

To add additional collateral to an existing position follow 2 simple steps:

1. Select the position you want to add more collateral to and click "Refill".

![](https://lh5.googleusercontent.com/qh-cQ3ZhgmGw1lBbh1wmXBEwWTJFrlkUUhr09igJExBrf8-UQ4Piz0EWEHaliPLTuEkXsXcbTj3YU7NKGO7ig8aGIw1iZYCrL6QUFYpNO-gpVFPaUWvSsjSKiK56845MwteXuQ_W)

2\. Enter in the amount of collateral you would like to add, and click "Refill". Metrics regarding the change in LTV after the added collateral are available directly in the UI.

![](https://lh3.googleusercontent.com/g32PwHNJYOAeu5-UErYCn2nYuOSIpWVSBt4xbKAjPv4Z5bumeZYLp77ZRaII323E6-g1jZeJWNO0acKnHXgqJ3PgaQVj_MJppXunFipkq3Pm9sMfNRxxK4LnykFOL7ggNQYV4vYj)

## Repaying

Unlike on existing money markets, where users need to use the underlying asset to repay their debts. Beta Finance will enable users to either repay their debt using the collateral or borrowed/shorted token. When repaying with the borrowed/shorted token, users will need to specify the amount of borrowed/shorted token to repay. When repaying with the collateral asset, Beta will automatically deduct the full debt from the collateral and execute a swap on a DEX to obtain the borrowed/shorted asset for repayment on behalf of the user.

For repaying with borrowed/shorted token:

1. Select to pay with the borrowed/shorted token and enter the repay amount. The debt does not have to be fully repaid when directly paying with the borrowed/shorted token.

![](/files/-MhJ-Yl_VTMMPagy7ns6)

&#x20;   2\.  Click the buttons to approve the token for repayment and repay the debt.

Fore repaying with collateral:

1. Select “Pay with Collateral” on the right side. When repaying with collateral, Beta Finance will automatically use the collateral associated with the position to swap to the borrowed/shorted token through the optimal DEX to repay your debt.

![](/files/-MhJ-bNjn7gvgF7mtFfC)

&#x20;  2\. Click the button to repay your debt, close your position and retake your collateral.


---

# 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://betafinance.gitbook.io/betafinance/refilling-and-repaying.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.
