Skip to content

Commit a84df4e

Browse files
authored
Revert "feat: added hardcoded incentives for PYUSD" (#2707)
1 parent dc56077 commit a84df4e

File tree

1 file changed

+0
-40
lines changed

1 file changed

+0
-40
lines changed

src/hooks/useMerklIncentives.ts

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { ProtocolAction } from '@aave/contract-helpers';
22
import { ReserveIncentiveResponse } from '@aave/math-utils/dist/esm/formatters/incentive/calculate-reserve-incentives';
3-
import { AaveV3Ethereum } from '@bgd-labs/aave-address-book';
43
import { useQuery } from '@tanstack/react-query';
54
import { useRootStore } from 'src/store/root';
65
import { convertAprToApy } from 'src/utils/utils';
@@ -100,28 +99,6 @@ type WhitelistApiResponse = {
10099
additionalIncentiveInfo: Record<string, ReserveIncentiveAdditionalData>;
101100
};
102101

103-
const hardcodedIncentives: Record<string, ExtendedReserveIncentiveResponse> = {
104-
[AaveV3Ethereum.ASSETS.PYUSD.A_TOKEN]: {
105-
incentiveAPR: '0.43',
106-
rewardTokenAddress: AaveV3Ethereum.ASSETS.PYUSD.A_TOKEN,
107-
rewardTokenSymbol: 'aEthPYUSD',
108-
customMessage:
109-
'You need to supply PYUSD without holding any PYUSD debt. This is a program initiated and implemented by ACI in collaboration with Merkl.',
110-
breakdown: {
111-
protocolAPY: 0,
112-
protocolIncentivesAPR: 0,
113-
merklIncentivesAPR: 0,
114-
totalAPY: 0,
115-
isBorrow: false,
116-
breakdown: {
117-
protocol: 0,
118-
protocolIncentives: 0,
119-
merklIncentives: 0,
120-
},
121-
},
122-
},
123-
};
124-
125102
const MERKL_ENDPOINT = 'https://api.merkl.xyz/v4/opportunities?mainProtocolId=aave'; // Merkl API
126103
const WHITELIST_ENDPOINT = 'https://apps.aavechan.com/api/aave/merkl/whitelist-token-list'; // Endpoint to fetch whitelisted tokens
127104
const checkOpportunityAction = (
@@ -176,23 +153,6 @@ export const useMerklIncentives = ({
176153
queryKey: ['merklIncentives', market],
177154
staleTime: 1000 * 60 * 5,
178155
select: (merklOpportunities) => {
179-
const hardcodedIncentive = rewardedAsset ? hardcodedIncentives[rewardedAsset] : undefined;
180-
181-
if (hardcodedIncentive) {
182-
const protocolIncentivesAPR = protocolIncentives.reduce((sum, inc) => {
183-
return sum + (inc.incentiveAPR === 'Infinity' ? 0 : +inc.incentiveAPR);
184-
}, 0);
185-
const merklIncentivesAPY = convertAprToApy(0.1);
186-
return {
187-
...hardcodedIncentive,
188-
breakdown: {
189-
protocolAPY,
190-
protocolIncentivesAPR,
191-
merklIncentivesAPR: merklIncentivesAPY,
192-
totalAPY: protocolAPY + protocolIncentivesAPR + merklIncentivesAPY,
193-
} as MerklIncentivesBreakdown,
194-
} as ExtendedReserveIncentiveResponse;
195-
}
196156
const opportunities = merklOpportunities.filter(
197157
(opportunitiy) =>
198158
rewardedAsset &&

0 commit comments

Comments
 (0)