Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: balancer aura apy calculations #533

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
fix: scale tbal tvl o aura tvl
  • Loading branch information
BobTheBuidler committed Aug 10, 2023
commit a451f592739f0132841e711e800796af8dce05f2
4 changes: 3 additions & 1 deletion yearn/apy/balancer/simple.py
Original file line number Diff line number Diff line change
@@ -213,7 +213,9 @@ async def get_current_aura_apr(
calculate_24hr_swap_fees_apr(gauge.pool, block),
get_bonus_rewards_apr(rewards, aura_rewards_tvl),
)
aura_rewards_per_year = bal_rewards_per_year * aura_emission_rate
portion_of_bal_tvl_in_aura = aura_rewards_tvl / bal_rewards_tvl
bal_rewards_flowing_thru_aura_per_year = bal_rewards_per_year / portion_of_bal_tvl_in_aura
aura_rewards_per_year = bal_rewards_flowing_thru_aura_per_year * aura_emission_rate
aura_rewards_per_year_usd = aura_rewards_per_year * aura_price
aura_rewards_apr = aura_rewards_per_year_usd / aura_rewards_tvl