Crate hyperdrive_math

Source

Structs§

State

Traits§

YieldSpace

Functions§

calculate_bonds_given_effective_shares_and_rate
Calculates the bond reserves assuming that the pool has a given effective share reserves and fixed rate APR.
calculate_effective_share_reserves
Calculates the share reserves after zeta adjustment, aka the effective share reserves: $z_e = z - zeta$.
calculate_hpr_given_apr
Calculate the holding period return (HPR) given a non-compounding, annualized rate (APR).
calculate_hpr_given_apy
Calculate the holding period return (HPR) given a compounding, annualized rate (APY).
calculate_rate_given_fixed_price
Calculate the rate assuming a given price is constant for some annualized duration.
calculate_time_stretch