Custom pricing hook on Ethereum

Uniswap v4 Hook Contract 0x7b6a15c06c19eb6903ebfc368b505353ec2128cc on Ethereum · Custom pricing

Volume (24h)
$0.02
Value locked (TVL)
$0.02
All-time volume
$0.02
Pools using this hook
1
Swaps (24h)
2 (1 traders)
Total swaps
2

What it does

This hook is the sole market maker for an ETH/token pair backed by leveraged Aave ETH: every buy and sell pays a flat 1% fee on its output (split between the creator, the owner and the backing), and large trades are filled beyond the band at an oracle-based reserve price.

This read was written for the hook 0x0c02…a8cc 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

  • Acts as the only liquidity provider for an ETH/token pair: it keeps all pool liquidity in a single band about 10% either side of a computed fair price, and outside LPs cannot add liquidity.
  • Backs the token with ETH that an external engine deposits in Aave with leverage. The hook re-centers its band as that backing grows or the price drifts by about 0.2%.
  • Large trades that run past the band edge are filled partly at a virtual price taken from the engine's reserves, so the swap amounts change inside the hook.
  • Charges a flat 1% fee on the output of every buy and sell, split 0.5% to the token creator and the rest to the owner, minus a retention share kept as backing.
  • Can run an optional pre-launch bonding curve, where ETH is raised directly through the hook. The curve auto-migrates into the pool once a target is reached, and unsold tokens are burned.
Swap behaviour
Only exact-input swaps are allowed, and swaps revert until the band is seeded. Trades larger than the band are partly filled by the hook against Aave-backed reserves; big buys revert if the oracle is stale, and very large sells are capped at the backing value minus 3.5%. A flat 1% fee is taken from the output of every trade.
Liquidity behaviour
All outside add-liquidity attempts revert, so only the hook itself provides liquidity. Remove-liquidity callbacks are disabled, but there are no third-party LP positions to withdraw anyway.
Fee behaviour
A fixed 1% fee applies to the output of both buys and sells and cannot be changed. The creator gets 0.5%, and the owner gets the remaining 0.5% minus a retention below 0.5% that stays in the backing; buy fees are accrued as token claims plus a ledger credit capped at 1% of ETH in.
Owner & admin controls
No owner functions exist in the hook and the fee is hard-coded at 1%. The factory can only make one-time setup calls (pool initialization, band seeding, and bonding-curve setup), and re-centering via poke is open to anyone.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize: only the factory can create the single allowed pool, and the hook records the starting reserves. beforeAddLiquidity: blocks all outside liquidity. beforeSwap: enforces exact-input only, re-centers the band if needed, and fills the beyond-band part of a trade from the engine. afterSwap: takes the 1% output fee, credits the creator and owner, and re-centers the band. beforeSwapReturnDelta and afterSwapReturnDelta: change swap amounts for virtual fills and to collect the fee.

Security & trust assessment

Risk level: medium, estimated (decoded bytecode, medium confidence).

Who controls it: The hook has no owner, and the factory has only one-time setup powers. However, the trust in the external engine and factory, whose code is not shown here, cannot be fully assessed.

Risk to user funds: Traders pay a fixed 1% of output, and a sell's beyond-band portion may pay less than quoted if the leveraged backing cannot be fully realized. No outside LP funds exist, and bonding-curve ETH is held in the hook until migration.

Security findings

  • [medium] Backing held in an external leveraged Aave engine: The pool's ETH backing is moved to a separate engine contract that borrows against it on Aave. Sell payouts depend on that engine's value and ability to unwind, so sellers without a minimum-output limit can receive less than quoted when Aave is degraded.
  • [info] Fixed 1% fee: The fee is a constant 1% on output with no admin control, and the retention share is checked at deployment to be below 0.5%.
  • [low] Oracle dependence: Pricing beyond the band relies on the engine's oracle-based value. Big buys revert and re-centering freezes while the oracle is stale.
  • [info] No outside LPs: Outside liquidity is blocked, so there is no third-party LP principal that the hook could lock.

Contract details

Verified source
No
Bytecode size
18,445 bytes
Upgradeable proxy
No
Detected patterns
erc20, moves-currency, return-delta, self-unlock

Pools using Custom pricing hook