diff --git a/test/invariant/handlers/TimeBasedRateHandler.sol b/test/invariant/handlers/TimeBasedRateHandler.sol index 537d7ee..a68327d 100644 --- a/test/invariant/handlers/TimeBasedRateHandler.sol +++ b/test/invariant/handlers/TimeBasedRateHandler.sol @@ -13,7 +13,7 @@ contract TimeBasedRateHandler is HandlerBase, StdCheats { uint256 public dsr; uint256 public rho; - uint256 constant ONE_HUNDRED_PCT_APY_DSR = 1.00000002197955315123915302e27; + uint256 constant ONE_HUNDRED_PCT_APY_DSR = 1.000000021979553151239153027e27; DSRAuthOracle public dsrOracle; @@ -25,14 +25,13 @@ contract TimeBasedRateHandler is HandlerBase, StdCheats { } // This acts as a receiver on an L2. - // Note that the chi value is not derived from previous values, this is to test if - // PSM will work as expected with different chi values. function setPotData(uint256 newDsr, uint256 newRho) external { // 1. Setup and bounds dsr = _bound(newDsr, 1e27, ONE_HUNDRED_PCT_APY_DSR); rho = _bound(newRho, rho, block.timestamp); - // If chi hasn't been set yet, set to 1e27 + // If chi hasn't been set yet, set to 1e27, else recalculate it in the same way it would + // happen during a refresh. uint256 rate = dsrOracle.getConversionRate(); uint256 chi = rate == 0 ? 1e27 : rate;