Skip to content

Commit

Permalink
Add a check in LibEvaluate for wells with no reserves.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brean0 committed Sep 22, 2024
1 parent 32d6d7b commit 0e5a060
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion protocol/contracts/libraries/LibEvaluate.sol
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ library LibEvaluate {
for (uint256 i; i < pools.length; i++) {
// get the non-bean value in an LP.
twaReserves = LibWell.getTwaReservesFromStorageOrBeanstalkPump(pools[i]);

// if the twaReserves are 0, the well has no liquidity and thus can be skipped
if (twaReserves[0] == 0 && twaReserves[1] == 0) continue;
// calculate the non-bean usd liquidity value.
uint256 usdLiquidity = LibWell.getWellTwaUsdLiquidityFromReserves(
pools[i],
Expand Down

0 comments on commit 0e5a060

Please sign in to comment.