Skip to content

Commit

Permalink
fix: correct calculation of discounted rKP3R price (yearn#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
dudesahn authored Jan 25, 2022
1 parent 8e4722f commit 6296ab8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yearn/apy/curve/simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def simple(vault, samples: ApySamples) -> Apy:
if gauge_reward_token == addresses[chain.id]['rkp3r_rewards']:
rKP3R_contract = interface.rKP3R(gauge_reward_token)
discount = rKP3R_contract.discount(block_identifier=block)
token_price = get_price(addresses[chain.id]['kp3r'], block=block) * discount / 100
token_price = get_price(addresses[chain.id]['kp3r'], block=block) * (100 - discount) / 100
else:
token_price = get_price(gauge_reward_token, block=block)
current_time = time() if block is None else get_block_timestamp(block)
Expand Down

0 comments on commit 6296ab8

Please sign in to comment.