From 1d56890ac81647b9dd754cdcd4217b5b3781bee3 Mon Sep 17 00:00:00 2001 From: MartinGbz Date: Mon, 28 Oct 2024 15:22:28 +0100 Subject: [PATCH 1/4] feat: add new merit incentives --- .../incentives/IncentivesTooltipContent.tsx | 5 +++++ src/hooks/useMeritIncentives.ts | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/components/incentives/IncentivesTooltipContent.tsx b/src/components/incentives/IncentivesTooltipContent.tsx index 9b1251245a..ce77fc87e5 100644 --- a/src/components/incentives/IncentivesTooltipContent.tsx +++ b/src/components/incentives/IncentivesTooltipContent.tsx @@ -38,6 +38,11 @@ const IncentivesSymbolMap: { symbol: 'aUSDC', aToken: true, }, + aEthUSDT: { + tokenIconSymbol: 'USDT', + symbol: 'aUSDT', + aToken: true, + }, }; interface IncentivesTooltipContentProps { diff --git a/src/hooks/useMeritIncentives.ts b/src/hooks/useMeritIncentives.ts index 0fe39bce01..50371ed092 100644 --- a/src/hooks/useMeritIncentives.ts +++ b/src/hooks/useMeritIncentives.ts @@ -7,6 +7,7 @@ import { CustomMarket } from 'src/ui-config/marketsConfig'; export enum MeritAction { ETHEREUM_STKGHO = 'ethereum-stkgho', SUPPLY_CBBTC_BORROW_USDC = 'ethereum-supply-cbbtc-borrow-usdc', + SUPPLY_WBTC_BORROW_USDT = 'ethereum-supply-wbtc-borrow-usdt', } type MeritIncentives = { @@ -52,6 +53,20 @@ const MERIT_DATA_MAP: Record> protocolAction: ProtocolAction.borrow, customMessage: 'You must supply cbBTC and borrow USDC in order to receive merit rewards.', }, + wBTC: { + action: MeritAction.SUPPLY_WBTC_BORROW_USDT, + rewardTokenAddress: AaveV3Ethereum.ASSETS.USDT.A_TOKEN, + rewardTokenSymbol: 'aEthUSDT', + protocolAction: ProtocolAction.supply, + customMessage: 'You must supply wBTC and borrow USDT in order to receive merit rewards.', + }, + USDT: { + action: MeritAction.SUPPLY_WBTC_BORROW_USDT, + rewardTokenAddress: AaveV3Ethereum.ASSETS.USDT.A_TOKEN, + rewardTokenSymbol: 'aEthUSDT', + protocolAction: ProtocolAction.borrow, + customMessage: 'You must supply cbBTC and borrow USDT in order to receive merit rewards.', + }, }, }; From da5594d6fd524e04215c9dd6f9e895ad7b004906 Mon Sep 17 00:00:00 2001 From: MartinGbz Date: Mon, 28 Oct 2024 15:27:53 +0100 Subject: [PATCH 2/4] fix: wbtc symbol --- src/hooks/useMeritIncentives.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/useMeritIncentives.ts b/src/hooks/useMeritIncentives.ts index 50371ed092..3036179bff 100644 --- a/src/hooks/useMeritIncentives.ts +++ b/src/hooks/useMeritIncentives.ts @@ -53,7 +53,7 @@ const MERIT_DATA_MAP: Record> protocolAction: ProtocolAction.borrow, customMessage: 'You must supply cbBTC and borrow USDC in order to receive merit rewards.', }, - wBTC: { + WBTC: { action: MeritAction.SUPPLY_WBTC_BORROW_USDT, rewardTokenAddress: AaveV3Ethereum.ASSETS.USDT.A_TOKEN, rewardTokenSymbol: 'aEthUSDT', From cc9f830cf503196316e966904269c61ee0a50356 Mon Sep 17 00:00:00 2001 From: MartinGbz Date: Mon, 28 Oct 2024 15:30:26 +0100 Subject: [PATCH 3/4] chore: mock new action aprs --- src/hooks/useMeritIncentives.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/hooks/useMeritIncentives.ts b/src/hooks/useMeritIncentives.ts index 3036179bff..8223cb45f0 100644 --- a/src/hooks/useMeritIncentives.ts +++ b/src/hooks/useMeritIncentives.ts @@ -98,7 +98,11 @@ export const useMeritIncentives = ({ return null; } - const APR = data.actionsAPR[meritReserveIncentiveData.action]; + const APR = + meritReserveIncentiveData.action == MeritAction.SUPPLY_WBTC_BORROW_USDT + ? 5 + : data.actionsAPR[meritReserveIncentiveData.action]; + return { incentiveAPR: (APR / 100).toString(), rewardTokenAddress: meritReserveIncentiveData.rewardTokenAddress, From df788e7b02a8a0e18f6a6b997c4b9e2dc8cb7bf3 Mon Sep 17 00:00:00 2001 From: MartinGbz Date: Tue, 29 Oct 2024 23:44:50 +0100 Subject: [PATCH 4/4] chore: remove mock --- src/hooks/useMeritIncentives.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/hooks/useMeritIncentives.ts b/src/hooks/useMeritIncentives.ts index 8223cb45f0..27fa779e4e 100644 --- a/src/hooks/useMeritIncentives.ts +++ b/src/hooks/useMeritIncentives.ts @@ -98,10 +98,7 @@ export const useMeritIncentives = ({ return null; } - const APR = - meritReserveIncentiveData.action == MeritAction.SUPPLY_WBTC_BORROW_USDT - ? 5 - : data.actionsAPR[meritReserveIncentiveData.action]; + const APR = data.actionsAPR[meritReserveIncentiveData.action]; return { incentiveAPR: (APR / 100).toString(),