Skip to content

Commit

Permalink
Merge pull request #234 from Ithil-protocol/audit-post-fix-l2
Browse files Browse the repository at this point in the history
fix post l2
  • Loading branch information
OxMarco authored Jan 3, 2024
2 parents 2cd86ed + 41b10c8 commit 411664f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/irmodels/AuctionRateModel.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ abstract contract AuctionRateModel is Ownable, BaseRiskModel {
error ZeroMarginLoan();

function setRiskParams(address token, uint256 riskSpread, uint256 baseRate, uint256 halfTime) external onlyOwner {
if (token == address(0) || baseRate > MAX_RATE || riskSpread > MAX_RATE || halfTime == 0)
revert InvalidInitParams();
if (token == address(0) || baseRate + riskSpread > MAX_RATE || halfTime == 0) revert InvalidInitParams();
riskSpreads[token] = riskSpread;
latestAndBase[token] = (block.timestamp << 128) + baseRate;
halvingTime[token] = halfTime;
Expand Down

0 comments on commit 411664f

Please sign in to comment.