Skip to content

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)

@vercel
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

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}`);

@github-actions
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'

@vercel
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.

4 participants