> For the complete documentation index, see [llms.txt](https://btestafinance.gitbook.io/btesta-finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://btestafinance.gitbook.io/btesta-finance/btesta-protocol/untitled/lend-and-earn/usdt-lending.md).

# - USDT Lending

## 💡**Deposit USDT To Get ibUSDT**

![](/files/-McD2D1dSumxzN-bgmkI)

**ibUSDT** can be calculated by;

* *CASE 1* : (Total USDT Deposit Amount) > 0

$$
{Number}\space{of}\space{Token}=\frac{{Deposit}\space{Amount}\*{Total}\space{Token}}{{Total}\space{Liquidity}}
$$

* *CASE 2 :* (Total USDT - Deposit Amount) ≤ 0

$$
{Number}\space{of}\space{Token}={Deposit}\space{Amount}
$$

**\*Total  Liquidity = Total USDT Deposited + Cumulative Borrow Interest**

Total ibUSDT token is set based on the first user who deposits this asset. For example, if Bob is the first user who deposits 1,000 USDT, then the total ibUSDT token starts with 1,000 ibUSDT. If Alice then adds 100 USDT then the total liquidity will be 1,100 USDT, then Alice gets 90.90 ibUSDT (100 \* 1,000 / 1,100).

## 💡**Withdraw ibUSDT to get USDT**

The number of withdrawal share that can be calculated from the following equation;

$$
{Withdrawal}\space{Share}=\frac{{Withdrawal}\space{Amount}\*{Total}\space{Token}}{{Total}\space {Liquidity}}
$$

![](/files/-McD1YQZutfBLFOetb39)

### 📎Total USDT Deposited (Total Supply)

Can be called '*Total Liquidity*', the total amount of liquidity in each asset pool, calculated as

$$
TotalLiquidity = TotalAvailableLiquidity+TotalBorrows
$$

### 📎Total Debt Issued (Total Borrowing)

Can be called '**Total Borrow Shares**', the total number of shares of Total Borrow for an asset, while **Total Borrows** are the sum of the total borrowed amount and accumulated borrow interest of an asset.

### 📎Current ibUSDT APR

Can be calculated from the following equation

$$
{ibUSDT}\space{APR} = \frac{{Borrow}\space{Interest}\*Utilization}{100}
$$
