Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/components/incentives/IncentivesTooltipContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ const IncentivesSymbolMap: {
symbol: 'aUSDT',
aToken: true,
},
aEthPYUSD: {
tokenIconSymbol: 'PYUSD',
symbol: 'aPYUSD',
aToken: true,
},
};

interface IncentivesTooltipContentProps {
Expand Down
8 changes: 6 additions & 2 deletions src/components/incentives/MeritIncentivesTooltipContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const MeritIncentivesTooltipContent = ({
}}
>
<Typography variant="caption" color="text.primary" mb={3}>
<Trans>Eligible for the merit program.</Trans>
<Trans>Eligible for the Merit program.</Trans>
</Typography>

<Typography variant="caption" color="text.secondary" mb={3}>
Expand All @@ -36,7 +36,11 @@ export const MeritIncentivesTooltipContent = ({
does not guarantee the program and accepts no liability.
</Trans>{' '}
<Link
href="https://governance.aave.com/t/arfc-merit-a-new-aave-alignment-user-reward-system/16646"
href={
meritIncentives.customForumLink
? meritIncentives.customForumLink
: 'https://governance.aave.com/t/arfc-merit-a-new-aave-alignment-user-reward-system/16646'
}
sx={{ textDecoration: 'underline' }}
variant="caption"
color="text.secondary"
Expand Down
16 changes: 16 additions & 0 deletions src/hooks/useMeritIncentives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { CustomMarket } from 'src/ui-config/marketsConfig';

export enum MeritAction {
ETHEREUM_STKGHO = 'ethereum-stkgho',
ETHEREUM_SUPPLY_PYUSD = 'ethereum-supply-pyusd',
SUPPLY_CBBTC_BORROW_USDC = 'ethereum-supply-cbbtc-borrow-usdc',
SUPPLY_WBTC_BORROW_USDT = 'ethereum-supply-wbtc-borrow-usdt',
BASE_SUPPLY_CBBTC = 'base-supply-cbbtc',
Expand All @@ -22,6 +23,7 @@ type MeritIncentives = {

export type ExtendedReserveIncentiveResponse = ReserveIncentiveResponse & {
customMessage: string;
customForumLink: string;
};

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

const getMeritData = (market: string, symbol: string): MeritReserveIncentiveData[] | undefined =>
Expand Down Expand Up @@ -80,6 +83,18 @@ const MERIT_DATA_MAP: Record<string, Record<string, MeritReserveIncentiveData[]>
customMessage: 'You must supply wBTC and borrow USDT in order to receive merit rewards.',
},
],
PYUSD: [
{
action: MeritAction.ETHEREUM_SUPPLY_PYUSD,
rewardTokenAddress: AaveV3Ethereum.ASSETS.PYUSD.A_TOKEN,
rewardTokenSymbol: 'aEthPYUSD',
protocolAction: ProtocolAction.supply,
customForumLink:
'https://governance.aave.com/t/arfc-pyusd-reserve-configuration-update-incentive-campaign/19573',
customMessage:
'You must supply PYUSD in order to receive merit rewards. Note that there is a undesire debt token list. If you borrow any of these tokens you will get your rewards reduced. Please check the forum post for more information.',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please update customMessage to be

Borrowing of some assets may impact the amount of rewards you are eligible for. Please check the forum post for the full eligibility criteria.

},
],
},
[CustomMarket.proto_base_v3]: {
cbBTC: [
Expand Down Expand Up @@ -146,6 +161,7 @@ export const useMeritIncentives = ({
rewardTokenAddress: incentive.rewardTokenAddress,
rewardTokenSymbol: incentive.rewardTokenSymbol,
customMessage: incentive.customMessage,
customForumLink: incentive.customForumLink,
} as ExtendedReserveIncentiveResponse;
},
});
Expand Down
2 changes: 1 addition & 1 deletion src/locales/en/messages.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -1001,8 +1001,8 @@ msgid "Efficiency mode (E-Mode)"
msgstr "Efficiency mode (E-Mode)"

#: src/components/incentives/MeritIncentivesTooltipContent.tsx
msgid "Eligible for the merit program."
msgstr "Eligible for the merit program."
msgid "Eligible for the Merit program."
msgstr "Eligible for the Merit program."

#: src/layouts/FeedbackDialog.tsx
msgid "Email"
Expand Down
Loading