Skip to content

Uniswap v4 hooks and the am-AMM

Uniswap v4 turns the AMM into a platform: every pool can attach a “hook” contract that runs before or after swaps, liquidity changes and donations, while one contract holds all pools and settles net balances with transient storage. That programmability carries a family of designs that stop liquidity providers leaking value to arbitrageurs — auctioning each block’s first trade (McAMM), auctioning pool management and fee rights (am-AMM), eliciting block-end prices from builders (MinMEV), or withholding part of the arbitrage swap (Diamond-style LVR hooks). Solana has no hook framework; its answer is proprietary AMMs whose operators re-centre curves with 143-compute-unit oracle updates.

Uniswap v3 was a vending machine with fixed rules; v4 adds a slot for a plug-in card that can change the price, take a cut or refuse a sale, and all machines share one cash drawer so moving coins between them is free. The am-AMM then rents out the manager’s chair: the highest weekly bidder sets the markup and keeps the takings, the owners collect the rent, and because the manager buys stock at cost, they — not outside traders — pocket the small gains when wholesale prices drift.

A liquidity pool is a pot of two tokens that anyone can trade against at a price set by a formula. Because the formula only moves when someone trades, the pot’s price lags real markets, and fast traders profit from the lag at the pot’s expense. Uniswap v4 lets each pot carry a small program that runs around every trade, so designers can add rules such as changing the fee with market conditions. One rule auctions off the job of managing the pot: the winner pays rent to the owners, keeps the trading fees, and fixes the price lag first, so the lag’s profit flows back to the owners as rent instead of to outsiders.

Scenario: an ETH/USDC constant-product pool run as an am-AMM, pool value $10M, daily volatility 5%, fee cap 1%, auction delay K=50K = 50 blocks.

  1. LPs deposit. Before: LPs hold $5M ETH and $5M USDC. After: pool value V=$10MV = \text{\textdollar}10M; LPs hold pool tokens.
  2. A bidder posts rent. Marta bids R=1.68R = 1.68 USD per block with deposit DRK=84D \ge R \cdot K = 84 USD in pool tokens; the bid activates KK blocks later.
  3. Marta sets the fee. She chooses 30 bps; retail volume of about $3M/day now pays roughly $9,000/day to her, not to LPs.
  4. Block N: price moves 4 bps on the exchange. No outsider can profit (the move is inside the fee), but Marta trades at zero fee and captures it; over a day this is nearly all of the pool’s $3,125 loss-versus-rebalancing.
  5. Rent streams. Each block $1.68 moves from Marta’s deposit to pool-token holders, ≈$12,100/day.
  6. An LP exits, paying a withdrawal fee below 0.13 bps to the manager, which stops LPs leaving after a volatility spike but before Marta can arbitrage.
  • Myth: Hooks can change Uniswap’s core math. Reality: Core is non-upgradeable; hooks run at fixed callbacks with permissions fixed at pool creation, though “custom accounting” lets a hook bypass the curve entirely (Adams et al., 2024).
  • Myth: The am-AMM makes arbitrage disappear. Reality: The manager captures arbitrage inside the no-trade region and pays for it via rent; larger moves still leak to outsiders as “arbitrage excess” (Adams et al., 2025).
  • Myth: A first-trade auction protects users. Reality: It protects LPs; the am-AMM paper warns the manager’s zero-fee access “exacerbates the ‘sandwich attack’ problem”.
  • Myth: Hooks are audited by Uniswap. Reality: Uniswap publishes a security framework and bounty, but the 2025 Cork and Bunni exploits were bugs in third-party hook code partly outside audit scope.

v4 makes the pool programmable, and the most valuable program decides who trades first and at what fee — that is where LP losses to arbitrage are decided.

  • Hooks. “Hooks are externally deployed contracts that execute some developer-defined logic at a specified point in a pool’s execution.” Ten callbacks: before/after initialize, add liquidity, remove liquidity, swap and donate; the hook’s address encodes which fire. Hooks can set static or dynamic fees and keep a share; permissions are immutable flags set at creation. Listed uses: TWAMM, limit orders at tick prices, volatility fees, “mechanisms to internalize MEV for liquidity providers”, custom oracles, constant-product curves.
  • Singleton. All pools live in one contract, making deployment “99% cheaper” and removing inter-pool transfers in multi-hop trades.
  • Flash accounting. Each operation updates a net “delta”; tokens move only at the end of a lock, by which point the caller must owe nothing. take() borrows, settle() repays; transient storage (EIP-1153, since Cancun) makes this cheap.
  • Native ETH, ERC-6909, donate(). ETH transfers cost about 21k gas versus about 40k for ERC-20s; ERC-6909 balances stay inside the singleton; donate() pays in-range LPs. Dropping the enshrined oracle saves about 15k gas on a block’s first swap.

An AMM’s price moves only when someone trades, so each block an arbitrageur trades the stale reserves to the true price; this loss-versus-rebalancing (LVR) is “the first, guaranteed cost that a DEX must pay each block” (McMenamin, 2023). For a constant-product pool with daily volatility σ\sigma it runs at σ2/8\sigma^2/8 of pool value per day at zero fee — 3.125 bps/day at 5% (see /exchange/impermanent-loss-vs-lvr/). The designs below differ in who captures that flow and how proceeds return to LPs.

McAMM: auction the first trade (Herrmann, 2022)

Section titled “McAMM: auction the first trade (Herrmann, 2022)”

A router contract auctions the right to be the block’s first trader (“leadsearcher”); other trades revert until the leadsearcher has traded, and a leadsearcher missing more than three blocks is deselected. Builders comply because reverted trades burn less gas and hence less priority fee. The leadsearcher pays no swap fee, captures all arbitrage, and pays for it in the auction. From Eden Network data the author estimated the first slot at about $9 per block, roughly ten times the second slot, for ~2,100 extra gas per trade (as of 2022-08).

MinMEV: elicit the end-of-block price (nikete, 2022)

Section titled “MinMEV: elicit the end-of-block price (nikete, 2022)”

The builder posts the block’s final price vector plus a deposit at the start of the block; the AMM trades only in such blocks, keeps its net position within the deposit, and pays the builder a fee if the end price matches, otherwise the deposit goes to LPs. It “tries to not emit the extractable value in the first place”, offering no liquidity between blocks.

DMcAMM: decaying dynamic fee (markus_0, 2022)

Section titled “DMcAMM: decaying dynamic fee (markus_0, 2022)”

The swap fee resets to a maximum on every swap and decays with blocks elapsed, so backruns pay the high fee (a Dutch auction among backrunners) and stale-price arbitrage in volatile periods pays more.

Diamond-style LVR hooks (McMenamin, 2023; sm-stack & chris, 2024)

Section titled “Diamond-style LVR hooks (McMenamin, 2023; sm-stack & chris, 2024)”

A beforeSwap/afterSwap pair singles out the first swap in a block. It executes only a fraction 1β(ΔB)1 - \beta(\Delta B) of its size, where β\beta is a decreasing rebate function of blocks since the last swap; the pool still moves to the swap’s implied price and the withheld tokens go to a vault. Later swaps must be matched against a hedger contract’s collateral, pinning the price. Vault tokens are re-added 1–5% per block or converted each block against futures with the arbitrageur. Simulations on a $300M ETH/USDC pool at 5% daily volatility gave a 1.0456 relative return over 180 days with 1% re-adding versus 1.0431 for Diamond’s ideal auction (as of 2023-06).

am-AMM: auction the manager (Adams, Moallemi, Reynolds, Robinson, 2024–25)

Section titled “am-AMM: auction the manager (Adams, Moallemi, Reynolds, Robinson, 2024–25)”

A Harberger lease — a continuous English auction in rent per block — chooses the manager. Bids specify rent RR with deposit DRKD \ge R K and activate after KK blocks (stealing a volatile block would require censoring the chain for KK blocks); the top bid cannot be cancelled. The manager sets ffmaxf \le f_{\max}, receives all swap fees, hence trades at zero fee and captures arbitrage inside the no-trade region. Rent flows in pool tokens to LP-token holders; LPs enter freely and pay a small withdrawal fee.

With V(L)V(L) pool value, H(f,L)H(f, L) noise volume, ARB_PROFIT(f,L)=AP0(f)V(L)\text{ARB\_PROFIT}(f, L) = AP_0(f)V(L) and ARB_EXCESS(f,L)=AE0(f)V(L)\text{ARB\_EXCESS}(f, L) = AE_0(f)V(L) the arbitrage leaking past the manager: ΠMGR(R,L)=maxf[0,fmax]{fH(f,L)+ARB_PROFIT(0,L)ARB_EXCESS(f,L)}R,\Pi^{\text{MGR}}(R, L) = \max_{f \in [0, f_{\max}]}\big\{ fH(f,L) + \text{ARB\_PROFIT}(0, L) - \text{ARB\_EXCESS}(f, L)\big\} - R, ΠLP(R,L)=RARB_PROFIT(0,L)rV(L).\Pi^{\text{LP}}(R, L) = R - \text{ARB\_PROFIT}(0, L) - rV(L). Theorem 1: a zero-profit equilibrium (R,L)(R^*, L^*) exists, the manager’s fee solves fargmaxffH0(f,L)AE0(f)f^* \in \arg\max_f fH_0(f,L) - AE_0(f), and L>Lff(f)$foreveryfixedfee.IntheMilionisetal.modelwithblocktimeL^* > L_{\text{ff}}(f)\text{\textdollar} for every fixed fee. In the Milionis et al. model with block time \Delta t$, $$\frac{\text{ARB_EXCESS}}{\text{ARB_PROFIT}} = \Big(1 + \tfrac{f}{\sigma\sqrt{\Delta t/2}}\Big)\exp!\Big(-\tfrac{f}{\sigma\sqrt{\Delta t/2}}\Big),$$ exponentially small once the fee exceeds a few per-block standard deviations. Unlike McAMM the pool stays accessible every block, at the cost of leaking the excess.

Under competitive priority ordering, a hook can charge the block’s first swap an extra fee increasing in its priority fee, auctioning the first trade without an auction contract (see /mev/order-flow-auctions/).

Same pool as §2: V=$10MV = \text{\textdollar}10\text{M}, σ=5%\sigma = 5\%/day, block time Δt=12\Delta t = 12 s =1.39×104= 1.39\times10^{-4} day, noise volume H=$3MH = \text{\textdollar}3\text{M}/day, risk-free rate 4%/yr.

LVR / arbitrage profit at zero fee. ARB_PROFIT(0)σ28V=0.00258×10,000,000=$3,125\text{ARB\_PROFIT}(0) \approx \dfrac{\sigma^2}{8}V = \dfrac{0.0025}{8}\times 10{,}000{,}000 = \text{\textdollar}3{,}125 per day (about $0.43 per block).

Per-block volatility scale. σΔt/2=0.05×6.94×105=4.17\sigma\sqrt{\Delta t/2} = 0.05 \times \sqrt{6.94\times10^{-5}} = 4.17 bps.

Fixed-fee pool at 30 bps. f/(σΔt/2)=30/4.17=7.2f/(\sigma\sqrt{\Delta t/2}) = 30/4.17 = 7.2, so ARB_PROFIT(30bps)3,1251+7.2=$381\text{ARB\_PROFIT}(30\text{bps}) \approx \dfrac{3{,}125}{1 + 7.2} = \text{\textdollar}381/day (equation (1), cosh factor ≈ 1). LP P&L: 9,0003811,096=$7,5239{,}000 - 381 - 1{,}096 = \text{\textdollar}7{,}523/day.

am-AMM, manager at 30 bps. ARB_EXCESS=3,125×e7.22.3\text{ARB\_EXCESS} = 3{,}125 \times e^{-7.2} \approx 2.3 USD/day. Manager gross =9,000+3,1252=12,123= 9{,}000 + 3{,}125 - 2 = 12{,}123 USD/day; competitive bidding drives rent to R12,123R^* \approx 12{,}123 USD/day =1.68= 1.68 USD per block. LP P&L: 12,1233,1251,096=7,90212{,}123 - 3{,}125 - 1{,}096 = 7{,}902 USD/day.

Fixed-fee 30 bpsam-AMM, manager at 30 bps
Fee revenue to LPs$9,000— (goes to manager)
Rent to LPs$12,123
Arbitrage loss borne by LPs$381$3,125
Cost of capital$1,096$1,096
LP P&L per day$7,523$7,902 (+5.0%)

The 379/daydifferenceisexactly379/day difference is exactly \text{ARB_PROFIT}(30\text{bps}) - \text{ARB_EXCESS} = 381 - 2$: arbitrage the fixed-fee pool leaked to outsiders, now captured by the manager and returned as rent. In equilibrium the extra profit attracts liquidity until LP P&L is zero, so L>LffL^* > L_{\text{ff}} (Theorem 1).

  • Uniswap v4 — hooks, singleton, flash accounting, native ETH, ERC-6909 (whitepaper August 2024); a “Permissioned Pools” hook standard announced July 2026 (Uniswap blog). whitepaper
  • Bunni v2 (BidDog) — open-source am-AMM auction implementation cited by the paper (as of 2024-05), built on v4 with a custom liquidity-distribution function; exploited September 2025 (see §6).
  • Arrakis Diamond hook — proof-of-concept LVR-rebate hook with McMenamin (October 2023, ethresear.ch 15900 reply).
  • Proprietary AMMs via trusted builders — Titan (>50% of blocks) and Quasar (~20%) land makers’ parameter updates; about $10M/day versus $500M on Solana (as of 2026-07, Neuder & Bahrani). ethresear.ch/t/25543
  • n/a for pool hooks — Solana programs compose via cross-program invocation, not callback registries (see /foundations/accounts-and-execution/); Token-2022 transfer hooks act at the token level (see /foundations/token-standards/).
  • Proprietary AMMs (Lifinity since January 2022; SolFi, ZeroFi, HumidiFi, Tessera) — market makers embed their curve in their own program and re-centre it with oracle updates as cheap as 143 compute units; over 60% of SOL/USDC volume (as of 2025-08, Helius) — the am-AMM’s manager without an auction. helius.dev
  • Meteora DLMM — bins with “dynamic, volatility-aware fees”, a DMcAMM-like rule without hooks. docs.meteora.ag
  • Cork Protocol, 28 May 2025, ~$12M wstETH. CorkHook let beforeSwap be called without authorisation with unvalidated hook data; the attacker deposited real tokens into a fake market and redeemed genuine wstETH. Three of four auditors had the hook out of scope (rekt.news, 2025-05). Root cause: hook input validation.
  • Bunni v2, 1 September 2025, ~$8.4M on Ethereum and Unichain. Rounding errors in Bunni’s custom liquidity-distribution function on v4 let carefully sized withdrawals break rebalancing math (rekt.news, 2025-09). Root cause: hook-side precision, not v4 core.
  • Manager sandwiches (am-AMM). “A party that can trade with zero fees can profit by pushing any publicly visible swap transaction to its limit price”; mitigations: private relays, verifiable sequencing rules, off-chain filler auctions (Adams et al., 2025).
  • Builder centralisation. Exclusive first-trade or manager rights can advantage a builder in the block auction, like private order flow (Adams et al., 2025).
  • Oracle manipulation via guaranteed ordering. A leadsearcher “can manipulate an asset price and hold it for 3 blocks guaranteed” (markus_0, 2022). See /exchange/amm-oracles/.
  • Proposer censorship of updates. A proprietary AMM can be picked off if the proposer censors its oracle updates and auctions the arbitrage — the strategy PBS explicitly rewards on Ethereum (Neuder & Bahrani, 2026).
  • Concentrated liquidity. Extending am-AMM to ranged positions “is left for future work” (Adams et al., 2025).
  • How much liquidity can an LVR-retaining pool deploy? “If the pool wants to retain β of the LVR, can the pool deploy more than 1−β of its liquidity?” (McMenamin, 2023).
  • Trustless priority ordering. MEV taxes need builders to follow priority rules; enforcing that is unsolved (Robinson & White, 2024).
  • Active liquidity on Ethereum. Proprietary AMMs need same-slot, top-of-block censorship resistance (FOCIL plus application-controlled execution) to avoid trusted builders (Neuder & Bahrani, 2026).
AspectEthereumSolana
Pool programmabilityv4 hooks with fixed callbacks; custom accountingNo hook framework; programs compose via CPI
LVR mitigation in productionam-AMM implementations (Bunni/BidDog), LVR hooks, MEV taxes proposedProprietary AMMs (>60% of SOL/USDC, as of 2025-08), DLMM dynamic fees, sr-AMM
Who captures the first tradeAuctioned manager/leadsearcher, or builder by defaultMarket maker landing a cheap oracle update before takers
Block cadence12 s; one arbitrage per block400 ms; ~70 updates/s by HumidiFi (as of 2026-07)
Main security incidentCork ($12M, 2025-05), Bunni ($8.4M, 2025-09)— in sources

Ethereum’s slow blocks make each block’s first trade valuable, so its designs auction it and pipe proceeds to LPs. Solana’s fast blocks let makers update their curve before takers arrive, so the “manager” is whoever runs the program and there are no passive LPs to pay rent to. Both depend on ordering guarantees neither protocol fully enforces.

Uniswap v4 Core — Hayden Adams, Moody Salem, Noah Zinsmeister, Sara Reynolds, Austin Adams, Will Pote, Mark Toda, Alice Henshaw, Emily Williams, Dan Robinson; August 2024. app.uniswap.org/whitepaper-v4.pdf

The abstract positions v4 as a non-custodial AMM for the EVM offering “customizability via arbitrary code hooks” on top of v3’s concentrated liquidity, plus gas efficiency from a singleton, flash accounting and native ETH.

§1 Introduction reviews v1/v2 (constant product), v3 (concentrated liquidity, fee tiers) and argues v3 cannot host new features such as TWAMM, volatility oracles, limit orders or dynamic fees without reimplementing the core; it also notes per-pool contract deployment and WETH wrapping as gas costs. Five features answer this: hooks, singleton, flash accounting, native ETH and custom accounting.

§2 Hooks defines hooks as externally deployed contracts run at specified points; the ten action hooks are before/after initialize, add liquidity, remove liquidity, swap and donate, with the hook address determining which fire. Figure 1 shows swap flow: check the beforeSwap flag, run the hook, execute the swap, check afterSwap, run it. §2.2 covers hook-managed fees: static or dynamic, with the hook able to allocate a share to itself and the option fixed at creation; governance can take a capped percentage.

§3 Singleton and flash accounting: a single contract holds all pools, making deployment 99% cheaper; each operation updates a delta and only net balances are transferred at the end of the lock via take() and settle(); solvency is enforced by requiring zero net owed. Before Cancun this was expensive because storage refunds were capped; EIP-1153 transient storage makes it cheap and enables efficient multi-pool routing.

§4 Native ETH: ETH pairs return, since singleton and flash accounting remove the fragmentation and complexity that led v2 to drop them; ETH transfers cost about 21k gas versus roughly 40k for ERC-20s.

§5 Custom accounting: hooks can return deltas that debit or credit users, enabling withdrawal fees, custom LP fee models, matching against flow, or bypassing concentrated liquidity entirely with custom curves such as a v2-style constant product inside a hook.

§6 Other features: ERC-6909 balances inside the singleton; governance may take a capped share of swap fees but no longer controls fee tiers or tick spacings; dropping the enshrined oracle saves about 15k gas on the first swap per block; donate() pays in-range LPs. §7 summarises v4 as non-custodial, non-upgradeable and permissionless, with the singleton usable as “an arbitrary delta resolver”. Reference [1] is the am-AMM paper, cited as the MEV-internalising mechanism.

“Hooks are externally deployed contracts that execute some developer-defined logic at a specified point in a pool’s execution.” (§2)

“The singleton uses “flash accounting,” which allows a caller to lock the pool and access any of its tokens, as long as no tokens are owed to or from the caller by the end of the lock.” (§1)

“Uniswap v4 uses a singleton design pattern where all pools are managed by a single contract, making pool deployment 99% cheaper.” (§3)

“Importantly, hook developers can also forgo the concentrated liquidity model entirely, creating custom curves from the v4 swap parameters.” (§5)

Background needed: v3’s concentrated liquidity and ticks (see /exchange/concentrated-liquidity/), and what EVM storage versus transient storage costs. Skip §4 and §6 on a first pass. The hardest paragraph is §3’s explanation of why flash accounting was expensive pre-Cancun: contracts had to write balances to storage during the call even though they were reset by the end, and EIP-3529’s refund cap meant users still paid; transient storage removes the storage write entirely.

  • The am-AMM paper reached v4 in February 2025 with an equilibrium theorem and a cited open-source implementation (BidDog/Bunni).
  • Hook incidents in 2025 — Cork (May, ~$12M) and Bunni (September, ~$8.4M) — shifted attention to hook security; Uniswap maintains a hook security framework and Cantina bounty.
  • Uniswap announced Permissioned Pools as a v4 hook standard in July 2026, using hooks for issuer-enforced transfer rules rather than MEV capture.
  1. Adams, Moallemi, Reynolds, Robinson, “am-AMM” (2024–25) — read if you want the auction rules and the liquidity theorem.
  2. Herrmann, “MEV capturing AMM (McAMM)” (2022) — read if you want the first-trade auction and builder incentive argument.
  3. McMenamin (The-CTra1n), “LVR-minimization in Uniswap V4” (2023) — read if you want a concrete hook design with simulation results.
  4. Robinson & White, “Priority Is All You Need” (2024) — read if you want MEV taxes as the hook-free alternative.

am-AMM: An Auction-Managed Automated Market Maker — Austin Adams, Ciamac C. Moallemi, Sara Reynolds, Dan Robinson; arXiv:2403.03367, first version 13 February 2024, v4 12 February 2025. arxiv.org/abs/2403.03367

§1 Introduction: LPs want to minimise losses to arbitrageurs (LVR) and maximise fees from retail, two unsolved problems that interact in fixed-fee AMMs (ff-AMMs) because one static fee must serve both. The am-AMM addresses both with one mechanism: an on-chain, censorship-resistant auction for a pool manager who sets fees, collects them, and therefore trades at zero fee. The pool keeps synchronous composability, needs no oracle, and remains accessible. The idea descends from Herrmann’s McAMM, adding fee-setting and accessibility. Drawbacks flagged up front: worse sandwich protection and possible builder centralisation.

§2 Auction design: a Harberger lease — a continuous English auction in rent per block, paid in pool tokens to LP-token holders. Bids carry a deposit DRKD \ge RK and activate after KK blocks; the top bid cannot cancel but may reduce its deposit to RtopKR_{\text{top}}K; a minimum increment applies. The manager sets the fee up to fmaxf_{\max} and receives all fees. KK is chosen so nobody can censor the chain for KK blocks. LPs may exit any time but pay a withdrawal fee (under 0.13 bps for a 1% cap) so they cannot flee after volatility but before the manager arbitrages.

§3 Theory: a constant-product pool with value V(L)=2PLV(L) = 2\sqrt{P}L, noise-trader volume H(f,L)H(f, L) that is decreasing in ff and sub-linear in LL (Assumption 1), arbitrage profit AP0(f)V(L)AP_0(f)V(L) decreasing in ff (Assumption 2, microfounded by Milionis et al.’s formula (1)), and arbitrage excess AE0(f)V(L)AP0(f)V(L)AE_0(f)V(L) \le AP_0(f)V(L) (Assumption 3). Lemma 1 gives a unique ff-AMM equilibrium liquidity via zero LP profit. Theorem 1 gives the am-AMM equilibrium: manager and LP zero-profit conditions, equilibrium fee fargmaxfH0AE0f^* \in \arg\max fH_0 - AE_0, and L>Lff(f)L^* > L_{\text{ff}}(f) for all ff. A corollary shows ffoptf^* \ge f_{\text{opt}}: the manager over-charges slightly to shrink excess.

§4 Structural model: derives AE0AE_0 under geometric Brownian motion and Poisson blocks, yielding formula (3) and the ratio (1+f/σΔt/2)exp(f/σΔt/2)(1 + f/\sigma\sqrt{\Delta t/2})\exp(-f/\sigma\sqrt{\Delta t/2}).

§5 Discussion: risk transfer to a better-capitalised manager is likely welfare-improving; drawbacks are sandwiching by the zero-fee manager, block-builder market effects, and excess leakage that could be fixed by per-block unlocking at the cost of accessibility. Future work: concentrated liquidity and implementation, with BidDog cited as an open-source implementation.

“The ‘auction-managed AMM’ works by running a censorship-resistant onchain auction for the right to temporarily act as ‘pool manager’ for a constant-product AMM.” (Abstract)

“Since the pool manager receives swap fees, they are effectively able to swap on the pool with zero fee.” (§2, Pool manager rights)

“Therefore, in equilibrium, the am-AMM will have higher liquidity than any ff-AMM.” (Theorem 1)

“A party that can trade with zero fees can profit by pushing any publicly visible swap transaction to its limit price.” (§5, Drawbacks)

Background needed: LVR (Milionis et al., 2022) and the no-trade region with fees (Milionis et al., 2023). Skip §4’s derivations and Appendix B on first pass. The hardest paragraph is the manager’s P&L: it earns fees fHfH, the full zero-fee arbitrage profit ARB_PROFIT(0)\text{ARB\_PROFIT}(0) (because it pays no fee), minus the excess that escapes when moves exceed ff, minus rent — so raising ff lowers retail revenue but also lowers excess, which is why ff^* exceeds the revenue-maximising fee.

  • v4 (2025-02) added the equilibrium comparison with fixed-fee pools and the withdrawal-fee appendix; BidDog (Bunni) implemented the auction in 2024.
  • Robinson & White (2024-06) proposed MEV taxes as a way to auction the first trade via priority fees, and noted Sorella’s work on concentrated-liquidity LVR capture.
  • Bunni v2’s September 2025 exploit hit its liquidity-distribution math, not the auction, but it is the most prominent am-AMM deployment to fail.
  1. Milionis, Moallemi, Roughgarden, Zhang, “Automated Market Making and Loss-Versus-Rebalancing” (2022) — read if you want the LVR model the paper builds on.
  2. nikete, “MEV Minimizing AMM” (2022) and markus_0, “Dynamic MEV Capturing AMM” (2022) — read if you want the alternative designs discussed in the same forum thread family.
  3. sm-stack & chris, “Per-block conversion vs. Futures contracts” (2024) — read if you want simulation comparisons of vault re-adding strategies.