# Anyone can front-run the creation of a vesting account to block it

Anyone can front-run CreateVestingAccount with a Bank Send to the recipient, pre-creating the account and permanently blocking vesting creation.

- Payout: Audit contest
- Severity: medium
- Program: Seda Protocol
- Found by: 000000
- Disclosed: 2024-12-20
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2024-12-seda-protocol-judging/issues/251
- Library page: https://bugbountylibrary.com/r/sherlock%3A2024-12-seda-protocol%3AM-12
- Tags: area:web3 domain:web3 impact:dos kind:contest platform:sherlock sev:medium technique:source-review vuln:business-logic vuln:dos

**Target:** Cosmos SDK vesting module msg_server CreateVestingAccount
**Root cause:** CreateVestingAccount rejects recipients whose account already exists; Bank Send auto-creates the recipient account, so a griefing Send permanently prevents vesting creation since accounts cannot be deleted.
**Steps:**
1. Victim submits `CreateVestingAccount(to=pubkeyB)` tx.
2. Attacker front-runs with a Bank `Send` of minimal coins to pubkeyB, which auto-creates the account via SetAccount.
3. Victim's CreateVestingAccount now hits `account already exists` check and reverts.
4. Account cannot be deleted, so vesting creation is permanently blocked.
**How found:** Code reading of the vesting msg_server existence check combined with knowledge that Bank Send auto-creates recipient accounts.
**Exploitation:** Attacker observes pending CreateVestingAccount tx in mempool and submits a cheap Bank Send to the same recipient with higher priority; the Send creates the account, causing the vesting tx to fail permanently.
**Insight:** In Cosmos SDK, any Send auto-creates the recipient account; any module gating on 'account does not exist' is griefable by a dust Send, and since accounts are undeletable the DoS is permanent.

