Skip to content

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

Merged
merged 2 commits into from
Aug 19, 2025
Merged

feat: net apy #2582

merged 2 commits into from
Aug 19, 2025

Conversation

foodaka
Copy link
Collaborator

@foodaka foodaka commented Aug 12, 2025

General Changes

  • Adds combined net apy with merit program

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.

  • End-to-end tests are passing without any errors
  • Code changes do not significantly increase the application bundle size
  • If there are new 3rd-party packages, they do not introduce potential security threats
  • If there are new environment variables being added, they have been added to the .env.example file as well as the pertinant .github/actions/* files
  • There are no CI changes, or they have been approved by the DevOps and Engineering team(s)

Copy link

vercel bot commented Aug 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Project Deployment Preview Comments Updated (UTC)
interface Ready Preview Comment Aug 12, 2025 3:40pm

Copy link

Copy link

📦 Next.js Bundle Analysis for aave-ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

return data;
},
queryKey: ['userMeritIncentives', userAddress],
staleTime: 1000 * 60 * 5, // 5 minutes
Copy link
Contributor

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

Copy link
Collaborator Author

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) => {
Copy link
Contributor

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

Copy link
Collaborator

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?

Copy link
Contributor

@NandyBa NandyBa left a 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

Copy link

Copy link

📦 Next.js Bundle Analysis for aave-ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@foodaka
Copy link
Collaborator Author

foodaka commented Aug 12, 2025

@NandyBa i think its correct?
Screenshot 2025-08-12 at 16 51 21

@NandyBa
Copy link
Contributor

NandyBa commented Aug 14, 2025

APY for supply, near balance 52M$ is incorrect

@NandyBa
Copy link
Contributor

NandyBa commented Aug 14, 2025

Also miss net APY inclusing of Merkl incentive, like for USDe may you want to support it on an other PR

@foodaka foodaka merged commit d5c7dae into main Aug 19, 2025
17 of 18 checks passed
@foodaka foodaka deleted the fix/net-apy branch August 19, 2025 11:26
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

Successfully merging this pull request may close these issues.

4 participants