The _withdrawFromEscrow
function in the Escrow.sol contract presents a potential state inconsistency risk due to updating the contract's state after external calls.
In the _withdrawFromEscrow
function, the contract's state is updated after making external calls to transfer NFTs. This creates a brief window where the contract's internal state does not accurately reflect the true ownership status of the NFT.
It could potentially lead to:
Interference with other contract logic that relies on the escrow state
Possible griefing attacks causing confusion or disrupting normal contract operations
Manual code review
Implement the checks-effects-interactions pattern by updating the state before making external calls:
Impact: - NFT already bridged won’t be bridgeable anymore without being stuck. Likelyhood: Low. - Attackers will corrupt their own tokens, deploying a risky contract interacting with an upgradable proxy. They have to buy and sell them without real benefits, except being mean. Some really specific and rare scenario can also trigger that bug.
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.