# DoS: Attacker May Front-Run createSplit() With A merkleRoot Causing Future Transactions With The Same merkleRoot to Revert

createSplit uses merkleRoot as CREATE2 salt, so an attacker front-running with the same merkleRoot blocks the victim's split and all future reuse of that root.

- Payout: Audit contest
- Severity: medium
- Program: Joyn
- Found by: kirk-baird
- Disclosed: 2022-07-25
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2022-03-joyn-findings/issues/33
- Library page: https://bugbountylibrary.com/r/c4%3A2022-03-joyn%3AM-01
- Tags: domain:web3 impact:dos kind:contest platform:code4rena sev:medium tech:evm tech:solidity technique:source-review vuln:dos

**Target:** createSplit()/createSplitProxy() CREATE2 deployment
**Root cause:** merkleRoot is used as the sole CREATE2 salt, so each merkleRoot maps to exactly one deployable address; a prior deployment with the same salt makes any later createSplit with that root revert.
**Steps:**
1. Observe victim's createSplit() tx in mempool containing merkleRoot R.
2. Submit own createSplit() with same merkleRoot R but different _collectionContract/_splitAsset and higher gas price.
3. Attacker tx mines first, deploying SplitProxy at salt keccak256(abi.encode(R)).
4. Victim tx reverts on CREATE2 address collision; merkleRoot R is permanently unusable.
5. Repeat against any regenerated merkle root.
**How found:** Code reading of createSplitProxy() noting merkleRoot used as CREATE2 salt, implying single-use per root and mempool front-run griefing.
**Exploitation:** Griefing via mempool front-running with higher gas: attacker consumes the merkleRoot salt with a benign or altered split, causing victim's transaction to revert and permanently burning that root.
**Insight:** When a user-supplied value is used as a CREATE2 salt, it becomes a globally claimable namespace: anyone can pre-deploy at that address. Check salts for single-use/global-collision griefing and bind them to msg.sender.
