Incorrect if
statement placement
CEI pattern not satisfied
Misuse of the assert()
function
Floating Solidity compiler version declaration
if
Statement PlacementThe if
statement should be placed before line 95 to prevent the unnecessary execution of detectInterface()
.
Bridge.sol (lines 95–102)
assert()
The assert()
function should be used exclusively for checking internal errors and invariants in the contract's code.
The CEI (Conditions, Effects, Interactions) pattern is not satisfied because the effect—updating the escrow mapping—should be placed before interactions like safeTransferFrom
and transferFrom
to ensure that state changes are made before executing external calls, thus maintaining consistency and reducing potential issues.
Escrow.sol (lines 26–51)
The Solidity compiler version declaration across all .sol
files is floating: pragma solidity ^0.8.0;
It should be declared as a static version, e.g.,: pragma solidity 0.8.26;
Using a static Solidity version is vital to prevent unexpected vulnerabilities from future compiler updates. It ensures consistent contract behavior, secure code execution, and reliable audits, reducing the risk of security breaches.
The issues identified in the audit underscore the importance of adhering to secure coding standards in smart contract development. Inconsistent logic flow, improper error handling, and potential exposure to future vulnerabilities can compromise the contract's reliability and security. Ensuring that code is structured correctly, patterns are followed, and versioning is tightly controlled is essential for maintaining the integrity, predictability, and safety of the contract in production. Failing to address these areas could lead to unpredictable behavior, security breaches, and increased maintenance costs.
Manual auditing.
Apply the recommendations outlined in each Vulnerability Details paragraph.
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.