Key Concepts

Pairs

Each pair is an isolated market to borrow a single ERC-20 token (known as the Asset Token) by depositing a different ERC-20 token (known as the Collateral Token).

When Lenders deposit Asset Tokens into the Pair, they receive fTokens. fTokens are ERC-20 tokens and are redeemable for Asset Tokens (sometimes referred to as the underlying asset). As interest is accrued, fTokens are redeemable for increasing amounts of the underlying asset.

Borrowers deposit Collateral Tokens into the Pair and in exchange receive the right to borrow Asset Tokens

Loan-To-Value

Each borrower's position has a Loan-To-Value (LTV). This represents the ratio between the value of the assets borrowed and the value of the collateral deposited. The LTV changes when the exchange rate between Asset and Collateral Tokens move or when interest is capitalized.

If a borrower's LTV rises above the Maximum LTV, their position is considered unhealthy. In order to remediate this, a borrower can add collateral or repay debt in order to move the LTV back into a healthy range.

The Maximum LTV value is immutable and configured at deployment. Typically the value is set to 75%. Custom Term Sheet deployments can set this value manually, even creating under-collateralized loans by setting the value above 100%. Maximum LTV configured above 100% must be accompanied by a borrower whitelist to protect against malicious actors. The configured value can be found by calling the maxLTV() function on the pair.

Rate Calculator

Each pair is configured to use a specific Rate Calculator contract to determine interest rates. At launch, Fraxlend supports two types of Rate Calculators.

  • Time-Weighted Variable Rate Calculator - allows the interest rate to change based on the amount of assets borrowed, known as the utilization. When utilization is below the target, interest rates will adjust downward, when utilization is above the target, interest rates will adjust upward. For more information see Advanced Concepts: Time-Weighted Variable Interest Rate

  • Linear Rate Calculator - calculates the interest rate purely as a function of utilization. Lower utilization results in lower borrowing rate, while higher utilization results in higher borrowing rates. For more information see Advanced Concepts: Linear Rate

  • Variable Rate V2 - calculates the interest rate as a function of utilization. The interest rate responds immediately to changes in utilization along a rate function f(Utilization) = rate. However, the slope of the function increases when utilization is above the target and decreases when utilization is below the target. This means that rates will respond instantly to changes in utilization. Extended periods of low or high utilization will change the shape of the rate curve. For more information see Advanced Concepts: Variable Rate V2

Liquidations

When a borrowers LTV rises above the Maximum LTV, any user can repay all or a portion of the debt on the borrower's behalf and receive an equal value of collateral plus a liquidation fee. The liquidation fee is immutable and defined at deployment. By default the value is set to 10% and can be accessed by calling the liquidationFee() view function on the pair.

fToken Share Price

When lenders deposit Asset Tokens they receive fTokens at the current fToken Share Price. fTokens represent a lender's share of the total amount of underlying assets deposited in the pair, plus the capitalized interest from borrowers. As interest accrues, the Share Price increases. Upon redemption, the fTokens are redeemable for an ever-increasing amount of Asset Tokens which includes capitalized interest. To check the current fToken Share Price, call the totalAsset() view function and compare the value of amount/shares.

Vault Account

The Vault Account is core concept to all accounting in the Pair. A Vault Account is a struct which contains two values:

1. The total Amount of tokens in the Vault Account.

2. the total number of Shares in the Vault Account.

struct VaultAccount {
    // Represents the total amount of tokens in the vault
    uint128 amount; // Analogous to market capitalization
    
    // Represents the total number of shares or claims to the vault
    uint128 shares; // Analogous to shares outstanding
}

The Shares represent the total number of claims to the amount. Shares can be redeemed for Asset Tokens. The rate of redemption, known as the Share Price is determined by dividing the Amount value by the Shares value. It is essentially the exchange rate between Shares and the underlying Asset Token.

To convert between a value represented as an Amount into the corresponding Shares, divide the Amount by the Share Price. To convert from Shares to Amount, multiply by Share Price.

Shares = Amount / Share Price Amount = Shares x Share Price

Last updated