XautWstGbpHook on Ethereum
Uniswap v4 Hook Contract 0x68cf17471aa0fe54578747c6c7e66795bc8020c0 on Ethereum · Dynamic fee · Verified contract
- Volume (24h)
- $264
- Value locked (TVL)
- $260
- All-time volume
- $319
- Pools using this hook
- 1
- Swaps (24h)
- 2 (2 traders)
- Total swaps
- 5
What it does
An oracle-aware dynamic-fee hook for the XAUT/wstGBP pool that charges arbitrage trades closing a price gap a higher fee (up to a 10% cap) than other trades, with all fees going to LPs and free LP withdrawals.
How it works step by step
- Sets a per-swap LP fee for a XAUT (tokenized gold) / wstGBP pool, based on how far the pool price is from an oracle fair price.
- Fair price is built from Chainlink gold/USD and GBP/USD feeds and the wstGBP wrapper's NAV price.
- Swaps that push the pool back toward fair value (informed flow) pay a directional base fee plus a surcharge; other swaps pay just the base fee.
- If any oracle fails or is stale, or the owner pauses the hook, every swap pays a flat fallback fee instead of being blocked.
- Only works with dynamic-fee pools of this exact token pair; it never touches liquidity or takes tokens.
- Swap behaviour
- Before each swap the hook picks the LP fee from the oracle deviation and trade direction, with arbitrage-style trades that close a price gap paying more; swaps are never blocked. After the swap it only emits a monitoring event.
- Liquidity behaviour
- No liquidity callbacks; LPs can add and withdraw freely.
- Fee behaviour
- Fee is dynamic, set per swap from owner-set parameters, bounded by a hard ceiling of 10%; it goes entirely to LPs as the normal pool fee. Oracle failure or pause switches to a flat fallback fee in both directions.
- Owner & admin controls
- A two-step-transfer owner (stated multisig) can retune fee parameters within bounds checked on-chain (absolute fee ceiling 10%) and toggle pause, which forces the fallback fee rather than stopping swaps. Logic is immutable.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap
beforeInitialize: requires dynamic fee and the XAUT/wstGBP pair; beforeSwap: computes and overrides the LP fee; afterSwap: emits a fee/deviation event only.
Security & trust assessment
Risk level: low (verified source, high confidence).
Who controls it: The owner can adjust fee parameters up to a 10% cap and toggle fallback pricing. They cannot move funds, block swaps, or upgrade the code.
Risk to user funds: The hook holds no funds and only sets the LP fee, between the configured values and a maximum of 10%. LP principal cannot be locked or drained and withdrawals are unrestricted.
Security findings
- [info] Owner-tunable fees capped at 10%: Fee parameters can be changed by the owner but are bounds-checked with a maximum fee of 10%.
- [info] Pause changes pricing only: Pausing makes all swaps pay the fallback fee; it cannot halt swaps or affect liquidity.
- [info] No fund access: No return-delta or remove-liquidity permissions, so the hook cannot take swap tokens or block LP withdrawals.
Contract details
- Verified source
- Yes (XautWstGbpHook)
- Compiler
- solc 0.8.28+commit.7893614a
- Bytecode size
- 7,311 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, oracle, ownable, pausable
Pools using XautWstGbpHook
- wstGBP / XAUt (Dynamic fee) — 24h volume $264, TVL $260, 2 swaps today