Buy the token, and the same transaction mints a Hex — an ERC‑721 that earns from every trade after it, in both currencies, and grows while you do nothing. No mint page. No staking. No claim button.
Every trade in the pool pays the Hexes. Every buy also creates or grows one — in the same transaction, with no second step of any kind.
The fee is minted as an ERC‑6909 claim rather than taken.
Why claims, not take(). v4 is delta‑based: the router
settles the trader's input only after swap() returns, so on the input side
those tokens have not arrived yet. take() there reverts with an underflow whenever
the pool's reserve is thin — it passes on a deep pool and fails on a shallow one, which is the
worst possible failure to find in production.
Charging both sides is what makes the yield payable at all.
A Hex should earn ETH — what people want — and HEXFLOW, so the position compounds in the asset it is a position in. A one‑sided fee yields one currency, so getting both would mean swapping internally: paying slippage into your own pool and handing a sandwich to every observer, on every trade. Taking 1% from each side yields both, with no internal swap anywhere.
Weighted by the tokens actually received, inside the PoolManager lock.
The mint uses no ERC‑721 receiver callback. A safeMint here would
hand control to arbitrary code in the middle of a swap, inside the lock — the most dangerous place
in v4 to make an external call. A second buy from the same wallet grows the Hex it already has
rather than minting another.
Claims become real assets, and both currencies land on the Hexes.
Anyone may call it once enough has piled up, so distribution never depends on a team being awake. Keeping it out of the swap path also means a trade only does arithmetic and one storage write — redeeming and distributing cannot affect anybody's fill.
No IPFS. No gateway. No mutable baseURI. Every Hex is a data URI generated
by the contract from live state — and the picture is the position. Drag the sliders.
The exact geometry the contract draws: six vertices on a circle, each curve controlled from the
bisector at r/cos(30°). Amplitude follows your share, strands follow your buys, and
the seal lights only once the Hex has really earned.
HEXFLOW fees do not sit waiting to be claimed. They raise a global index, and
weight = shares × index — so one number moves and every Hex in existence is worth more,
in the same instant.
Two Hexes, equal at the start. One is never touched again; the other unwinds its yield every round. Plotted from the shipped contract maths, not an illustration.
The token has no admin functions at all. The hook's single wiring step erases its own permission on success. The renderer is an immutable, so the artwork can never be repointed.
Fixed supply, EIP‑2612 permit, burn. No mint, no pause, no blacklist, no tax.
The v4 hook. 1% per side, mints the Hex inside the swap, redeems claims out of band.
The Hex. ERC‑721 plus the compounding index and the O(1) ETH accumulator.
SVG and metadata generated in the contract. No IPFS, no gateway, no server.
CREATE2 factory. Reverts unless the hook lands on its mined 0x20CC address.
Minimal v4 interfaces. No periphery dependency to drift out of date.
afterSwap the sender is the router. Without hookData — which the
Uniswap interface cannot send — only tx.origin is left. Right for a person swapping from
their own wallet; wrong for smart contract wallets and aggregators, where the Hex lands on the signing
EOA. It is never used for authorisation, so the worst case is a misattributed position, never a stolen
one.