Skip to content

Commit 122ecbe

Browse files
committed
aave: Add validation for Polygon V2 daily fee threshold
1 parent dae3ac3 commit 122ecbe

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fees/aave/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,8 @@ const v2Graphs = (graphUrls: ChainEndpoints) => {
236236
+ reserveFactorUSD;
237237
}, 0);
238238

239+
if (chain === POLYGON && dailyFee > 1e6) throw new Error(`Polygon V2 daily fee is too high: ${dailyFee}`)
240+
239241
let dailyRev = todaysReserves.reduce((acc: number, reserve: V2Reserve) => {
240242
const yesterdaysReserve = yesterdaysReserves.find((r: any) => r.reserve.symbol === reserve.reserve.symbol)
241243

0 commit comments

Comments
 (0)