Closed code423n4 closed 2 years ago
https://github.com/code-423n4/2022-04-badger-citadel/blob/main/src/Funding.sol#L297
In this require, the message is
require
"cannot decrease cap below global sum of assets in"
However, it would also fail if _assetCap is equal to funding.assetCumulativeFunded.
_assetCap
funding.assetCumulativeFunded
change to:
require( _assetCap >= funding.assetCumulativeFunded, "cannot decrease cap below global sum of assets in" )
It's a QA
QA
Lines of code
https://github.com/code-423n4/2022-04-badger-citadel/blob/main/src/Funding.sol#L297
Vulnerability details
In this
require
, the message isHowever, it would also fail if
_assetCap
is equal tofunding.assetCumulativeFunded
.Recommended Mitigation Steps
change to: