-
Notifications
You must be signed in to change notification settings - Fork 427
feat: net apy #2582
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
feat: net apy #2582
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
📦 Next.js Bundle Analysis for aave-uiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
src/hooks/useUserMeritIncentives.ts
Outdated
return data; | ||
}, | ||
queryKey: ['userMeritIncentives', userAddress], | ||
staleTime: 1000 * 60 * 5, // 5 minutes |
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.
This is excessive, since APRs are typically updated twice a day and such frequency could lead to endpoint DDoS. Please set the value to 30 minutes or more
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.
updated in b762090
|
||
const url = 'https://apps.aavechan.com/api/merit/aprs'; | ||
|
||
export const useUserMeritIncentives = (userAddress?: string) => { |
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 recommend to use only a hook for Merit and for each MeritAction key take the userAPR and if not available general APR
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.
@NandyBa how often is the user apr data updated, would it be common that we might not have the users data from the api?
Also just wanted to clarify that the user apr would include any boosters or penalties applied based on the campaign rules right?
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.
Feel free to verify implementation with user that participate to Masiv incentive like 0x4B2cf5C94A88934870B523983B22e6d2dd1b6577
who participate to RLUSD incentive: https://apps.aavechan.com/merit/ethereum-supply-rlusd
As this user only hold aRLUSD and have no borrows he must have RLUSD yield + incentive as net APY
|
📦 Next.js Bundle Analysis for aave-uiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
@NandyBa i think its correct? |
APY for supply, near balance 52M$ is incorrect |
Also miss net APY inclusing of Merkl incentive, like for USDe may you want to support it on an other PR |
General Changes
Developer Notes
Add any notes here that may be helpful for reviewers.
Reviewer Checklist
Please ensure you, as the reviewer(s), have gone through this checklist to ensure that the code changes are ready to ship safely and to help mitigate any downstream issues that may occur.
.env.example
file as well as the pertinant.github/actions/*
files