# Griefer can DOS the `SuperPool` creation and make it very expensive for other users

SuperPoolFactory uses CREATE so next pool address is predictable; attacker donates 1 USDC to that address, inflating share price so 1000-share burn requirement fails and pool creation reverts.

- Payout: Audit contest
- Severity: medium
- Program: Sentiment
- Found by: 0xarno
- Disclosed: 2024-08-07
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2024-08-sentiment-v2-judging/issues/97
- Library page: https://bugbountylibrary.com/r/sherlock%3A2024-08-sentiment-v2%3AM-3
- Tags: area:web3 domain:web3 impact:dos kind:contest platform:sherlock sev:medium tech:evm tech:solidity vuln:dos vuln:share-inflation

**Target:** SuperPoolFactory.deploySuperPool / SuperPool share accounting
**Root cause:** deploySuperPool requires minting >=1000 dead shares via deposit, but _convertToShares divides by (totalAssets+1); a donation to the pre-computable CREATE address inflates totalAssets so the initial deposit mints too few shares and reverts.
**Steps:**
1. Compute next SuperPool address from SuperPoolFactory address + nonce (`ethers.getContractAddress`).
2. Frontrun deploySuperPool by transferring a small amount (e.g. `1_000_000` = 1 USDC) of the chosen asset to that address.
3. Victim's deploySuperPool calls `superPool.deposit(initialDepositAmt, address(this))`; `_convertToShares` yields 0 or <1000 shares.
4. Reverts with `SuperPool_ZeroShareDeposit` or `SuperPoolFactory_TooFewInitialShares`; victim must deposit 1001 USDC to succeed.
**How found:** Noticed the factory uses `new SuperPool(...)` (CREATE), making the deployment address predictable, and that creation requires burning 1000 shares computed via a donation-sensitive share formula.
**Exploitation:** Attacker monitors mempool for deploySuperPool, computes the deterministic CREATE address, and sends a tiny asset transfer to it before the victim's tx. Each retry at a new nonce can be griefed again with another small donation, making pool creation economically prohibitive.
**Insight:** Any factory that requires a minimum initial share mint via deposit is vulnerable to first-depositor/donation inflation at the predictable CREATE address; check whether the min-share check can be bypassed by pre-funding the address.

