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.
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
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.
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.
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
Four new capabilities. Three corrections to things existing hybrids either ship broken or advertise and then switch off.
01 · NEW
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
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
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
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
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
supportsInterfaceWe report IERC721 and IERC721Metadata and keep them on in production — instead of overriding them back off the way shipped hybrids do.
07 · FIX
tx.origin gateNo msg.sender == tx.origin check, so smart accounts and ERC-4337 wallets are not locked out of the mechanic.
Under the hood
| Flag | Why |
|---|---|
| beforeInitialize | Gate pool creation — nobody binds our hook to a pool they chose. |
| afterInitialize | Dynamic-fee pools open at zero. Set the 1.00% base here. |
| beforeSwap | Return the grade-derived fee override. |
| afterSwap | Read the realised price, publish it, take the hoard's cut. |
| afterSwapReturnDelta | Required 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.
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
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
●
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.
●
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.
●
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.
●
The Hoard supports a floor. It is not redeemable, not a guarantee, and confers no legal or beneficial rights of any kind.