_validateSignature
do not follow official ERC4337 standard
In MondrianWallet
smartcontract, It's supposed be fully compatible with ERC4337. But it do not follow it strictly which can cause whole batch to revert. Which is not the intended behaviour by EIP4337.
Here the function can revert in highlighted line if signature is invalid. As per official ERC4337, It shouldn't revert on invalid signature, rather return SIG_VALIDATION_FAILED.
In validateUserOp
there is uint256
return value, which is currently fixed to 0 if signature is valid else it's gonna revert. But as per official ERC4337 the return value for validateUserOp
must be packed of authorizer
, validUntil
and validAfter
timestamps.
authorizer - 0 for valid signature, 1 to mark signature failure. Otherwise, an address of an authorizer contract. This ERC defines “signature aggregator” as authorizer.
validUntil is 6-byte timestamp value, or zero for “infinite”. The UserOp is valid only up to this time.
validAfter is 6-byte timestamp. The UserOp is valid only after this time.
Revert on signature mismatch, gonna cause reverting of whole batch. (As most of transactions are processed in batches in AA).
Signature will be valid for infinite time can cause, signature replay attacks.
Incomptability in Signature Aggregators
Manual Review
Adhere to standard ERC4337 to avoid these bugs. These are some of the recomendations.
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.