Project

One World
NFTDeFi
15,000 USDC
View results
Submission Details
Severity: high
Invalid

Missing receive or fallback Function Causes Transaction Failure with Ether

Summary

The executeMetaTransaction function in the NativeMetaTransaction contract handles relaying transactions. It accepts the user address, function signature, and signature details, verifies the signature, increases the user’s nonce to prevent reuse, and then executes the function signature on the contract’s behalf.

Vulnerability Details

The relevant code is as follows:

(bool success, bytes memory returnData) = address(this).call{value: msg.value}(abi.encodePacked(functionSignature, userAddress));

This line attempts to forward msg.value (Ether) to address(this), implying that Ether might be sent to the contract. However, the contract does not implement a receive or fallback function to handle incoming Ether. Without one of these functions, any transaction with attached Ether will revert, causing executeMetaTransaction to fail.

Since the contract lacks a receive or fallback function, any attempt to send Ether will cause a revert.

Impact

Any attempt to call executeMetaTransaction with Ether attached will fail, resulting in a revert.

Tools Used

Manual Review

Recommendations

Since the contract is intended to accept Ether, add a receive() function to handle incoming Ether:

receive() external payable { }
Updates

Lead Judging Commences

0xbrivan2 Lead Judge 9 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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