Custom pricing hook on Ethereum
Uniswap v4 Hook Contract 0x15049e0dcc1e85db8c70b3b4ee75310713baa044 on Ethereum · Custom pricing
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 0
What it does
Every swap in the ETH/NEST pool pays a flat 2% fee on its unspecified side regardless of direction or size, with 1% going to the developer treasury and 1% going to the council's currently selected use (NEST burn, LP donation or buyback).
This read was written for the hook 0x269c…a044 on Ethereum and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.
How it works step by step
- Charges a fixed 2% fee on every swap in the ETH/NEST pool, taken from the unspecified side (output on exact-in, input on exact-out) via afterSwapReturnDelta.
- Sends 1% of the fee to a developer treasury address on every swap.
- Applies the other 1% according to the council's active lever: burn NEST (ETH fees are donated to in-range LPs), donate the fee to in-range LPs, or send it to a buyback wallet.
- Restricts pool initialization so only the launcher can create the ETH/NEST pool with this hook, in beforeInitialize.
- Redirects lever fees to the treasury when no liquidity is in range, so donations cannot revert and block swaps.
- Parks ETH that a recipient refuses in pendingEth for later pull-based claiming, so a bad recipient cannot block trading.
- Swap behaviour
- Every swap pays a fixed 2% of its unspecified-side amount: 1% to the treasury and 1% to the council's active lever. Trades in either direction pay the same rate; no trade is favoured or penalised by size or direction. The fee is returned as a return delta so the hook ends the swap with zero net balance.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Fixed 2% of the swap's unspecified side (DEV_FEE_BPS 100 and LEVER_FEE_BPS 100 out of BPS 10000), split 1% to treasury and 1% to the active lever. The pool's own LP fee is not changed by this hook.
- Owner & admin controls
- The owner can set the treasury, buyback wallet, council address and transfer ownership. The council (or owner) can rotate the active lever between Burn, AddLiquidity and Buyback at any time. There is no pause function, no upgradeability and no fee-rate setter; DEV_FEE_BPS and LEVER_FEE_BPS are constants.
Enabled Uniswap v4 callbacks
beforeInitialize, afterSwap, afterSwapReturnDelta
beforeInitialize restricts pool creation to the launcher and to the ETH/NEST pair. afterSwap computes and distributes the 2% fee and applies the lever. afterSwapReturnDelta lets the hook take the fee amount from the swap's output or input.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, high confidence).
Who controls it: The owner can change the treasury, buyback wallet and council to any address and transfer ownership instantly. The council can change the lever at will. Neither can change the fee rate, pause swaps or upgrade the contract.
Risk to user funds: The hook never holds user principal. It only touches the 2% fee credit during afterSwap, and that credit is fully disbursed to the treasury, buyback wallet, NEST burn or LP donation. Only pendingEth balances from failed ETH pushes are held by the contract until claimed.
Security findings
- [medium] Owner can redirect fee destinations: setTreasury, setBuyback and setCouncil let the owner immediately point the 1% treasury share and the buyback share to any non-zero address. This changes where fees go but cannot change the 2% rate.
- [low] Council can switch lever freely: setActiveLever has no timelock; the council can change the lever every block, including sending the 1% share to the buyback wallet or to LPs without notice.
- [info] Return-delta fee capture: The hook takes its fee by returning a positive afterSwap delta and then spending the credit via take and donate. The code comments state the credit is fully spent, leaving zero net hook delta, and this matches the source.
- [info] ETH push via low-level call: ETH payouts use call with a fallback to pendingEth, so a reverting recipient cannot block swaps; the recipient must claim manually.
Contract details
- Verified source
- No
- Bytecode size
- 6,682 bytes
- Upgradeable proxy
- No
- Detected patterns
- donates, moves-currency, ownable, return-delta
Pools using Custom pricing hook
- ETH / NEST (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today