Skip to content

Commit 37cd82f

Browse files
committed
fraxlend remove dust pools
1 parent c4ff67f commit 37cd82f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/adaptors/fraxlend/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,9 @@ const main = async () => {
276276
const totalBorrowUsd = new BigNumber(totalBorrows[index].amount)
277277
.dividedBy(BIG_10.pow(18))
278278
.times(prices[FRAX.toLowerCase()]);
279+
const isDustBorrowMismatch = tvlUsd.lt(10) && totalBorrowUsd.gt(tvlUsd);
280+
281+
if (isDustBorrowMismatch) return null;
279282

280283
const debtCeilingUsd = new BigNumber(totalSupplys[index])
281284
.dividedBy(BIG_10.pow(18))
@@ -314,7 +317,7 @@ const main = async () => {
314317
underlyingTokens: [collateralContracts[index]],
315318
};
316319
})
317-
.filter((e) => e.tvlUsd);
320+
.filter((e) => e?.tvlUsd);
318321

319322
return addMerklRewardApy(pools, 'fraxlend');
320323
};

0 commit comments

Comments
 (0)