-
Notifications
You must be signed in to change notification settings - Fork 176
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
Fixing calculation of APY for farming validators #2538
base: master
Are you sure you want to change the base?
Fixing calculation of APY for farming validators #2538
Conversation
@askulikov please open a github ticket, so we keep this thread only for code review and implementation discussion. cc @agileurbanite for the allocation of this task |
@stefanopepe @esaminu, could you please describe the problem with APY? All calculations were done by the formulas provided earlier. Could you please check this, before we start?
The only thing, that I see now, is that the checks and rules might be incorrect. They were written by me at the beginning and I guess we have to review and fix them:
Could you please review this? |
+1 on the proposed fix (check only active farms + only tokens with an USD price). I am not sure we have the portion of code able to parse the USD value of fungible tokens. This may require some work on the contract helper side. |
@askulikov could you take a look at the comment here and see if the issue I described there will cause problems with APY calculations per-farm? I think it will. It seems like tracking some rewards by |
@MaximusHaximus It seems that without changes on the contract side, there is nothing to change on the frontend side. Because we can't calculate the correct values because of the lack of the correct data. And also it will be much more clear after clarifying the rules of calculation, which is described by @stefanopepe in this thread. Correct me if I'm wrong, please. I carefully re-read your comments a few times, and it looks like there aren't any options to fix this in the current implementation. Also, I let a small comment about calculating rewards just for clarifying in the thread |
👷 Deploy request for near-wallet-staging pending review.Visit the deploys page to approve it
|
The last commit just fixes the initial conditions for selecting farms. |
This branch was created for discussing and fixing the APY for farming validators.
Acceptance criteria:
@stefanopepe @esaminu