APY Calculation

The APY Function contains calculations that impact Pool behaviour. Please do your own research and interact at your sole responsibility.

APY

The Annual Percentage Yield (“APY”) is the current annual interest rate, and it is based on the pool utilization at any given moment. The more assets are borrowed, the higher the utilization and interest rate for all participants.

An example with config parameters is depicted below, and each Pool can have different parameters, configurable by Admin at this stage.

utilization [0-1]

Utilization represents the ratio between total assets borrowed and the total deposits in a given pool.

utilization = total_borrow / total_deposit

total_deposit - total deposit balances in the Pool total_borrow - total borrow balances from the Pool

APY Params

base - the initial APY for borrowers base_multiplier - defines the steepness of the APY curve, while utilization is below the kink multiplier - defines the steepness of the APY curve, while utilization is above the kink kink - configurable utilization level when a different APY calc model is enforced

Typical values are: base [0-1], kink [0-1], base_multiplier [0-0.3], multiplier [0.3-10]

Borrow APY & Deposit APY

Implementation of the APY/utilization dependency function is described below. Based on the Pool APY Params described above, the functions are as follows.

Miscalculating rates could cause pool leakage.

// borrow_rate
IF (utilization < kink)
    THEN borrow_rate = base + base_multiplier * utilization
    ELSE borrow_rate = base + base_multiplier * kink + multiplier * (utilization - kink)
    
// deposit_rate
deposit_rate = borrow_rate * (1 - reserve_factor) * utilization

Where reserve_factor is a configurable %, going to the Pool reserve. More in Risk Mitigation.

Last updated