Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Valid

`MondrianWalletV2` can't receive ETH transfer

Summary

The smart contract wallet MondrianWallet2 can't receive ETH transfer.

Vulnerability Details.

MondrianWallet2 don't have receive payable function to allow receive ETH transfer.

Impact

Without the receive function not will be possible transfer ETH to smart contract wallet to pay fees, hold, transfer to others address etc.

Tools Used

Foundry and Solidity

Proof Of Concept

Add the following PoC to test/ModrianWallet2Test.t.sol:

function testZkContractCanReceiveETH() public {
(bool sent, bytes memory data) = address(mondrianWallet).call{value: 1 ether}("");
assertEq(sent, true);
}

Run: forge test --zksync --system-mode=true --match-test testZkContractCanReceiveETH -vvv

Recommendations

The smart contract wallet MondrianWallet2 should be have the receive payable function:

+ receive() external payable {}
// Needed for UUPS
function _authorizeUpgrade(address newImplementation) internal override {}
Updates

Lead Judging Commences

bube Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Missing receive function

Support

FAQs

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