Skip to content

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

Merged
merged 12 commits into from
Jul 12, 2025

Conversation

MartinGbz
Copy link
Contributor

@MartinGbz MartinGbz commented Jun 25, 2025

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:

// if (opportunity.status !== OpportunityStatus.LIVE) {
//   return null;
// }

if (opportunity.apr <= 0) {
  // return null;
  opportunity.apr = 99;
}

This will hardcode a 99% APR on all asset that are previously incentivized on Merkl

Here's the result:

Capture d’écran 2025-06-25 à 15 50 52


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)

Sorry, something went wrong.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Copy link

vercel bot commented Jun 25, 2025

@MartinGbz is attempting to deploy a commit to the Avara Team on Vercel.

A member of the Team first needs to authorize it.

@MartinGbz MartinGbz marked this pull request as ready for review June 30, 2025 08:28
NandyBa added 3 commits July 7, 2025 17:10

const whitelistedRewardTokens = allAaveAssets.flatMap((assets) => getUnderlyingAndAToken(assets));

const url = 'https://api.merkl.xyz/v4/opportunities?mainProtocolId=aave'; // Merkl API
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

} else {
return [];
}
const response = await fetch(`${url}`);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const response = await fetch(`${url}`);
const response = await fetch(`${MERKL_ENDPOINT}`);

Copy link

github-actions bot commented Jul 11, 2025

❌ CI run has failed!
Please see logs at https://github.com/aave/interface/actions/runs/16224385549'

Copy link

vercel bot commented Jul 11, 2025

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

Name Status Preview Comments Updated (UTC)
interface ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 11, 2025 5:59pm

@foodaka foodaka merged commit fa0d774 into aave:main Jul 12, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants