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

fix: correct vault apr calculation #693

Merged
merged 4 commits into from
Oct 1, 2024
Merged

Conversation

tyleroooo
Copy link
Contributor

Should be 30d return but extrapolated to 1 year

@@ -135,7 +140,7 @@ object VaultCalculator {

return VaultDetails(
totalValue = totalValue,
thirtyDayReturnPercent = thirtyDayReturnPercent,
thirtyDayReturnPercent = thirtyDayReturnPercent * 365.days.inWholeMilliseconds / timeDifferenceMs,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to check timeDifferenceMs is zero.

ruixhuang
ruixhuang previously approved these changes Oct 1, 2024
@tyleroooo tyleroooo merged commit 82e1128 into main Oct 1, 2024
3 checks passed
@tyleroooo tyleroooo deleted the tu/calculate-correctly branch October 1, 2024 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants