Hitting an assert()
creates an error of type Panic(uint256)
and consumes the remainder of the transaction's available gas rather than returning it, as require()
/revert()
do. Per the Solidity documentation, "Assert should only be used to test for internal errors, and to check invariants. Properly functioning code should never create a Panic, not even on invalid external input.".
There are 3 instances of this issue.
File Link | Instance Count | Instance Link |
---|---|---|
BridgeReth.sol | 1 | 106 |
File Link | Instance Count | Instance Link |
---|---|---|
MarginCallSecondaryFacet.sol | 1 | 87 |
File Link | Instance Count | Instance Link |
---|---|---|
LibAsset.sol | 1 | 16 |
Loss of a transaction's available gas.
baudit: a custom static code analysis tool; manual review
Use require()
rather than assert()
.
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.