Skip to content

Commit

Permalink
added tolerance for large inflator value in reserves change for takeA…
Browse files Browse the repository at this point in the history
…uction
  • Loading branch information
mwc committed Dec 24, 2023
1 parent 3b5a74b commit f22f381
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ abstract contract UnboundedLiquidationPoolHandler is BaseHandler {
kickerReward += afterTakeVars.kickerBond - beforeTakeVars.kickerBond;
}

(uint256 inflator, ) = _pool.inflatorInfo();
reservesErrorMargin = Math.max(reservesErrorMargin, inflator/5e17);

// **RE7**: Reserves increase with the quote token paid by taker.
increaseInReserves += totalBalanceAfterTake - totalBalanceBeforeTake;

Expand Down

0 comments on commit f22f381

Please sign in to comment.