Borrow

Dynamics behind the borrow operation.

A user who has made a deposit obtaining an amount MM of fToken can request a loan by locking them as collateral.

At the time of the borrow request, named tbt_b, the user possesses a collateral amount AtbA_{t_b} correspondent to the amount MM of fToken multiplied by IdtbI_{d_{t_b}} which is the deposit interest index at the time of borrowing tbt_b:

Atb=Mโˆ—IdtbA_{t_b} = M * I_{d_{t_b}}

The collateral amount AtbA_{t_b}, can be expressed in the borrowed token value following this formula:

Qtb=Atbโˆ—RBorrowedDepositedtbQ_{t_b}=A_{t_b} * R_{\frac{Borrowed}{Deposited}_{t_b}}

Where RBorrowedDepositedtbR_{\frac{Borrowed}{Deposited}_{t_b}} represents the conversion rate between the borrowed and the collateralized asset.

Thresholds

S1 - Loan To Value

For safety reasons, the total amount of QQ cannot be borrowed by the user; it is necessary to retain a portion of it within the protocol to safeguard the loan in case of negative fluctuations in the value of the collateralized asset and to guarantee the interest repayment. Therefore, a safety threshold S1S1 is devised by the protocol. S1S1 is expressed in percentage form, e.g., S1S1 = 0.8 (i.e., 80%), which determines the Loan to Value (LTV).

The granted value is given by the following:

Atbโˆ—S1=Mโˆ—Idtbโˆ—S1A_{t_b} * S1 = M * I_{d_{t_b}} * S1

Therefore, the borrowable amount BABA is calculated as follows:

BAt=Mโˆ—RB2CtBA_t = M * R_{B2C_t}

Where RB2CtR_{B2C_t} is the Borrowable to Collateral ratio, and it is calculated as follows:

RB2Ct=Idtโˆ—RBorrowedDepositedtโˆ—S1R_{B2C_t} = I_{d_t} * R_{\frac{Borrowed}{Deposited}_{t}} * S1

So, the borrowable amount at the time of borrow is calculated as:

BAtb=Mโˆ—RB2CtbBA_{t_b} = M * R_{B2C_{t_b}} or BAtb=Atbโˆ—RBorrowedDepositedtbโˆ—S1BA_{t_b} = A_{t_b}* R_{\frac{Borrowed}{Deposited}_{t_b}} * S1

S2 - Liquidation Threshold (or under-collateralization threshold)

The critical value S2S2 represents the liquidation threshold, and it is given in percentage defined such that: S1S1 < S2S2 (e.g., S1S1 = 80%; S2S2 = 90%). When the borrowed amount plus accrued interest reaches down the amount Atbโˆ—S2A_{t_b} * S2 (in the same currency), the position is considered under-collateralized and must be liquidated.

The quantity Atโˆ—S2A_{t} * S2 is the threshold of under-collateralization of the loan. Therefore, the equivalent amount in the borrowed asset is calculated as:

Tt=Atโˆ—S2โˆ—RUSDC/ALGOtT_t = A_t * S2 * R_{{USDC}/{ALGO}_t}

The user will have to pay interest on the loan. Regular payments are not required to simplify the protocol. However, the non-payments may correspond to a decrease in the collateral value, which must be kept above the T threshold. If the user does not pay interest or stabilize its collateral, a liquidator can repay the debt, acquiring collateral control.

Rebalance Threshold

Users can borrow more assets against the same collateral or reduce the locked up collateral if the Liquidation Margin is greater than:

1โˆ’S1/S2<LM1-{S1}/{S2}<LM

Borrow Balance

The variable state Borrow Balance BBtBB_{t}represents the actual amount the user must repay to the platform to close the debt position. To clearly understand all the situations that a loan position could incur, four components are defined as follows:

1. BtnB_{t_n}โ€‹ which represents the actual value borrowed by the user, which is initially Btb=BAtbB_{t_b} = BA_{t_b}. This is checked and updated only when one of the following occurs: Repay Loan (fully/partially or liquidate) and borrow additional asset (collateral value increased).

2. CC which is the amount of asset added (borrow additional asset) or subtracted (Repay loan/interest) from the borrow balance.

3. BBtnBB_{t_n}is the borrow balance of the loan at the time t updated at the last loan operation N. It is calculated as an update of the previous borrow balance and the relative compounded interest, plus/minus the contribution of CC.

BBtn=BBtnโˆ’1โˆ—IbtIbtnโˆ’1ยฑCBB_{t_n} = BB_{t_{n-1}} *\frac{I_{b_t}}{I_{b_{t_n-1}}} \pm C

4. AItNAI_{t_N}is the part of the user debt composed of the accrued interest on the borrowed amount . When the user repays, the accrued interest part of the payment is addressed to the reserve pool.

AItN=BBtnโˆ’1โˆ—IbtIbtnโˆ’1โˆ’BtNโˆ’1AI_{t_N} = BB_{t_{n-1}} *\frac{I_{b_t}}{I_{b_{t_n-1}}} - B_{t_{N-1}}

Thresholds Parameters

The Borrow Cap is the global maximum borrowable amount for a given token pair, specified in the absolute terms using the borrowed asset.

Token Pairs (Col-Bor)

S1

S2

Borrow Cap

ALGO - USDC

0.7

0.8

ALGO - USDt

0.7

0.8

ALGO - goBTC

0.65

0.8

ALGO - goETH

0.65

0.8

ALGO-Planet

0.7

0.8

600,000

USDC - ALGO

0.7

0.8

USDC - USDt

0.85

0.95

USDC - goBTC

0.75

0.825

USDC - goETH

0.7

0.8

USDC-Planet

0.65

0.8

350,000

USDt - ALGO

0.7

0.8

USDt - USDC

0.85

0.95

USDt - goBTC

0.75

0.825

USDt - goETH

0.7

0.8

USDt-Planet

0.65

0.8

350,000

goBTC - ALGO

0.65

0.8

goBTC - USDC

0.75

0.825

goBTC - USDT

0.75

0.825

goBTC - goETH

0.8

0.875

goETH - ALGO

0.65

0.8

goETH - USDC

0.7

0.8

goETH - USDt

0.7

0.8

goETH - goBTC

0.8

0.875

gALGO - ALGO

0.75

0.9

3,500,000

gALGO - USDC

0.65

0.75

1,000,000

gALGO - USDt

0.65

0.75

1,000,000

gALGO - goBTC

0.6

0.75

10

gALGO - goETH

0.6

0.75

200

gALGO-Planets

0.65

0.75

500,000

gALGO3 - ALGO

0.85

0.9

gALGO3 - USDC

0.65

0.75

gALGO3 - USDt

0.65

0.75

gALGO3 - goBTC

0.5

0.675

gALGO3 - goETH

0.5

0.675

Planet-ALGO

0.7

0.8

40,000

Planet-USDC

0.65

0.8

8,000

Planet-USDt

0.65

0.8

8,000

ALGO/gALGO PLP - ALGO

0.725

0.85

750,000

ALGO/gALGO PLP - USDC

0.65

0.8

250,000

ALGO/gALGO PLP - USDt

0.65

0.8

250,000

ALGO/USDC TMP1.1 - ALGO

0.65

0.825

400,000

ALGO/USDC TMP1.1 - USDC

0.7

0.8

200,000

ALGO/USDC TMP1.1 - USDt

0.7

0.8

200,000

ALGO/USDC PLP - ALGO

0.65

0.825

200,000

ALGO/USDC PLP - USDC

0.7

0.8

100,000

ALGO/USDC PLP - USDt

0.7

0.8

100,000

ALGO/gALGO3 TMP1.1 - ALGO

0.725

0.85

400,000

ALGO/gALGO3 TMP1.1 - USDC

0.65

0.8

100,000

ALGO/gALGO3 TMP1.1 - USDt

0.65

0.8

100,000

ALGO/gALGO3 PLP - ALGO

0.725

0.85

350,000

ALGO/gALGO3 PLP - USDC

0.65

0.8

75,000

ALGO/gALGO3 PLP - USDt

0.65

0.8

75,000

USDC/gALGO TMP1.1 - ALGO

0.65

0.825

750,000

USDC/gALGO TMP1.1 - USDC

0.7

0.8

250,000

USDC/gALGO TMP1.1 - USDt

0.7

0.8

250,000

USDC/USDt TMP1.1 - ALGO

0.65

0.8

400,000

USDC/USDt TMP1.1 - USDC

0.85

0.9

250,000

USDC/USDt TMP1.1 - USDt

0.85

0.9

250,000

USDC/USDt PLP - ALGO

0.65

0.8

400,000

USDC/USDt PLP - USDC

0.85

0.9

250,000

USDC/USDt PLP - USDt

0.85

0.9

250,000

goBTC/gALGO PLP - ALGO

0.7

0.8

600,000

goBTC/gALGO PLP - USDC

0.65

0.775

200,000

goBTC/gALGO PLP - USDt

0.65

0.775

200,000

goBTC/gALGO PLP - goBTC

0.675

0.775

8

goBTC/gALGO PLP - goETH

0.7

0.8

120

goETH/gALGO PLP - ALGO

0.725

0.825

600,000

goETH/gALGO PLP - USDC

0.675

0.8

200,000

goETH/gALGO PLP - USDt

0.675

0.8

200,000

goETH/gALGO PLP - goBTC

0.725

0.825

8

goETH/gALGO PLP - goETH

0.7

0.8

120

The S1 and S2 parameters are related to the collateralized-borrowed assets pair. Their value is established using an innovative algebraical model specifically built for Folks Finance that considers the covariance of the pairs of assets, market capitalization and liquidation risk.

Last updated