Open code423n4 opened 3 years ago
cmichel
The UToken contract uses solidity version 0.8 which already comes with implicit overflow checks. The explicit overflow checks in addReserves can be removed:
UToken
addReserves
/* Revert on overflow */ // @audit this overflow check already happened implicitly require(totalReservesNew >= totalReserves, "add reserves unexpected overflow"); totalReserves = totalReservesNew;
Agree with finding
Handle
cmichel
Vulnerability details
The
UToken
contract uses solidity version 0.8 which already comes with implicit overflow checks. The explicit overflow checks inaddReserves
can be removed: