Closed code423n4 closed 2 years ago
https://github.com/code-423n4/2022-04-badger-citadel/blob/main/src/Funding.sol#L356
In the function setDiscountLimits, there are no checks on _minDiscount, therefore it can be greater than _maxDiscount, and even greater than MAX_BPS.
setDiscountLimits
_minDiscount
_maxDiscount
MAX_BPS
add:
require(_minDiscount <= _maxDiscount);
Agree, also dup
Will downgrade to QA. It requires admin's misbehave and the only impact is: need send another transaction to set it correctly.
QA
Lines of code
https://github.com/code-423n4/2022-04-badger-citadel/blob/main/src/Funding.sol#L356
Vulnerability details
In the function
setDiscountLimits
, there are no checks on_minDiscount
, therefore it can be greater than_maxDiscount
, and even greater thanMAX_BPS
.Recommended Mitigation Steps
add: