When a type is downcast to a smaller type, the higher order bits are truncated, effectively applying a modulo to the original value. Without any other checks, this wrapping will lead to unexpected behavior and bugs.
There is 1 instance of this issue.
File Link | Instance Count | Instance Link |
---|---|---|
EscrowFactory.sol | 1 | 68 |
A hash collision would results in a incorrectly computed escrow address.
baudit: a custom static code analysis tool; manual review
Use OpenZeppelin's SafeCast so that transactions revert when such an operation overflows. Using this library instead of the unchecked operations eliminates an entire class of bugs, so it is recommended to always use it.
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.