NFTBridge
60,000 USDC
View results
Submission Details
Severity: low
Invalid

Ensure recipient addresses, during l1 and l2 bridge transactions, are non zero

Summary

Ensure recipient address on l1 and l2 transactions are non zero

Vulnerability Details

in the deposit tokens functions on l1 and l2, there should be a check to confirm that the recipient on the other chain is non zero. it's a trivial fix that could prevent loss of nfts

Impact

  • loss of nft if you bridge to the zero address from l2 to l1. since you cant cancel l2 to l1 txs

  • stress of cancellation if you bridge from l1 to l2

Recommendations

add this to the deposit_tokens function in bridge.cairo

assert!(ownerL1.is_non_zero( ), "owner l1 must be non zero")

add this to the depositTokens function in Bridge.sol

if (snaddress.unwrap(ownerL2) == address(0x0)) {
revert ZeroAddressError();
}
Updates

Lead Judging Commences

n0kto Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational / Gas

Please, do not suppose impacts, think about the real impact of the bug and check the CodeHawks documentation to confirm: https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity A PoC always helps to understand the real impact possible.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.