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

Add support for non-interest-bearing assets #2

Open
d1ll0n opened this issue May 31, 2021 · 0 comments
Open

Add support for non-interest-bearing assets #2

d1ll0n opened this issue May 31, 2021 · 0 comments

Comments

@d1ll0n
Copy link
Contributor

d1ll0n commented May 31, 2021

Add support for wrapper tokens with a variable conversion rate.

  • Store records of the conversion rate with timestamps.
  • On a new record being written, take the difference in conversion rate and calculate the average growth per second.
    • Enforce a minimum delay between updates to ensure this isn't manipulated in short time spans.
  • Extrapolate growth per token per second to a year.

e.g.
Yearn token has pricePerFullShare of 1e18 today, and 1.005e18 in 10 days. This is a growth of 0.5% in 10 days, making the average interest per second 8.267195767195768e-7 %. Extrapolated to a year, that's 26% APY.

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

No branches or pull requests

1 participant