Skip to content

Commit 681a94c

Browse files
authored
feat: add pyusd Merit campaign [skip cypress] (#2269)
1 parent d5a9402 commit 681a94c

File tree

5 files changed

+30
-5
lines changed

5 files changed

+30
-5
lines changed

src/components/incentives/IncentivesTooltipContent.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ const IncentivesSymbolMap: {
4343
symbol: 'aUSDT',
4444
aToken: true,
4545
},
46+
aEthPYUSD: {
47+
tokenIconSymbol: 'PYUSD',
48+
symbol: 'aPYUSD',
49+
aToken: true,
50+
},
4651
aAvaSAVAX: {
4752
tokenIconSymbol: 'sAVAX',
4853
symbol: 'asAVAX',

src/components/incentives/MeritIncentivesTooltipContent.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const MeritIncentivesTooltipContent = ({
2727
}}
2828
>
2929
<Typography variant="caption" color="text.primary" mb={3}>
30-
<Trans>Eligible for the merit program.</Trans>
30+
<Trans>Eligible for the Merit program.</Trans>
3131
</Typography>
3232

3333
<Typography variant="caption" color="text.secondary" mb={3}>
@@ -36,7 +36,11 @@ export const MeritIncentivesTooltipContent = ({
3636
does not guarantee the program and accepts no liability.
3737
</Trans>{' '}
3838
<Link
39-
href="https://governance.aave.com/t/arfc-merit-a-new-aave-alignment-user-reward-system/16646"
39+
href={
40+
meritIncentives.customForumLink
41+
? meritIncentives.customForumLink
42+
: 'https://governance.aave.com/t/arfc-merit-a-new-aave-alignment-user-reward-system/16646'
43+
}
4044
sx={{ textDecoration: 'underline' }}
4145
variant="caption"
4246
color="text.secondary"

src/hooks/useMeritIncentives.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { CustomMarket } from 'src/ui-config/marketsConfig';
66

77
export enum MeritAction {
88
ETHEREUM_STKGHO = 'ethereum-stkgho',
9+
ETHEREUM_SUPPLY_PYUSD = 'ethereum-supply-pyusd',
910
SUPPLY_CBBTC_BORROW_USDC = 'ethereum-supply-cbbtc-borrow-usdc',
1011
SUPPLY_WBTC_BORROW_USDT = 'ethereum-supply-wbtc-borrow-usdt',
1112
BASE_SUPPLY_CBBTC = 'base-supply-cbbtc',
@@ -26,6 +27,7 @@ type MeritIncentives = {
2627

2728
export type ExtendedReserveIncentiveResponse = ReserveIncentiveResponse & {
2829
customMessage: string;
30+
customForumLink: string;
2931
};
3032

3133
const url = 'https://apps.aavechan.com/api/merit/aprs';
@@ -34,6 +36,7 @@ export type MeritReserveIncentiveData = Omit<ReserveIncentiveResponse, 'incentiv
3436
action: MeritAction;
3537
protocolAction?: ProtocolAction;
3638
customMessage?: string;
39+
customForumLink?: string;
3740
};
3841

3942
const getMeritData = (market: string, symbol: string): MeritReserveIncentiveData[] | undefined =>
@@ -84,6 +87,18 @@ const MERIT_DATA_MAP: Record<string, Record<string, MeritReserveIncentiveData[]>
8487
customMessage: 'You must supply wBTC and borrow USDT in order to receive merit rewards.',
8588
},
8689
],
90+
PYUSD: [
91+
{
92+
action: MeritAction.ETHEREUM_SUPPLY_PYUSD,
93+
rewardTokenAddress: AaveV3Ethereum.ASSETS.PYUSD.A_TOKEN,
94+
rewardTokenSymbol: 'aEthPYUSD',
95+
protocolAction: ProtocolAction.supply,
96+
customForumLink:
97+
'https://governance.aave.com/t/arfc-pyusd-reserve-configuration-update-incentive-campaign/19573',
98+
customMessage:
99+
'Borrowing of some assets may impact the amount of rewards you are eligible for. Please check the forum post for the full eligibility criteria.'
100+
},
101+
],
87102
},
88103
[CustomMarket.proto_base_v3]: {
89104
cbBTC: [
@@ -188,6 +203,7 @@ export const useMeritIncentives = ({
188203
rewardTokenAddress: incentive.rewardTokenAddress,
189204
rewardTokenSymbol: incentive.rewardTokenSymbol,
190205
customMessage: incentive.customMessage,
206+
customForumLink: incentive.customForumLink,
191207
} as ExtendedReserveIncentiveResponse;
192208
},
193209
});

src/locales/en/messages.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/locales/en/messages.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,8 +1001,8 @@ msgid "Efficiency mode (E-Mode)"
10011001
msgstr "Efficiency mode (E-Mode)"
10021002

10031003
#: src/components/incentives/MeritIncentivesTooltipContent.tsx
1004-
msgid "Eligible for the merit program."
1005-
msgstr "Eligible for the merit program."
1004+
msgid "Eligible for the Merit program."
1005+
msgstr "Eligible for the Merit program."
10061006

10071007
#: src/layouts/FeedbackDialog.tsx
10081008
msgid "Email"

0 commit comments

Comments
 (0)