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

[WEB-1259-203] fix: correct calculation of discounted rKP3R price #203

Merged
merged 1 commit into from
Jan 25, 2022

Conversation

dudesahn
Copy link
Collaborator

@dudesahn dudesahn commented Jan 25, 2022

We were calculating rKP3R discount incorrectly. Instead of using the rKP3R.discount() as the percentage that rKP3R discounted KP3R redemption price, we should actually be using 100 - rKP3R.discount(), since the discount represents the percentage of the real price that strike price is. At 50%, this didn't matter, so it was correct either way, but on the shift to 90%, it became incorrect.

In the past, CVX and CRV made up the vast majority of the APR for these vaults, so it wasn't clear that something was wrong. But with KP3R's recent moon and CVX and CRV crashing, the difference became noticeable.

@yearn-linear-gh-sync yearn-linear-gh-sync bot changed the title fix: correct calculation of discounted rKP3R price [WEB-1259-203] fix: correct calculation of discounted rKP3R price Jan 25, 2022
@dudesahn dudesahn requested review from banteg and jstashh January 25, 2022 04:31
@banteg banteg merged commit c3399eb into yearn:master Jan 25, 2022
mariuspod pushed a commit to BobTheBuidler/yearn-exporter that referenced this pull request Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants