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

Unclear purpose and handling of Ether in payable Withdrawal function

Summary

The withdrawTokens function is marked as payable, allowing it to receive Ether, but the purpose and handling of this Ether are not clear from the provided code. This could lead to locked funds for users (accidentally) sending ETH while calling the function.

Vulnerability Details

The withdrawTokens function in the L1 bridge contract is declared as payable:

function withdrawTokens(uint256[] calldata request) external payable returns (address)

However, from the code provided, there's no evident use or handling of the received Ether. This creates uncertainty about the function's intended behavior with regards to sent funds.

Impact

If Ether is sent to this function but not properly handled, it could become locked in the contract, potentially leading to loss of funds for users.

Tools Used

Manual Review.

Recommendations

Consider removing the payable keyword from the function declaration.Unclear purpose and handling of Ether in payable Withdrawal function

Updates

Lead Judging Commences

n0kto Lead Judge about 1 year 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.