From f292b0d2c2b0999d238763055054e42f475bf3ae Mon Sep 17 00:00:00 2001 From: MartinGbz Date: Fri, 20 Jun 2025 19:29:45 +0200 Subject: [PATCH 1/7] feat: implement weeth usdc campaign --- public/icons/tokens/ethfi.svg | 1 + src/hooks/useMeritIncentives.ts | 45 +++++++++++++++++++++++---------- 2 files changed, 33 insertions(+), 13 deletions(-) create mode 100644 public/icons/tokens/ethfi.svg diff --git a/public/icons/tokens/ethfi.svg b/public/icons/tokens/ethfi.svg new file mode 100644 index 0000000000..7e60310d27 --- /dev/null +++ b/public/icons/tokens/ethfi.svg @@ -0,0 +1 @@ + diff --git a/src/hooks/useMeritIncentives.ts b/src/hooks/useMeritIncentives.ts index ce5490935d..3b77a35e86 100644 --- a/src/hooks/useMeritIncentives.ts +++ b/src/hooks/useMeritIncentives.ts @@ -22,6 +22,7 @@ export enum MeritAction { ETHEREUM_PRIME_SUPPLY_EZETH = 'ethereum-prime-supply-ezeth', SUPPLY_CBBTC_BORROW_USDC = 'ethereum-supply-cbbtc-borrow-usdc', SUPPLY_WBTC_BORROW_USDT = 'ethereum-supply-wbtc-borrow-usdt', + SUPPLY_WEETH_BORROW_USDC = 'ethereum-supply-weeth-borrow-usdc', ARBITRUM_SUPPLY_ETH = 'arbitrum-supply-weth', ARBITRUM_SUPPLY_WSTETH = 'arbitrum-supply-wsteth', ARBITRUM_SUPPLY_EZETH = 'arbitrum-supply-ezeth', @@ -115,22 +116,30 @@ const MERIT_DATA_MAP: Record 'https://governance.aave.com/t/arfc-merit-a-new-aave-alignment-user-reward-system/16646', }, ], - cbBTC: [ - { - action: MeritAction.SUPPLY_CBBTC_BORROW_USDC, - rewardTokenAddress: AaveV3Ethereum.ASSETS.USDC.A_TOKEN, - rewardTokenSymbol: 'aEthUSDC', - protocolAction: ProtocolAction.supply, - customMessage: 'You must supply cbBTC and borrow USDC in order to receive merit rewards.', - }, - ], + // cbBTC: [ + // { + // action: MeritAction.SUPPLY_CBBTC_BORROW_USDC, + // rewardTokenAddress: AaveV3Ethereum.ASSETS.USDC.A_TOKEN, + // rewardTokenSymbol: 'aEthUSDC', + // protocolAction: ProtocolAction.supply, + // customMessage: 'You must supply cbBTC and borrow USDC in order to receive merit rewards.', + // }, + // ], USDC: [ - { - action: MeritAction.SUPPLY_CBBTC_BORROW_USDC, + // { + // action: MeritAction.SUPPLY_CBBTC_BORROW_USDC, + // rewardTokenAddress: AaveV3Ethereum.ASSETS.USDC.A_TOKEN, + // rewardTokenSymbol: 'aEthUSDC', + // protocolAction: ProtocolAction.borrow, + // customMessage: 'You must supply cbBTC and borrow USDC in order to receive merit rewards.', + // }, + { + action: MeritAction.SUPPLY_WEETH_BORROW_USDC, rewardTokenAddress: AaveV3Ethereum.ASSETS.USDC.A_TOKEN, - rewardTokenSymbol: 'aEthUSDC', + rewardTokenSymbol: 'ETHFI', protocolAction: ProtocolAction.borrow, - customMessage: 'You must supply cbBTC and borrow USDC in order to receive merit rewards.', + customMessage: + 'You must supply weETH and borrow USDC in order to receive merit rewards. Only the new USDC debt holders are eligible for the rewards.', }, ], WBTC: [ @@ -181,6 +190,16 @@ const MERIT_DATA_MAP: Record 'https://governance.aave.com/t/arfc-set-aci-as-emission-manager-for-liquidity-mining-programs/17898/85', }, ], + weETH: [ + { + action: MeritAction.SUPPLY_WEETH_BORROW_USDC, + rewardTokenAddress: AaveV3Ethereum.ASSETS.weETH.A_TOKEN, + rewardTokenSymbol: 'ETHFI', + protocolAction: ProtocolAction.supply, + customMessage: + 'You must supply weETH and borrow USDC in order to receive merit rewards. Only the new USDC debt holders are eligible for the rewards.', + }, + ], }, [CustomMarket.proto_lido_v3]: { ETH: [ From dd5b35822b8c96588d505a402c104bb8cece7f93 Mon Sep 17 00:00:00 2001 From: MartinGbz Date: Fri, 20 Jun 2025 19:36:30 +0200 Subject: [PATCH 2/7] fix: customMessage --- src/hooks/useMeritIncentives.ts | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/hooks/useMeritIncentives.ts b/src/hooks/useMeritIncentives.ts index 3b77a35e86..e124b1a814 100644 --- a/src/hooks/useMeritIncentives.ts +++ b/src/hooks/useMeritIncentives.ts @@ -139,7 +139,7 @@ const MERIT_DATA_MAP: Record rewardTokenSymbol: 'ETHFI', protocolAction: ProtocolAction.borrow, customMessage: - 'You must supply weETH and borrow USDC in order to receive merit rewards. Only the new USDC debt holders are eligible for the rewards.', + 'You must supply weETH and borrow USDC in order to receive merit rewards. Only new USDC debt holders are eligible for rewards.', }, ], WBTC: [ @@ -197,7 +197,7 @@ const MERIT_DATA_MAP: Record rewardTokenSymbol: 'ETHFI', protocolAction: ProtocolAction.supply, customMessage: - 'You must supply weETH and borrow USDC in order to receive merit rewards. Only the new USDC debt holders are eligible for the rewards.', + 'You must supply weETH and borrow USDC in order to receive merit rewards. Only new USDC debt holders are eligible for rewards.', }, ], }, @@ -545,7 +545,18 @@ export const useMeritIncentives = ({ const data = await response.json(); const meritIncentives = data.currentAPR as MeritIncentives; - return meritIncentives; + const meritIncentivesUpdated = { + ...meritIncentives, + actionsAPR: { + ...meritIncentives.actionsAPR, + [MeritAction.SUPPLY_WEETH_BORROW_USDC]: 2, + }, + }; + + console.log('meritIncentivesUpdated'); + console.log(meritIncentivesUpdated); + + return meritIncentivesUpdated; }, queryKey: ['meritIncentives'], staleTime: 1000 * 60 * 5, From 85d79b725b9699b2544d02fe1785e46289f2ff28 Mon Sep 17 00:00:00 2001 From: MartinGbz Date: Wed, 25 Jun 2025 09:52:56 +0200 Subject: [PATCH 3/7] fix: remove hardcode --- src/hooks/useMeritIncentives.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/hooks/useMeritIncentives.ts b/src/hooks/useMeritIncentives.ts index e124b1a814..85e291a305 100644 --- a/src/hooks/useMeritIncentives.ts +++ b/src/hooks/useMeritIncentives.ts @@ -545,18 +545,7 @@ export const useMeritIncentives = ({ const data = await response.json(); const meritIncentives = data.currentAPR as MeritIncentives; - const meritIncentivesUpdated = { - ...meritIncentives, - actionsAPR: { - ...meritIncentives.actionsAPR, - [MeritAction.SUPPLY_WEETH_BORROW_USDC]: 2, - }, - }; - - console.log('meritIncentivesUpdated'); - console.log(meritIncentivesUpdated); - - return meritIncentivesUpdated; + return meritIncentives; }, queryKey: ['meritIncentives'], staleTime: 1000 * 60 * 5, From c6e70dd15444633efa710d1ca4c9976d0fd24b55 Mon Sep 17 00:00:00 2001 From: MartinGbz Date: Thu, 26 Jun 2025 16:25:31 +0200 Subject: [PATCH 4/7] fix: message --- src/hooks/useMeritIncentives.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/hooks/useMeritIncentives.ts b/src/hooks/useMeritIncentives.ts index 85e291a305..06afb6023e 100644 --- a/src/hooks/useMeritIncentives.ts +++ b/src/hooks/useMeritIncentives.ts @@ -88,6 +88,9 @@ const antiLoopBorrowMessage = const lbtcCbbtcCampaignMessage = 'You must supply LBTC and borrow cbBTC, while maintaining a health factor of 1.5 or below, in order to receive merit rewards. Please check the forum post for the full eligibility criteria.'; +const weethUsdcCampaignMessage = + 'You must supply weETH and borrow USDC, while maintaining a health factor of 2 or below, in order to receive merit rewards. Only the new debt is eligible for rewards. Eligibility criteria for this campaign are different from usual, please refer to the forum post for full details.'; + const joinedEthCorrelatedIncentiveForumLink = 'https://governance.aave.com/t/arfc-set-aci-as-emission-manager-for-liquidity-mining-programs/17898/56'; @@ -138,8 +141,7 @@ const MERIT_DATA_MAP: Record rewardTokenAddress: AaveV3Ethereum.ASSETS.USDC.A_TOKEN, rewardTokenSymbol: 'ETHFI', protocolAction: ProtocolAction.borrow, - customMessage: - 'You must supply weETH and borrow USDC in order to receive merit rewards. Only new USDC debt holders are eligible for rewards.', + customMessage: weethUsdcCampaignMessage, }, ], WBTC: [ @@ -196,8 +198,7 @@ const MERIT_DATA_MAP: Record rewardTokenAddress: AaveV3Ethereum.ASSETS.weETH.A_TOKEN, rewardTokenSymbol: 'ETHFI', protocolAction: ProtocolAction.supply, - customMessage: - 'You must supply weETH and borrow USDC in order to receive merit rewards. Only new USDC debt holders are eligible for rewards.', + customMessage: weethUsdcCampaignMessage, }, ], }, From 8fd9adee64d8e144a71266d5308ee256d15dd2bf Mon Sep 17 00:00:00 2001 From: MartinGbz Date: Thu, 26 Jun 2025 16:33:59 +0200 Subject: [PATCH 5/7] fix: message --- src/hooks/useMeritIncentives.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/hooks/useMeritIncentives.ts b/src/hooks/useMeritIncentives.ts index 06afb6023e..98e53bd97a 100644 --- a/src/hooks/useMeritIncentives.ts +++ b/src/hooks/useMeritIncentives.ts @@ -89,7 +89,7 @@ const lbtcCbbtcCampaignMessage = 'You must supply LBTC and borrow cbBTC, while maintaining a health factor of 1.5 or below, in order to receive merit rewards. Please check the forum post for the full eligibility criteria.'; const weethUsdcCampaignMessage = - 'You must supply weETH and borrow USDC, while maintaining a health factor of 2 or below, in order to receive merit rewards. Only the new debt is eligible for rewards. Eligibility criteria for this campaign are different from usual, please refer to the forum post for full details.'; + 'You must supply weETH and borrow new USDC, while maintaining a health factor of 2 or below, in order to receive merit rewards. Eligibility criteria for this campaign are different from usual, please refer to the forum post for full details.'; const joinedEthCorrelatedIncentiveForumLink = 'https://governance.aave.com/t/arfc-set-aci-as-emission-manager-for-liquidity-mining-programs/17898/56'; @@ -546,7 +546,18 @@ export const useMeritIncentives = ({ const data = await response.json(); const meritIncentives = data.currentAPR as MeritIncentives; - return meritIncentives; + const meritIncentivesUpdated = { + ...meritIncentives, + actionsAPR: { + ...meritIncentives.actionsAPR, + [MeritAction.SUPPLY_WEETH_BORROW_USDC]: 2, + }, + }; + + console.log('meritIncentivesUpdated'); + console.log(meritIncentivesUpdated); + + return meritIncentivesUpdated; }, queryKey: ['meritIncentives'], staleTime: 1000 * 60 * 5, From d6a6598e1468e8ddfb6a1ef563bf1ff6a05469f5 Mon Sep 17 00:00:00 2001 From: MartinGbz Date: Thu, 26 Jun 2025 16:39:02 +0200 Subject: [PATCH 6/7] feat: add governance forum link --- src/hooks/useMeritIncentives.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/hooks/useMeritIncentives.ts b/src/hooks/useMeritIncentives.ts index 98e53bd97a..8f83aa685d 100644 --- a/src/hooks/useMeritIncentives.ts +++ b/src/hooks/useMeritIncentives.ts @@ -108,6 +108,9 @@ const AvalancheRenewalForumLink = const lbtcCbbtcForumLink = 'https://governance.aave.com/t/arfc-set-aci-as-emission-manager-for-liquidity-mining-programs/17898/91'; +const weethUsdcForumLink = + 'https://governance.aave.com/t/arfc-set-aci-as-emission-manager-for-liquidity-mining-programs/17898/120'; + const MERIT_DATA_MAP: Record> = { [CustomMarket.proto_mainnet_v3]: { GHO: [ @@ -142,6 +145,7 @@ const MERIT_DATA_MAP: Record rewardTokenSymbol: 'ETHFI', protocolAction: ProtocolAction.borrow, customMessage: weethUsdcCampaignMessage, + customForumLink: weethUsdcForumLink, }, ], WBTC: [ @@ -199,6 +203,7 @@ const MERIT_DATA_MAP: Record rewardTokenSymbol: 'ETHFI', protocolAction: ProtocolAction.supply, customMessage: weethUsdcCampaignMessage, + customForumLink: weethUsdcForumLink, }, ], }, From 8cd95c8724a0d94cac78682da54eb066ee620620 Mon Sep 17 00:00:00 2001 From: MartinGbz Date: Thu, 26 Jun 2025 21:32:39 +0200 Subject: [PATCH 7/7] fix: re-remove hardcode --- src/hooks/useMeritIncentives.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/hooks/useMeritIncentives.ts b/src/hooks/useMeritIncentives.ts index 8f83aa685d..5c11cac370 100644 --- a/src/hooks/useMeritIncentives.ts +++ b/src/hooks/useMeritIncentives.ts @@ -551,18 +551,7 @@ export const useMeritIncentives = ({ const data = await response.json(); const meritIncentives = data.currentAPR as MeritIncentives; - const meritIncentivesUpdated = { - ...meritIncentives, - actionsAPR: { - ...meritIncentives.actionsAPR, - [MeritAction.SUPPLY_WEETH_BORROW_USDC]: 2, - }, - }; - - console.log('meritIncentivesUpdated'); - console.log(meritIncentivesUpdated); - - return meritIncentivesUpdated; + return meritIncentives; }, queryKey: ['meritIncentives'], staleTime: 1000 * 60 * 5,