Skip to content

Commit

Permalink
fix: conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-manuel committed Jul 4, 2024
2 parents b813c19 + 4a1e43d commit 299b69f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/invariant/handlers/TimeBasedRateHandler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;

Expand Down

0 comments on commit 299b69f

Please sign in to comment.