# Computations

Last updated

Last updated

This page outlines the major computations that occur within the Athena protocol. These calculations are crucial for understanding the mechanics of cover pricing, liquidity provision, and reward distribution.

This page is still being expanded. Information might be incomplete.

Utilization Rate

The utilization rate (U) is a key metric that influences many aspects of the protocol. It represents the percentage of liquidity in a pool that is currently locked as a guarantee for bought covers.

$U = \frac{\text{Total covered amount}}{\text{Total liquidity}} \times 100\%$

Example:

Premium Rate

The premium rate (P_r) is calculated using a bi-linear curve based on the utilization rate. It determines the cost of covers and rewards for liquidity providers.

Let:

u_optimal = optimal utilization rate

r_0 = base premium rate at 0% utilization

r_slope1 = premium slope below optimal utilization

r_slope2 = premium slope above optimal utilization

Then:

Example:

Reward Rate

The reward rate (R_r) for liquidity providers is calculated by multiplying the utilization rate and the premium rate:

Example:

Cover Duration and Tick Spacing

The duration of a cover is measured in ticks, with the time between ticks (seconds per tick) varying based on pool utilization. The maximum seconds per tick is 86,400 (1 day), and the minimum is calculated as:

The actual seconds per tick (s_t) at a given utilization is:

Liquidity Index Computation

The liquidity index (L_i) tracks the accumulation of premium rewards. For a given period:

Example:

Compensation Impact on Leveraged Positions

When a compensation occurs in a pool, it affects the liquidity of other pools with shared (leveraged) liquidity. The impact is calculated as:

Example:

These computations form the backbone of Athena's risk assessment, pricing, and reward distribution mechanisms. Understanding them is crucial for analysts and users looking to deeply engage with the protocol.

For U â‰¤ u_optimal: $P_r = r_0 + \frac{U}{u_{optimal}} \cdot r_{slope1}$

For U > u_optimal: $P_r = r_0 + r_{slope1} + \frac{U - u_{optimal}}{1 - u_{optimal}} \cdot r_{slope2}$

$R_r = U \times P_r$

$\text{min seconds per tick} = 86400 \times \frac{r_0}{r_0 + r_{slope1} + r_{slope2}}$

$s_t = 86400 - (86400 - \text{min seconds per tick}) \times U$

$L_i = \text{capital} \times R_r \times \frac{\text{elapsed time}}{\text{one year}}$

$\text{Impact ratio} = \frac{\text{Compensation amount}}{\text{Total pool liquidity}}$

For the pool where the compensation occurs: $\text{New liquidity} = \text{Old liquidity} \times (1 - \text{Impact ratio})$

For pools with shared liquidity: $\text{New shared liquidity} = \text{Old shared liquidity} \times (1 - \text{Impact ratio})$