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

Pool APY #25

Open
TCGV opened this issue Nov 17, 2021 · 1 comment
Open

Pool APY #25

TCGV opened this issue Nov 17, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@TCGV
Copy link
Member

TCGV commented Nov 17, 2021

The Annual percentage yield of the liquidity pool can be calculated by the following formula:

APY = [pool_yield ^(365 / term_in_days) - 1] * 100

Where pool_yield is the value returned from the liquidity pool function of same name specifying the time since the start of the term period in seconds.

For instance, considering that the pool was deployed 20 days ago, which amounts to 1728000 seconds, the pool yield results in 1.262599536 (equivalent to 26.2599536%):

Then, the APY would be:

APY = [1.262599536 ^(365 / 20) - 1] * 100

APY = 6949 %

@TCGV
Copy link
Member Author

TCGV commented Nov 17, 2021

Obs: Since APY can vary a lot in the first weeks of operation of the pool, maybe we could display both the "Yield Since Start" and in the next line the "APY" in the Liquidity Pool page of the frontend app so users can get a better grasp of the pool's performance.

@TCGV TCGV added the enhancement New feature or request label Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant