-
Notifications
You must be signed in to change notification settings - Fork 429
Implement a new Merkl incentives tooltip #2516
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
Implement a new Merkl incentives tooltip #2516
Conversation
@MartinGbz is attempting to deploy a commit to the Avara Team on Vercel. A member of the Team first needs to authorize it. |
src/hooks/useMerklIncentives.ts
Outdated
|
||
const whitelistedRewardTokens = allAaveAssets.flatMap((assets) => getUnderlyingAndAToken(assets)); | ||
|
||
const url = 'https://api.merkl.xyz/v4/opportunities?mainProtocolId=aave'; // Merkl API |
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.
const url = 'https://api.merkl.xyz/v4/opportunities?mainProtocolId=aave'; // Merkl API | |
const MERKL_ENDPOINT = 'https://api.merkl.xyz/v4/opportunities?mainProtocolId=aave'; // Merkl API |
src/hooks/useMerklIncentives.ts
Outdated
} else { | ||
return []; | ||
} | ||
const response = await fetch(`${url}`); |
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.
const response = await fetch(`${url}`); | |
const response = await fetch(`${MERKL_ENDPOINT}`); |
❌ CI run has failed! |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
General Changes
This PR adds a new Merkl incentives tooltip: it allows to display all Aave incentives created on Merkl.
We will need this, because a Ethena USDtb incentive campaign will start soon, and Merkl manage the implementation.
A
whtelistedRewardTokens
has been created to only display incentives that are underlying or A tokens already implemented on Aave. This avoid displaying a random campaign with a random reward token that someone distribute. Even if reward token are already whitelisted on Merkl side, but this act as a double security.Also we added the aUSDtb to the symbolMap in order to have the icon well displayed for the incentives.
This PR remove the ZKSync Ignite tooltip which has 99% the same logic than Merkl tooltip, because ZkSync Ignite was built by Merkl. It has to be removed because otherwise we would have a double tooltip display on ZKSync incentives case. Indeed the only way to differentiate a ZKSync Ignite incentives from a ""normal"" Merkl incentives was just to filter Merkl incentives by the ZKSync chain. If they decide to relaunch the program, we'll then ask the Merkl team to come up with a way of differentiating these incentives. In the meantime, the better is to just remove it (in any case now, every Merkl incentives, ZKSync ignite or ont, will be displayed).
Developer Notes
In order to test the implementation you can do this update in the
useMerklincentives.ts
file:This will hardcode a 99% APR on all asset that are previously incentivized on Merkl
Here's the result:
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