# Borrow & Lend API

ThirdFi presents Borrow & Lend API with top-tier non-custodial loan markets. Borrow & Lend API allows you to access various loan protocols and earn interest on supplying and borrowing assets simply through REST API. The funds deployed are working investment assets that users of your product can earn interest in real-time, all automatically.

We’re providing support for 2 protocols: Aave, and Venus Protocol.

## Aave

[Aave](https://aave.com/) is a decentralized non-custodial liquidity protocol where users can participate as depositors or borrowers. Depositors provide liquidity to the market to earn a passive income, while borrowers are able to borrow in an overcollateralized (perpetually) or undercollateralized (one-block liquidity) fashion. (Source: [Aave Document Hub](https://docs.aave.com/hub/))

### Integrated versions

1. Aave v2 - Ethereum (goerli testnet only)
2. Aave v3 - Avalanche, Polygon, Arbitrum, Optimism

### Integrated features

1. Get all the current token asset pools for borrow and lending   &#x20;
2. Get the user position of the pools by wallet address
3. Get account unclaimed rewards
4. Lending with token asset
5. Lending and borrowing with a token asset in one-click
6. Borrow with token asset
7. Repay for borrowing an asset
8. Withdraw lending asset
9. Repay and withdraw in one-click
10. Claim rewards

## Venus Protocol

[Venus Protocol](https://venus.io/) is an algorithmic-based money market system designed to bring a complete decentralized finance-based lending and credit system onto Binance Smart Chain. Venus enables users to utilize their cryptocurrencies by supplying collateral to the network that may be borrowed by pledging over-collateralized cryptocurrencies. (Source: [Venus protocol whitepaper](https://venus.io/Whitepaper.pdf))

### Integrated features

1. Get all the current token asset pools for borrow and lending
2. Get the user position of the pools by wallet address
3. Get account unclaimed rewards
4. Lending with token asset
5. Borrow with token asset
6. Repay for borrowing the asset
7. Withdraw lending asset
8. Claim rewards

## How to use this Borrow & Lend API?

1. The user must provide the token asset for deposit amount for lending & lending, repaying, blockchain network, and interest rate mode.
2. ThirdFi provides a webview session as a URL.
3. ThirdFi verifies the transaction and updates it to the end user and developer.
4. The user confirms the transaction and submits it to the blockchain.
5. The developer redirects users to the URL to execute the transaction.


---

# 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://thirdfi.gitbook.io/thirdfi.org/product/borrow-and-lend-api.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.
