Reproduced Exploit

Catalyst: an empty projectId lets the creator reprice IPSeed and drain its ETH

spawn rejects a token only after projectId is non-empty. The creator spawns with an empty project id and curve parameters of 0, mints 10 tokens for 0 ETH, then spawns the same tokenId again with a 1 ETH sell price. Selling those tokens pays out the 10 ETH IPSeed was holding for other buyers. The co…

Jun 2025•Ethereum•logic•3 min read

Loss

10 tokens minted at price 0 are sold for the 10 ETH already held by IPSeed. IPSeed ends at 0

Chain

Ethereum

Category

logic

Date

Jun 2025

Source

AuditVault

EVM Playground

Source-level debugger — step opcodes and Solidity in sync

evm-hack-analyzer

The attack is replayed in an in-browser EVM preloaded with the exact dumped fork state. The execution tree shows every call; step by Solidity line or by opcode across all depths — source, Stack, Memory, Storage, Balances (native / ERC-20 / NFT), Transient storage and Return value stay in sync. Click a tree node, opcode, or source line to jump. Query opens a search over the trace: previous and next writes, balance changes and calls, breakpoints, and a diff of everything that changed between two steps. No backend, no live RPC.

Loading fork state…

Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 31585-c-01-attacker-can-drain-all-eth-from-ipseed-due-to-re-config. Standalone Foundry PoC and full write-up: 31585-c-01-attacker-can-drain-all-eth-from-ipseed-due-to-re-config_exp in the evm-hack-registry mirror.


Vulnerability classes: vuln/logic/incorrect-state-transition · vuln/access-control/missing-auth

Key info#

FieldValue
Loss10 tokens minted at price 0 are sold for the 10 ETH already held by IPSeed. IPSeed ends at 0
Vulnerable contractIPSeed.spawn
Attacker EOA0x1111111111111111111111111111111111111111 (the creator)
Attack contractExploit
Attack txExploit.run()
Chain / block / dateEthereum model · block 0 · 2025-06
Compilersolc 0.8.27, cancun
Bug classTokenAlreadyExists only trips when projectId is non-empty

TL;DR#

spawn rejects a token only after projectId is non-empty. The creator spawns with an empty project id and curve parameters of 0, mints 10 tokens for 0 ETH, then spawns the same tokenId again with a 1 ETH sell price. Selling those tokens pays out the 10 ETH IPSeed was holding for other buyers. The contract balance is 0.

The vulnerable code#

SOLIDITY
if (bytes(tokenMeta[tokenId].projectId).length > 0) { // @> VULN: an empty projectId never trips TokenAlreadyExists, so tokenId can be spawned again
    revert TokenAlreadyExists();
}
DIFF
- if (bytes(tokenMeta[tokenId].projectId).length > 0) revert TokenAlreadyExists();
+ require(bytes(projectId).length > 0, "empty project");
+ if (bytes(tokenMeta[tokenId].projectId).length > 0) revert TokenAlreadyExists();

Root cause#

The existence check reads the stored projectId, and the attack keeps that string empty. Curve parameters are part of the metadata write, so the second spawn changes the price of tokens that were minted for free.

Preconditions#

  • tokenId is keccak256(creator, ""), so both spawns use the same id.
  • Curve parameters of 0 make getBuyPrice return 0.
  • IPSeed already holds 10 ETH from other buyers.
  • The second spawn sets curve parameters to 1 ETH per token.

Attack walkthrough#

  1. Spawn with an empty project id and zero parameters.
  2. TokenAlreadyExists does not fire.
  3. Mint 10 tokens. The price check is msg.value == 0.
  4. Spawn the same id again with parameters of 1 ETH.
  5. Sell 10 tokens. getSellPrice pays 10 ETH.
  6. The creator holds 10 ETH. IPSeed holds 0.

Diagrams#

flowchart TD A["Spawn with empty projectId and curve parameters 0"] --> B["VULN guard sees an empty projectId and allows the write"] B --> C["Mint 10 tokens for 0 ETH"] C --> D["Spawn the same tokenId again with a 1 ETH sell price"] D --> E["Sell 10 tokens against the 10 ETH already in IPSeed"] E --> F["Creator holds 10 ETH. IPSeed holds 0"]

Impact#

Buyers who funded IPSeed lose the 10 ETH. The creator paid nothing for the tokens that were sold. Requiring a non-empty projectId on the first spawn makes the second call hit TokenAlreadyExists.

How to reproduce#

BASH
cd 31585-c-01-attacker-can-drain-all-eth-from-ipseed-due-to-re-config_exp
forge test -vv

Sources#


Sources & further analysis#

Reproductions & code

Alerts & third-party analyses

  • Web3Sec X hacked database: search.
  • Rekt leaderboard: search.
  • Solodit incident search: search.

These dashboards index community alerts tweets, post-mortems, and independent write-ups. Reach them through the protocol name above to cross-check this reproduction against other analyses.