UmiaHook on Base
Uniswap v4 Hook Contract 0x128bedebaa9304db74726efba848a98e7fb53a80 on Base · Oracle · Verified contract
- Volume (24h)
- $337.83K
- Value locked (TVL)
- $3.59M
- All-time volume
- $20.36M
- Pools using this hook
- 2
- Swaps (24h)
- 135 (99 traders)
- Total swaps
- 23,546
What it does
A singleton oracle hook for Umia launch pools that records a manipulation-resistant spot-price TWAP while only the venture's operator can add liquidity, with swap fees accruing natively to that position.
How it works step by step
- Records a slew-limited spot-market TWAP in two ring buffers: a per-block fine ring and an hourly coarse ring.
- beforeInitialize restricts pool initialization to the LBP that registered the pool.
- afterInitialize seeds both oracle rings with the starting tick.
- beforeAddLiquidity and beforeRemoveLiquidity allow only the registered operator and only full-range positions, and record observations before each change.
- beforeSwap writes an observation and returns a zero delta, taking no fee.
- Exposes observe and observeLong for TWAP reads over short and month-scale lookbacks.
- Swap behaviour
- beforeSwap records a pre-swap oracle observation and returns a zero delta, so swap pricing is unchanged and no hook fee is taken.
- Liquidity behaviour
- Only the registered operator (the venture's SpotLiquidityVault) may add or remove liquidity, and only at full-range ticks; each add or remove records a pre-event oracle observation.
- Fee behaviour
- Takes no hook fee; beforeSwap returns a zero delta and the hook's fee override is 0, so swap fees accrue natively to the operator's full-range position.
- Owner & admin controls
- Only INITIAL_OWNER (immutable EOA) can call initialize, one time, to set factory and poolManager; no owner, pause, upgrade or parameter-change functions found. Pool registration is gated by factory.isLBP, and liquidity is gated to the per-pool operator set at registration.
Enabled Uniswap v4 callbacks
beforeInitialize, afterInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap
beforeInitialize restricts initialization to the registering launcher; afterInitialize seeds both oracle rings; beforeAddLiquidity and beforeRemoveLiquidity enforce operator-only, full-range liquidity and write observations; beforeSwap writes an observation and returns a zero delta.
Security & trust assessment
Risk level: low (verified source, high confidence).
Who controls it: The hook has no owner after initialize, so no single key can alter fees, pause swaps or move funds. The only privileged party is the per-pool operator, which alone controls liquidity; a compromised operator or the factory-registered launcher could affect the pool's liquidity and launch flow.
Risk to user funds: The hook takes no return deltas and holds no tokens, so it cannot seize or block user funds through swaps. Liquidity sits in the operator's position, so user exposure depends on the operator's conduct rather than the hook.
Security findings
- [medium] Operator-only liquidity control: Only the registered operator can add or remove liquidity, so the venture controls 100% of canonical liquidity and can withdraw it.
- [low] Dependence on factory registry: Pool registration and initialization depend on the factory's isLBP mapping and launcher address; a flaw in the factory would allow unauthorized pool registration.
- [info] Oracle writes on every swap: Oracle observations are written on every swap and liquidity change, and the slew-limited tick accumulator is manipulation-resistant by design; the oracle is read-only and does not hold funds.
Contract details
- Verified source
- Yes (UmiaHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 9,534 bytes
- Upgradeable proxy
- No
- Detected patterns
- launchpad, oracle
Pools using UmiaHook
- UMIA / USDC (1.00% fee) — 24h volume $337.83K, TVL $3.59M, 135 swaps today
- KOI3TEST / USDC (1.00% fee) — 24h volume $0, TVL $115, 0 swaps today