# Lending and Borrowing Guide

## 1. Login using WavesKeeper / Waves.Exchange

Navigate to the site, click connect wallet and chose the provider. Waves Keeper can be installed from your browser's store([chrome](https://chrome.google.com/webstore/detail/waves-keeper/lpilbniiabackdjcionkobglmddfbcjo?hl=en), [brave](https://chrome.google.com/webstore/detail/waves-keeper/lpilbniiabackdjcionkobglmddfbcjo?hl=en), [firefox](https://addons.mozilla.org/en-US/firefox/addon/waves-keeper/)). If you're using a mobile device(iOS/Android), only waves.exchange options are available.

## 2. Navigate to All Markets section and deposit your collateral

![All Markets section with current rates, basic statistics and your wallet balances](/files/-McUWPJjLxuHpDRv9LpI)

Click "Supply" button, input the amount and ensure "Use as Collateral" is enabled. This will increase your borrow limit across the system.&#x20;

![Asset Supply dialog, displaying current APY and projected changes to your account](/files/-McUXelmDDmTu_7f9X4U)

Click "Supply", confirm the transaction and await for transaction confirmation. The dialog will close and a popup will be shown. *You'll start earning interest on your deposit immediately*.

## 3. Borrow the amount not exceeding your limit

Borrowing decreases your account health. "Max Safe" button advises you the amount that will decrease it down to 20%. You can still input more, but no less than 5%. The smart contract ensures that to prevent your account from immediate liquidation.

![Borrow dialog, displaying current APR and projected changes to your account](/files/-McUYsdPzKO9igYJR84U)

Click "Borrow", confirm the transaction and await for transaction confirmation. The dialog will close and a popup will be shown.&#x20;

As time passes, your debt, e.g. the amount you need to repay, will increase.&#x20;

## 4. Get familiar with Rates formation

In All markets section, click on the asset name and observe all information on the asset you need. As Total Supply and Total Borrow varies depending on asset demand, so do Supply APY and Borrow APR. The interest rate model section is used to illustrate the dependency between asset utilisation and APY\&APR.

![Asset Details and interest rate model](/files/-McUaWx3MsDta5p-6KQO)

## 5. Repay at any time

To repay your debt, click on the corresponding asset in My Borrow section.

![All information regarding your account: Account Status, Supplies and Borrows](/files/-McUbz4q_hYamT4H6O3r)

Withdrawing assets and disabling  collateral decreases your borrow limit, so if you want to withdraw everything from the protocol, ensure you have no outstanding debts.

## 6. Avoid liquidation

Ensure your account health stays high, so your account doesn't get partially liquidated in an active trading day.


---

# 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.vires.finance/guides/user-guide.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.
