When we update pool balance we set the value directly that comes when we call the function and my cause a silen overflow
_updatePoolBalance(
oldPoolId,
pools[oldPoolId].poolBalance + loan.debt + lenderInterest
);
function _updatePoolBalance(bytes32 poolId, uint256 newBalance) internal {
pools[poolId].poolBalance = newBalance;
emit PoolBalanceUpdated(poolId, newBalance);
}
There are plenty of places where we do it
may cause silent overflow or underflow and breaks the logic of the protocol
VSCode
Add checks that the casting value is not greater than the uint256 type max value or smaller than 0:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.