Computations

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=Total covered amountTotal liquidity×100%U = \frac{\text{Total covered amount}}{\text{Total liquidity}} \times 100\%

Example:

Total liquidity in pool = $10,000
Total covered amount in pool = $3,500

U = (3,500 / 10,000) × 100% = 35%

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:

For U ≤ u_optimal: Pr=r0+Uuoptimal⋅rslope1P_r = r_0 + \frac{U}{u_{optimal}} \cdot r_{slope1}

For U > u_optimal: Pr=r0+rslope1+U−uoptimal1−uoptimal⋅rslope2P_r = r_0 + r_{slope1} + \frac{U - u_{optimal}}{1 - u_{optimal}} \cdot r_{slope2}

Example:

u_optimal = 80%
r_0 = 2%
r_slope1 = 6%
r_slope2 = 15%

For U = 40%:
P_r = 2% + (40% / 80%) × 6% = 5%

For U = 90%:
P_r = 2% + 6% + ((90% - 80%) / (100% - 80%)) × 15% = 15.5%

Reward Rate

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

Rr=U×PrR_r = U \times P_r

Example:

U = 50%
P_r = 8%

R_r = 50% × 8% = 4%

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:

min seconds per tick=86400×r0r0+rslope1+rslope2\text{min seconds per tick} = 86400 \times \frac{r_0}{r_0 + r_{slope1} + r_{slope2}}

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

st=86400−(86400−min seconds per tick)×Us_t = 86400 - (86400 - \text{min seconds per tick}) \times U

Liquidity Index Computation

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

Li=capital×Rr×elapsed timeone yearL_i = \text{capital} \times R_r \times \frac{\text{elapsed time}}{\text{one year}}

Example:

capital = $10,000
R_r = 4%
elapsed time = 10 days

L_i = 10,000 × 4% × (10 / 365) = $10.96

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:

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

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

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

Example:

Pool A liquidity = $3,000 (including $1,000 shared with Pool B)
Pool B liquidity = $2,000 (including $1,000 shared with Pool A)
Compensation in Pool A = $1,000

Impact ratio = 1,000 / 3,000 = 33.33%

New Pool A liquidity = 3,000 × (1 - 0.3333) = $2,000
New Pool B liquidity = 2,000 - (1,000 × 0.3333) = $1,667

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.

Last updated