-
Notifications
You must be signed in to change notification settings - Fork 427
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 up all external incentive APYs for a specific duration #916
Add up all external incentive APYs for a specific duration #916
Conversation
@srph is attempting to deploy a commit to the OsmoLabs Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@jonator Some updates:
All in all, I think it should've kept the first commit's behavior: Let me know if there's anything I may have missed. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry noticed one more thing. Should be good after that.
const observableGauge = this.queryGauge.get(gaugeId); | ||
|
||
if ( | ||
duration.asMilliseconds() !== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm realizing that since we take in the gaugeId, there's no real reason to take in the duration as well and perform this check. Can we remove the duration from the params?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonator Good catch, working on it =D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make sure the comment/docs is updated as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the main reason why we need duration is - on the pool page - we're simply iterating through the ExternalIncentiveGaugeAllowList[pool.id]
(which would contain all gauges regardless of gauge)
Would you like me to move the duration checking there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we'd need to. I think we agree though it's a pointless constraint on anyone who wants to use this API to find the gauge's duration before being able to use the API.
Thanks for the review. Let me know if there's anything else I might have missed @jonator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Appreciate it
In continuation of #886, this gets the sum of all external incentive APYs for the given duration rather than just calculating it from the first incentive.