NFTs that carry their own pricing function and liquidity — no buyers, no LPs, no order book. This site walks through the complete stack built by the author of ERC-7527: the reference implementation, a production auction-pricing engine, and two generations of frontends on Ethereum and BNB Chain.
The core idea fits in three sentences:
Users wrap ETH or ERC-20s into an NFT and can unwrap any time at a function-quoted price. The contract itself is an always-on counterparty: an asset becomes tradable the moment it is issued.
Prices come from a deterministic math function embedded in the contract (getWrapOracle / getUnwrapOracle) — no order book, no external price feed. That is FOAMM: the Function Oracle AMM.
Symmetric pricing (reference implementation) or a LIFO price stack (production) guarantees by construction that the pool can always pay everyone out, in any exit order. Solvency comes from the data structure, not from trust.
Repository owner lanyinzly (Lanyin/Elaine Zhang) is the first author of the ERC-7527 draft — a complete loop from standard → reference implementation → production contracts → product frontends.
The minimal runnable implementation of ERC-7527: Agency (escrow + market making), App (the NFT), and Factory (clone deployment). The README doubles as a full tutorial.
f(x) = k·(1 + x/100), k = basePremiumThe production Agency strategy WrapV3Aution: replaces the linear curve with a time-decay auction, plus holder dividends, ERC-6551 revenue accounts, and ERC-7615 callbacks.
The full-featured Wrap Protocol frontend: bid for a .agency domain NFT → deploy your own pool via the factory → wrap/unwrap → staking / Uniswap integration, with The Graph powering price-history charts.
WrapX, the simplified product: anyone can deploy a pool in one click and wrap BNB/ERC-20 into a named NFT (WToken), pitched as a loyalty / retention "user–protocol relationship" credential.
deployWrapX(name, basePremium, maxSupply, token) — one call to launch a poolFour diagrams: how the repositories relate, how the on-chain contracts are organized, the full lifecycle of one trade, and the standards it builds on.
Each "pool" = one Agency + App pair cloned by the Factory via ClonesWithImmutableArgs; pool-owner revenue is rebased into the ERC-6551 account of their .agency NFT.
The reference implementation makes its case with the simplest possible linear curve. The production engine swaps in a time-decay auction: price jumps on every trade, decays over time, and never falls below the last traded price. The charts and simulator below make this concrete.
f(x) = k·(1 + x/100), k = 0.1 ETH. The n-th NFT costs (n−1)% more than the first. Fully deterministic, hand-computable, arbitrage-free.
Time since the last trade → premium multiple over the last price. Schematic, approximated from the source (Q96 fixed-point + rational interpolation + expWad).
Each wrap pushes the traded price onto a stack (simplified here as +3% per trade); each unwrap redeems at the top of the stack (the most recent traded price) and pops it. Watch how the pool's principal always equals the exact sum of the prices on the stack — solvency is structural.
Mind the LIFO semantics: you redeem at the latest traded price, not at your own entry price — early buyers who exit late capture the curve's upside. Exit order is a game.
Prices are not discovered — they are computed.
Solvency is guaranteed by structure, not by trust.
AMMs need LPs, order books need counterparties, NFT markets need buyers. FOAMM embeds price as a deterministic function: liquid at issuance, zero cold start, no impermanent loss.
Symmetric pricing / the LIFO price stack make "the pool can always pay" a mathematical property of the data structure — not a promise backed by governance or over-collateralization. A clean security philosophy.
Each pool's strategy parameters are appended to the proxy bytecode — zero storage reads, ultra-cheap pool creation, and parameters that are tamper-proof by construction.
Pool revenue flows into the token-bound account of the .agency NFT; the income right transfers automatically with the NFT — "running a pool" becomes "holding a yield-bearing NFT".
unwrap atomically pushes callbacks to whitelisted contracts, letting lending, liquidation, or auto-compounding protocols consume "unwrap" events in real time.
The EIP author personally shipped the standard, the flagship protocol (Ethereum), and the consumer product (BNB) — rare in the EIP ecosystem.
From a full source review, in two parts: first, what the production implementation (wrap-auction) already guards against; then a checklist for anyone planning to implement this open standard themselves.
Each measure below is directly verifiable in the WrapV3Aution source.
WrapV3Aution inherits OpenZeppelin ReentrancyGuard; wrap / unwrap / rebase are all nonReentrant — replacing the fragile totalSupply-delta assertion used by the reference implementation.
All fund flows use safeTransfer / safeTransferFrom, so non-standard tokens (USDT-style) no longer fail silently.
wrap takes a caller-supplied slippagePrice and reverts (WrapV3AutionExceededSlippagePrice) if the on-chain quote exceeds it — no overpaying when the quote jumps between signing and inclusion.
The LIFO price stack (autionPriceList) plus the basePremium anchor make the redemption price always equal the last traded price — the pool stays fully redeemable by construction, with no reliance on governance.
42 integration tests at ~95% lcov coverage across the wrap / unwrap / rebase / dividend paths.
ERC-7527 is an open standard — anyone can ship their own Agency / App. The reference implementation is a teaching template, not a security baseline. Before you build:
Don't copy the reference implementation's totalSupply-delta assertion, and re-examine its transfer-before-mint ordering before reusing any of it.
Use SafeERC20 throughout; let tokenIds auto-increment or be assigned by App.mint instead of trusting external calldata.
Any custom pricing function must keep pool principal ≥ the total owed to all outstanding NFTs, for every possible exit order. Symmetric pricing and the price stack are both just means to this end.
Publish the derivation scripts for any fitted constants and add differential / invariant tests. The auction curve's Q96 magic numbers — unverifiable on-chain — remain this stack's biggest unclosed blind spot.
Publish a "deployed address ↔ source commit ↔ audit report" mapping. The current divergence between the on-chain V2 contracts and the repo's V3 source is the cautionary tale here.
At tiny supply the earliest minters capture outsized dividends (add a minimum-supply threshold or weighting), and the rounding dust from fee splits needs a defined home.
The redemption price is the latest traded price, not the holder's cost basis. A frontend that hides this is storing up complaints and broken trust — surface it next to every unwrap button.
The standards it depends on, and its conceptual siblings.
| Conceptual sibling | What's similar | What's different |
|---|---|---|
| Bonding curves / friend.tech / pump.fun | Price moves along a fixed function with supply; the contract is the counterparty | WrapX tokenizes a "user–protocol relationship", and holders share fees from later participants |
| Gradual Dutch Auctions (Paradigm) | Price jumps on each sale + exponential time decay | wrap-auction adds a hard floor at the last traded price, plus rational-interpolation smoothing |
| NFT AMMs (sudoswap / NFTX) | Both provide on-chain liquidity for NFTs | sudoswap still needs LPs to seed liquidity; FOAMM removes even that step |
| DeFi 2.0 (OlympusDAO) | rebase, vaults, protocol-owned liquidity, dividends | WrapX's principal redemption is structurally guaranteed by the price stack, not a (3,3) game |
| ENS / domain assets | dotAgency is ENS-style naming + resolver | A .agency name itself earns yield (pool revenue accrues to its 6551 account) |
Three tiers, ordered by distance from the existing code.
Short, self-contained answers to the questions people — and AI assistants — ask most about ERC-7527.
getWrapOracle / getUnwrapOracle). The function itself acts as the oracle.