Skip to content

Commit e14f31b

Browse files
authored
feat: add pyusd Merit campaign (#2265)
1 parent 4d82ed8 commit e14f31b

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
};
4752

4853
interface IncentivesTooltipContentProps {

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',
@@ -22,6 +23,7 @@ type MeritIncentives = {
2223

2324
export type ExtendedReserveIncentiveResponse = ReserveIncentiveResponse & {
2425
customMessage: string;
26+
customForumLink: string;
2527
};
2628

2729
const url = 'https://apps.aavechan.com/api/merit/aprs';
@@ -30,6 +32,7 @@ export type MeritReserveIncentiveData = Omit<ReserveIncentiveResponse, 'incentiv
3032
action: MeritAction;
3133
protocolAction?: ProtocolAction;
3234
customMessage?: string;
35+
customForumLink?: string;
3336
};
3437

3538
const getMeritData = (market: string, symbol: string): MeritReserveIncentiveData[] | undefined =>
@@ -80,6 +83,18 @@ const MERIT_DATA_MAP: Record<string, Record<string, MeritReserveIncentiveData[]>
8083
customMessage: 'You must supply wBTC and borrow USDT in order to receive merit rewards.',
8184
},
8285
],
86+
PYUSD: [
87+
{
88+
action: MeritAction.ETHEREUM_SUPPLY_PYUSD,
89+
rewardTokenAddress: AaveV3Ethereum.ASSETS.PYUSD.A_TOKEN,
90+
rewardTokenSymbol: 'aEthPYUSD',
91+
protocolAction: ProtocolAction.supply,
92+
customForumLink:
93+
'https://governance.aave.com/t/arfc-pyusd-reserve-configuration-update-incentive-campaign/19573',
94+
customMessage:
95+
'Borrowing of some assets may impact the amount of rewards you are eligible for. Please check the forum post for the full eligibility criteria.'
96+
},
97+
],
8398
},
8499
[CustomMarket.proto_base_v3]: {
85100
cbBTC: [
@@ -146,6 +161,7 @@ export const useMeritIncentives = ({
146161
rewardTokenAddress: incentive.rewardTokenAddress,
147162
rewardTokenSymbol: incentive.rewardTokenSymbol,
148163
customMessage: incentive.customMessage,
164+
customForumLink: incentive.customForumLink,
149165
} as ExtendedReserveIncentiveResponse;
150166
},
151167
});

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)