-
Notifications
You must be signed in to change notification settings - Fork 402
✨ Refactor and Improve all incentives #2308
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
base: main
Are you sure you want to change the base?
✨ Refactor and Improve all incentives #2308
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@MartinGbz is attempting to deploy a commit to the Avara Team on Vercel. A member of the Team first needs to authorize it. |
…e it from the asset name
General Changes
This PR adds all the incentives (lm, merit, zksync ignite) on all remaining, ie:
It also add 2 new compoenent for:
This allows to centralized every points/external incentives display at the same place.
I also now specify the chain in the key of Set/Map for these component, because it can happen sometimes that different tokens can have the same address (Example: aAvaSAvax === aArbWstETH). So this prevent from this issue.
It also adds a new component that batch incentives APRs when multiple (2 or more) are available for an asset. This new component display the sum of all the incentives APRs. I decided to only batch APRs incentives and not points & "external simple incentives" in order to highlight them way better (so you have: the aprs, the points, and the others). This means the maximum number of tooltips we can expected below the Supply/Borrow rate will be 3 (which I think is acceptable).
It also fix 3 issues:
It also fix the forum post link of Sonic USDC.e Merit incentives
You can test all the cases on all Modals/Infos by mocking API returns.
Here's a few screenshots of the preview (I added a Merit incentive on USDS supply + borrow, and a ZKSync Ignite incentives on USDS supply):
Markets (showcase the new apr batched tooltip unfolded):
Supply Info:
Switch Supply Modal:
Switch Debt Modal:
Supply Modal:
Borrow Modal:
Developer Notes
Created a new
IncentivesBox
component that can be used everywhere in the app.So we only need to define any new incentive type in this component, and it will be display everywhere else.
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