MondrianWallet2::receive
and MondrianWallet2::fallback
functions make it impossible to move funds into the contract. Combined with the absence of a Paymaster account, it means it is impossible to validate transactions, breaking core functionality of the Account Abstraction.Description: MondrianWallet2.sol
is missing a receive and fallback function. It makes it impossible to move funds into the contract.
Impact: Because MondrianWallet2.sol
does not set up a paymaster account, the Account Abstraction will only work if MondrianWallet2.sol
itself has sufficient balance
to execute transactions. If not, the MondrianWallet2::validateTransaction
will fail and return bytes4(0)
.
Lacking a receive and fallback function, it is impossible to move funds into the contract: Any empty call with ether will revert and calls to a function will return excess ether to the caller, leaving no funds in the contract.
This, in turn, means that the function MondrianWallet2::_validateTransaction
will always revert:
The only way to execute a transaction is by the owner of the contract through the MondrianWallet2::executeTransaction
, which has the owner pay for the transaction directly. This approach of executing a transaction is exactly the same as the owner themselves executing the transaction directly, rendering the Account Abstraction meaningless.
An additional note on testing. This issue did not emerge in testing because the account is added ether through a cheat code in MondrianWallet2Test.t.sol::setup
:
Although common practice, it makes issues within funding contracts easy to miss.
Proof of Concept:
User deploys an account abstraction and transfers ownership to themselves.
User attempts to transfer funds to the contract and fails.
Bootloader attempts to validate transaction, fails.
User attempts to execute transaction directly through MondrianWallet2::executeTransaction
and succeeds.
In short, the only way transactions can be executed are directly by the owner of the contract, defeating the purpose of Account Abstraction.
First remove cheat code that adds funds to mondrianWallet
account in ModrianWallet2Test.t.sol::setup
[sic: note the missing n!].
And set the proxy to payable:
Then add the following to ModrianWallet2Test.t.sol
.
Recommended Mitigation:
Add a payable fallback function to the contract.
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.