Built on the bones of ERC-404.

ERC-404 was experimental, promising, and it bled gas. We kept the mechanic, rebuilt the storage underneath it, and moved the coinage into a Uniswap v4 hook — where the price is visible. ERC-402 is the standard that knows what you paid.

Lineage

One good idea, and what it was missing.

404

ERC-404 — the idea

Pandora Labs merged ERC-20 and ERC-721 into one contract: native liquidity and semi-fungible behaviour in a single deployment. The idea was right. The execution bled gas — an O(N) loop on transfers, double storage writes, a supply counter that never went down.

402

ERC-402 — the rewrite

We kept the mechanic and rebuilt the storage underneath it: owner and array index packed into one slot, one SSTORE per update, eight owned-ids per slot. The reentrancy guard is real and the supply counter can go down.

v4

The relocation

Then we moved the coinage somewhere no hybrid had put it: inside a Uniswap v4 hook, where the execution price is visible. An interchangeable NFT becomes a dated artefact of the market that produced it.

Changes

What ERC-402 changes.

Four new capabilities. Three corrections to things existing hybrids either ship broken or advertise and then switch off.

01 · NEW

Price-stamped coinage

Every coin records the pool price that struck it. The hook reads sqrtPriceX96 inside the swap — a plain transfer can't see it. This is what the standard exists for.

02 · NEW

Grade from strike

A pure function of the strike price, assigned once and frozen. Populations are emergent from real trading — and one-way: once price leaves a band, that band can only shrink.

03 · NEW

Holder-tiered fees

The pool opens with the dynamic-fee flag, so beforeSwap returns a per-trade override from the best grade in your wallet. 0.25%–1.00%.

04 · NEW

Protocol-owned backing

A share of every swap fee accrues to a treasury reported as per-coin backing. Funded by trading — not by a holder tax or a team allocation.

05 · FIX

No exemption allowlist

All v4 pools share one singleton PoolManager, exempt in code permanently. No pool to pre-register, no un-exemption path that can brick an address.

06 · FIX

Honest supportsInterface

We report IERC721 and IERC721Metadata and keep them on in production — instead of overriding them back off the way shipped hybrids do.

07 · FIX

No tx.origin gate

No msg.sender == tx.origin check, so smart accounts and ERC-4337 wallets are not locked out of the mechanic.

Under the hood

Five permissions, and a hook that never learns who you are.

The permission bits

FlagWhy
beforeInitializeGate pool creation — nobody binds our hook to a pool they chose.
afterInitializeDynamic-fee pools open at zero. Set the 1.00% base here.
beforeSwapReturn the grade-derived fee override.
afterSwapRead the realised price, publish it, take the hoard's cut.
afterSwapReturnDeltaRequired for that cut to actually be charged.

The bit that bites

The flags live in the hook's own address, mined by brute-forcing CREATE2 salts. Miss the return-delta bit and nothing errors — v4 just silently discards the fee. Sorella's Angstrom shipped exactly that, and every swap reverted the moment fees switched on.

The trust boundary

In v4 the sender a hook sees is whoever called swap — a router, not the trader. The only other channel, hookData, is forwarded verbatim from the caller: attacker-controlled by definition. Trusting it is what cost Cork Protocol roughly $12M in May 2025.

So we split the problem along the line where each contract already holds trustworthy information. The hook knows the price and nothing about identity. The token knows the recipient and nothing about price. Neither has to trust the caller.

If tokens move outside a swap, the transient price slot reads zero and the coin is struck unpriced — the correct and safe default.

Grade specification

Bands, populations, and fees.

Real coin-grading vocabulary, not invented rarity tiers. Grade is fixed at the strike, never changes, and sets the swap fee you pay. Populations are from the reference model.

Status

What this is not.

Not an EIP

ERC-402 has not been submitted to or accepted by the Ethereum standards process. Neither was ERC-404. The number is a label chosen for effect.

Not audited

No third-party review has been performed. The two largest v4 hook losses to date were both audited codebases, so an audit is a floor rather than a ceiling.

Not deployed

Nothing exists on any mainnet. Any address claiming to be OBOL today is not ours. We will publish addresses here, and only here, with verified bytecode.

Not a claim on assets

The Hoard supports a floor. It is not redeemable, not a guarantee, and confers no legal or beneficial rights of any kind.