Fees decided by circuits, not by an admin.
FeeRouteHook is a generic Uniswap v4 hook. Two taped-out circuits pick each swap's LP fee tier from volatility and depth (measured against the pool's own baseline), and two more pick where a 5 bps route fee goes. Every circuit's full output was computed once at deploy, so a TapeOut upgrade cannot change the fee or its destination. There is no owner and no setter.
1000 pips (0.10%), Uniswap v4's protocol-fee cap, taken with the mechanics of v4-core's FeeTakingHook: on the swap's unspecified side and on the amount that actually filled (the output of an exact-input swap, the input of an exact-output swap), paid to the Nandout deploy wallet. This is a different denomination from v4's own protocol fee, which is always taken from the input. Everything else goes to the pool's own in-range LPs.
Worked example, a 1,000-token exact-input swap in the 0.30% tier: 3.000 LP fee to in-range LPs, 0.996 hook fee to the Nandout deploy wallet, 0.498 route fee to in-range LPs (both in the output token); the trader receives 994.51.
Fork of mainnet at the live pool's state (swaps on the fork only, then discarded): calm 0.05% → volatile 0.60% → volatile and thin 1.00%. Reproduce: XCAT_EVIDENCE=true forge test --mc XcatPoolEvidenceForkTest in hook/.
| Block | Tx | Swapper (router) | LP fee applied |
|---|---|---|---|
| 71857165 | 0x515a4f49…6259 | 0xacb0f4… | 0.05% |
| 72022486 | 0xc21010df…e8a4 | 0xacb0f4… | 0.05% |
| 72065945 | 0xf3c214e5…a336 | 0xacb0f4… | 0.05% |
| 72417936 | 0x53577a4e…e084 | 0xfc84ad… | 0.05% |
| 72453040 | 0x144ca39d…06d3 | 0xacb0f4… | 0.05% |
| 72453121 | 0xf3969d45…1b1b | 0xacb0f4… | 0.05% |
| 72453138 | 0xf92cef09…1617 | 0xacb0f4… | 0.05% |
| 72453147 | 0xff77c84f…0d5c | 0xc1e5ac… | 0.05% |
| 72453148 | 0xfb01816a…515f | 0xacb0f4… | 0.05% |
| 72453283 | 0x7392afcf…ec90 | 0xc1e5ac… | 0.60% |
| 72453284 | 0xa88b49f2…b037 | 0xacb0f4… | 0.60% |
| 72453706 | 0x9f0fdce8…3920 | 0xacb0f4… | 0.05% |
| 72454821 | 0x867422a3…8242 | 0xacb0f4… | 0.05% |
| 72530199 | 0xadc924bf…f51e | 0xacb0f4… | 0.05% |
| 72535742 | 0xcb0ccaa5…b8f7 | 0xacb0f4… | 0.05% |
| 73048529 | 0x5cf79f91…a8dd | 0xacb0f4… | 0.05% |
| 73048744 | 0x52540fb0…80a4 | 0xacb0f4… | 0.05% |
| 73811138 | 0xced7082b…4eb1 | 0xacb0f4… | 0.05% |
| 73811139 | 0xdcbf5db8…5217 | 0x54c0bd… | 0.05% |
| 74261417 | 0xc688ee54…37f2 | 0xacb0f4… | 0.05% |
| 74262801 | 0x1a78113f…80e4 | 0xacb0f4… | 0.05% |
LatchLock lock #1: 1,666,059.66 XCAT requested, 1,657,729.37 XCAT actually locked (after LatchLock's 0.5% fee), one tranche, 100% on UNLOCK_T1, beneficiary the Nandout deploy wallet. LATCH_LOCKED stays off for XCAT, because we are not its creator: this tests the lock path, it is not a creator lock. Lock page
FeeRouteHook v1 0x9553B82Baf7EB83e155b33F003d89Aa1D1b040cc is deprecated. It charged the exact-input hook fee in beforeSwap on the amount the trader specified, not the amount that filled, so a partially filled swap (price-limited, or running out of in-range liquidity) paid the fee on input that never swapped, and very large specified amounts reverted. It stays on-chain because it is immutable (no owner, no upgrade path). No pool ever used it. v2 takes the fee in afterSwap on the actual fill; regression test test_partialFillPaysHookFeeOnlyOnFilledAmount.