Skip to content

Commit

Permalink
Allow change in reserves up to 1e-16 of the
Browse files Browse the repository at this point in the history
expected change in reserves in invariant test
of bucket takes
  • Loading branch information
mwc committed Jan 5, 2024
1 parent b43150b commit b19277d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ abstract contract UnboundedLiquidationPoolHandler is BaseHandler {
// Reserves can increase by up to 2e-18 (1/5e17) due to rounding error in inflator value multiplied with t0Debt
(uint256 inflator, ) = _pool.inflatorInfo();
reservesErrorMargin = Math.max(reservesErrorMargin, inflator/5e17);
reservesErrorMargin = Math.max(reservesErrorMargin, (inflator * _priceAt(bucketIndex_)) / 5e35);
reservesErrorMargin = Math.max(reservesErrorMargin, (increaseInReserves + decreaseInReserves) / 1e16);

// In case of bucket take, collateral is taken at bucket price.
uint256 takePrice = _priceAt(bucketIndex_);
Expand Down

0 comments on commit b19277d

Please sign in to comment.