> For the complete documentation index, see [llms.txt](https://docs.fathom.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fathom.fi/lending/user-guides/supply-borrow-repay-and-withdraw-asset.md).

# Supply, Borrow, Repay and Withdraw Asset

To cover the most important flows: supply, borrow, repay and withdraw an asset, follow the steps below.

### Supply Asset

* Go to Fathom [DApp](https://dapp.fathom.fi/#/lending).
* Connect your Web3 wallet (such as [MetaMask](https://metamask.io/)) and make sure your network is set to the intended chain (i.e., [XDC](https://chainlist.org/chain/50)).

<div data-full-width="true"><figure><img src="/files/ijj31VB7A2TCBcqeVTJc" alt=""><figcaption></figcaption></figure></div>

* Choose the asset to Supply.
  * You can investigate the [Market](https://dapp.fathom.fi/#/lending/reserve-overview/?underlyingAsset=0x49d3f7543335cf38fa10889ccff10207e22110b5\&marketName=proto_mainnet_v3) for this asset to make the decision. Clock "Details" button.

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

* Click "**Supply**" button.
* Enter the amount of the asset you would like to supply.

<div data-full-width="true"><figure><img src="/files/eNsXN6sU3V6lMRyllkZE" alt=""><figcaption></figcaption></figure></div>

* Click "**Supply Asset**"
  * If this is your first time supplying this asset you may be required to approve the asset transfer before the actual transfer (depending on the asset type).
  * Sign and send the transaction in your Wallet.
  * Wait for the transaction to be processed.
  * Once the transaction has gone through, you'll see your asset supply in "**Your supplies"**.

<div data-full-width="true"><figure><img src="/files/f6ZofmsxcoAGAJxIptil" alt=""><figcaption></figcaption></figure></div>

### Borrow Asset

Now, you can borrow assets against your collateral. Be careful only to borrow a little; otherwise, your position may be liquidated. The simplest metric for the position risk is the health factor.

* Choose an asset to borrow and click "Borrow" button.
* Enter the amount of the asset you would like to borrow. Pay attention to the Health Factor.

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

* Click "Borrow Asset"
  * Sign and send the transaction in your Wallet.
  * Wait for the transaction to be processed.
  * Once the transaction has gone through, you'll see your asset borrowed in "**Your borrows"**.

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

### Repay Asset

If you have significant borrowing positions, your ability to withdraw your supply may be restricted. You need to repay all your borrowed assets with interest to withdraw all your supplies.

* Choose the asset to repay and click "**Repay**" button.
* Enter the amount of the asset you would like to repay.

<div data-full-width="true"><figure><img src="/files/a0J2OOmyEJV8bcSyqGvQ" alt=""><figcaption></figcaption></figure></div>

Click "**Repay Asset**"

* If this is your first time repaying this asset you may be required to approve the asset transfer before the actual transfer (depending on the collateral type).
* Sign and send the transaction in your Wallet.
* Wait for the transaction to be processed.
* Once the transaction has gone through, you'll see changes in "**Your borrows"**.

### Withdraw Asset

* Choose the asset to withdraw and click "**Withdraw**" button.
* Enter the amount of the asset you would like to withdraw.

<div data-full-width="true"><figure><img src="/files/2S3aDxznUT9vuDak4cMR" alt=""><figcaption></figcaption></figure></div>

Click "**Withdraw Asset**"

* Sign and send the transaction in your Wallet.
* Wait for the transaction to be processed.
* Once the transaction has gone through, you'll see changes in "**Your supplies"**.

### Risk Management

Pay attention to your Health Factor. If it becomes too small, your supplied assets may be liquidated to restore it. In that case, you will lose your supply.

There are 2 ways how to manage your Health Factors:

* Supply more assets
* Repay your borrowed assets


---

# 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.fathom.fi/lending/user-guides/supply-borrow-repay-and-withdraw-asset.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.
