Skip to content

Commit f5c56c2

Browse files
authored
Revert "feat: add hardcoded apr for plasma usde (#2699)"
This reverts commit d573883.
1 parent 97738dc commit f5c56c2

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 { AaveV3Plasma } 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';
@@ -99,27 +98,6 @@ type WhitelistApiResponse = {
9998
whitelistedRewardTokens: string[];
10099
additionalIncentiveInfo: Record<string, ReserveIncentiveAdditionalData>;
101100
};
102-
const hardcodedIncentives: Record<string, ExtendedReserveIncentiveResponse> = {
103-
[AaveV3Plasma.ASSETS.USDe.A_TOKEN]: {
104-
incentiveAPR: '0.12',
105-
rewardTokenAddress: AaveV3Plasma.ASSETS.USDe.A_TOKEN,
106-
rewardTokenSymbol: 'aPlaUSDe',
107-
customMessage:
108-
'You must supply USDe and hold an equal or greater amount of sUSDe (by USD value) to receive the incentives. To be eligible, your assets supplied must be at least 2x your account equity, and you must not be borrowing any USDe. The rate provided to eligible users will change week by week, but will be roughly in line with the sUSDe rate for the forseeable future.',
109-
breakdown: {
110-
protocolAPY: 0,
111-
protocolIncentivesAPR: 0,
112-
merklIncentivesAPR: 0,
113-
totalAPY: 0,
114-
isBorrow: false,
115-
breakdown: {
116-
protocol: 0,
117-
protocolIncentives: 0,
118-
merklIncentives: 0,
119-
},
120-
},
121-
},
122-
};
123101

124102
const MERKL_ENDPOINT = 'https://api.merkl.xyz/v4/opportunities?mainProtocolId=aave'; // Merkl API
125103
const WHITELIST_ENDPOINT = 'https://apps.aavechan.com/api/aave/merkl/whitelist-token-list'; // Endpoint to fetch whitelisted tokens
@@ -175,24 +153,6 @@ export const useMerklIncentives = ({
175153
queryKey: ['merklIncentives', market],
176154
staleTime: 1000 * 60 * 5,
177155
select: (merklOpportunities) => {
178-
const hardcodedIncentive = rewardedAsset ? hardcodedIncentives[rewardedAsset] : undefined;
179-
180-
if (hardcodedIncentive) {
181-
const protocolIncentivesAPR = protocolIncentives.reduce((sum, inc) => {
182-
return sum + (inc.incentiveAPR === 'Infinity' ? 0 : +inc.incentiveAPR);
183-
}, 0);
184-
const merklIncentivesAPY = convertAprToApy(0.045);
185-
return {
186-
...hardcodedIncentive,
187-
breakdown: {
188-
protocolAPY,
189-
protocolIncentivesAPR,
190-
merklIncentivesAPR: merklIncentivesAPY,
191-
totalAPY: protocolAPY + protocolIncentivesAPR + merklIncentivesAPY,
192-
} as MerklIncentivesBreakdown,
193-
} as ExtendedReserveIncentiveResponse;
194-
}
195-
196156
const opportunities = merklOpportunities.filter(
197157
(opportunitiy) =>
198158
rewardedAsset &&

0 commit comments

Comments
 (0)