An Attacker can frontrun the account creation of the User and get the Account on the address the User was expecting.
https://eips.ethereum.org/EIPS/eip-4337
In a ERC4337 transaction flow, a Bundler batches transactions from the Alt mempool and posts them on-chain. So in this case, the tx.origin for all the batched transactions is the address of the Bundler. An attacker can monitor the Alt mempool for createAccount
calls and frontrun it by copying the user provided salt and paying a higher gas price.
The Frontrunning can happen in the following way
An Attacker monitors the Alt mempool for transactions which create an Arcadia Account
User A transmits a transaction to the Alt mempool
Once the Attacker finds User A's transaction, he creates an identical transaction with the same user provided salt and pays a higher price to the bundler to be included before the User A's transaction.
The Attacker's transaction is included in a block and the User A's transaction fails.
This vulnerability essentially makes all Account Abstraction wallets susceptible to frontrunning and Denial of Service attacks when creating an Arcadia Account.
Manual Review
To stop the above vulnerability the msg.sender along with the tx.origin can be used to hash the salt of the Proxy creation.
This way the frontrunning attack through the ERC4337 transaction flow is fixed and deployments through thrid party contracts are also possible.
Invalid if a new Nexus proxy is already deployed, [`createDeterministicERC1967` will not revert](https://github.com/Vectorized/solady/blob/main/src/utils/LibClone.sol#L745), but simply return, so there is no DoS here. Users should carefully select a unique salt and initData when creating a new Nexus Proxy instance as noted in documentation [here](https://github.com/bcnmy/nexus/wiki/NexusAccountFactory#createaccount)
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.