Skip to content

Commit 4f4fe06

Browse files
authored
feat: add combined incentives - Merit part [skip cypress] (#2325)
1 parent a1ab68b commit 4f4fe06

File tree

3 files changed

+130
-3
lines changed

3 files changed

+130
-3
lines changed

public/icons/tokens/rez.svg

Lines changed: 1 addition & 0 deletions
Loading

src/components/incentives/IncentivesTooltipContent.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,21 @@ const IncentivesSymbolMap: {
4848
symbol: 'aPYUSD',
4949
aToken: true,
5050
},
51+
aArbWETH: {
52+
tokenIconSymbol: 'WETH',
53+
symbol: 'aWETH',
54+
aToken: true,
55+
},
56+
aArbwstETH: {
57+
tokenIconSymbol: 'wstETH',
58+
symbol: 'awstETH',
59+
aToken: true,
60+
},
61+
aBaswstETH: {
62+
tokenIconSymbol: 'wstETH',
63+
symbol: 'awstETH',
64+
aToken: true,
65+
},
5166
aAvaSAVAX: {
5267
tokenIconSymbol: 'sAVAX',
5368
symbol: 'asAVAX',

src/hooks/useMeritIncentives.ts

Lines changed: 114 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,30 @@
11
import { ProtocolAction } from '@aave/contract-helpers';
22
import { ReserveIncentiveResponse } from '@aave/math-utils/dist/esm/formatters/incentive/calculate-reserve-incentives';
3-
import { AaveV3Avalanche, AaveV3Base, AaveV3Ethereum } from '@bgd-labs/aave-address-book';
3+
import {
4+
AaveV3Arbitrum,
5+
AaveV3Avalanche,
6+
AaveV3Base,
7+
AaveV3Ethereum,
8+
AaveV3EthereumLido,
9+
} from '@bgd-labs/aave-address-book';
410
import { useQuery } from '@tanstack/react-query';
511
import { CustomMarket } from 'src/ui-config/marketsConfig';
612

713
export enum MeritAction {
814
ETHEREUM_STKGHO = 'ethereum-stkgho',
915
ETHEREUM_SUPPLY_PYUSD = 'ethereum-supply-pyusd',
1016
ETHEREUM_SUPPLY_ETHX = 'ethereum-supply-ethx',
17+
ETHEREUM_PRIME_SUPPLY_ETH = 'ethereum-prime-supply-weth',
18+
ETHEREUM_PRIME_SUPPLY_EZETH = 'ethereum-prime-supply-ezeth',
1119
SUPPLY_CBBTC_BORROW_USDC = 'ethereum-supply-cbbtc-borrow-usdc',
1220
SUPPLY_WBTC_BORROW_USDT = 'ethereum-supply-wbtc-borrow-usdt',
21+
ARBITRUM_SUPPLY_ETH = 'arbitrum-supply-weth',
22+
ARBITRUM_SUPPLY_WSTETH = 'arbitrum-supply-wsteth',
23+
ARBITRUM_SUPPLY_EZETH = 'arbitrum-supply-ezeth',
1324
BASE_SUPPLY_CBBTC = 'base-supply-cbbtc',
1425
BASE_SUPPLY_USDC = 'base-supply-usdc',
26+
BASE_SUPPLY_WSTETH = 'base-supply-wsteth',
27+
BASE_SUPPLY_EZETH = 'base-supply-ezeth',
1528
BASE_BORROW_USDC = 'base-borrow-usdc',
1629
AVALANCHE_SUPPLY_BTCB = 'avalanche-supply-btcb',
1730
AVALANCHE_SUPPLY_USDC = 'avalanche-supply-usdc',
@@ -44,6 +57,11 @@ export type MeritReserveIncentiveData = Omit<ReserveIncentiveResponse, 'incentiv
4457
const getMeritData = (market: string, symbol: string): MeritReserveIncentiveData[] | undefined =>
4558
MERIT_DATA_MAP[market]?.[symbol];
4659

60+
const antiLoopMessage =
61+
'Borrowing of some assets may impact the amount of rewards you are eligible for. Please check the forum post for the full eligibility criteria.';
62+
const joinedEthCorrelatedIncentiveForumLink =
63+
'https://governance.aave.com/t/arfc-set-aci-as-emission-manager-for-liquidity-mining-programs/17898/56';
64+
4765
const MERIT_DATA_MAP: Record<string, Record<string, MeritReserveIncentiveData[]>> = {
4866
[CustomMarket.proto_mainnet_v3]: {
4967
GHO: [
@@ -99,8 +117,7 @@ const MERIT_DATA_MAP: Record<string, Record<string, MeritReserveIncentiveData[]>
99117
protocolAction: ProtocolAction.supply,
100118
customForumLink:
101119
'https://governance.aave.com/t/arfc-pyusd-reserve-configuration-update-incentive-campaign/19573',
102-
customMessage:
103-
'Borrowing of some assets may impact the amount of rewards you are eligible for. Please check the forum post for the full eligibility criteria.',
120+
customMessage: antiLoopMessage,
104121
},
105122
],
106123
ETHx: [
@@ -112,6 +129,80 @@ const MERIT_DATA_MAP: Record<string, Record<string, MeritReserveIncentiveData[]>
112129
},
113130
],
114131
},
132+
[CustomMarket.proto_lido_v3]: {
133+
ETH: [
134+
{
135+
action: MeritAction.ETHEREUM_PRIME_SUPPLY_ETH,
136+
rewardTokenAddress: AaveV3EthereumLido.ASSETS.WETH.A_TOKEN,
137+
rewardTokenSymbol: 'aEthLidoWETH',
138+
protocolAction: ProtocolAction.supply,
139+
customMessage: antiLoopMessage,
140+
customForumLink: joinedEthCorrelatedIncentiveForumLink,
141+
},
142+
],
143+
WETH: [
144+
{
145+
action: MeritAction.ETHEREUM_PRIME_SUPPLY_ETH,
146+
rewardTokenAddress: AaveV3EthereumLido.ASSETS.WETH.A_TOKEN,
147+
rewardTokenSymbol: 'aEthLidoWETH',
148+
protocolAction: ProtocolAction.supply,
149+
customMessage: antiLoopMessage,
150+
customForumLink: joinedEthCorrelatedIncentiveForumLink,
151+
},
152+
],
153+
ezETH: [
154+
{
155+
action: MeritAction.ETHEREUM_PRIME_SUPPLY_EZETH,
156+
rewardTokenAddress: '0x3B50805453023a91a8bf641e279401a0b23FA6F9', // Renzo (REZ)
157+
rewardTokenSymbol: 'REZ',
158+
protocolAction: ProtocolAction.supply,
159+
customMessage: antiLoopMessage,
160+
customForumLink: joinedEthCorrelatedIncentiveForumLink,
161+
},
162+
],
163+
},
164+
[CustomMarket.proto_arbitrum_v3]: {
165+
ETH: [
166+
{
167+
action: MeritAction.ARBITRUM_SUPPLY_ETH,
168+
rewardTokenAddress: AaveV3Arbitrum.ASSETS.WETH.A_TOKEN,
169+
rewardTokenSymbol: 'aArbWETH',
170+
protocolAction: ProtocolAction.supply,
171+
customMessage: antiLoopMessage,
172+
customForumLink: joinedEthCorrelatedIncentiveForumLink,
173+
},
174+
],
175+
WETH: [
176+
{
177+
action: MeritAction.ARBITRUM_SUPPLY_ETH,
178+
rewardTokenAddress: AaveV3Arbitrum.ASSETS.WETH.A_TOKEN,
179+
rewardTokenSymbol: 'aArbWETH',
180+
protocolAction: ProtocolAction.supply,
181+
customMessage: antiLoopMessage,
182+
customForumLink: joinedEthCorrelatedIncentiveForumLink,
183+
},
184+
],
185+
wstETH: [
186+
{
187+
action: MeritAction.ARBITRUM_SUPPLY_WSTETH,
188+
rewardTokenAddress: AaveV3Ethereum.ASSETS.wstETH.UNDERLYING,
189+
rewardTokenSymbol: 'aArbwstETH',
190+
protocolAction: ProtocolAction.supply,
191+
customMessage: antiLoopMessage,
192+
customForumLink: joinedEthCorrelatedIncentiveForumLink,
193+
},
194+
],
195+
ezETH: [
196+
{
197+
action: MeritAction.ARBITRUM_SUPPLY_EZETH,
198+
rewardTokenAddress: '0x3B50805453023a91a8bf641e279401a0b23FA6F9', // Renzo (REZ)
199+
rewardTokenSymbol: 'REZ',
200+
protocolAction: ProtocolAction.supply,
201+
customMessage: antiLoopMessage,
202+
customForumLink: joinedEthCorrelatedIncentiveForumLink,
203+
},
204+
],
205+
},
115206
[CustomMarket.proto_base_v3]: {
116207
cbBTC: [
117208
{
@@ -135,6 +226,26 @@ const MERIT_DATA_MAP: Record<string, Record<string, MeritReserveIncentiveData[]>
135226
protocolAction: ProtocolAction.borrow,
136227
},
137228
],
229+
wstETH: [
230+
{
231+
action: MeritAction.BASE_SUPPLY_WSTETH,
232+
rewardTokenAddress: AaveV3Base.ASSETS.wstETH.UNDERLYING,
233+
rewardTokenSymbol: 'aBaswstETH',
234+
protocolAction: ProtocolAction.supply,
235+
customMessage: antiLoopMessage,
236+
customForumLink: joinedEthCorrelatedIncentiveForumLink,
237+
},
238+
],
239+
ezETH: [
240+
{
241+
action: MeritAction.BASE_SUPPLY_EZETH,
242+
rewardTokenAddress: '0x3B50805453023a91a8bf641e279401a0b23FA6F9', // Renzo (REZ)
243+
rewardTokenSymbol: 'REZ',
244+
protocolAction: ProtocolAction.supply,
245+
customMessage: antiLoopMessage,
246+
customForumLink: joinedEthCorrelatedIncentiveForumLink,
247+
},
248+
],
138249
},
139250
[CustomMarket.proto_avalanche_v3]: {
140251
['BTC.b']: [

0 commit comments

Comments
 (0)