BackGeoOracle on Arbitrum
Uniswap v4 Hook Contract 0x3043e182047f8696dfe483535785ed1c3681bac4 on Arbitrum · Oracle · Verified contract
- Volume (24h)
- $27
- Value locked (TVL)
- $1.43K
- All-time volume
- $4.22K
- Pools using this hook
- 6
- Swaps (24h)
- 51 (45 traders)
- Total swaps
- 3,208
What it does
BackGeoOracle is a zero-fee, full-range oracle pool hook that, when a swap moves the price by more than about 1 bps, runs an offsetting backrun swap and credits the recaptured amount to the trader as ERC6909 claims, so large-impact exact-input swaps are partly compensated while small swaps pay nothing extra.
This read was written for the hook 0x7923…fac4 on Optimism 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
- Records a time-weighted tick and seconds-per-liquidity observation for each pool on initialization, liquidity add/remove and swaps, exposed via observe() for TWAP reads.
- Only allows a single fee-free pool per token pair with maximum tick spacing, and only full-range liquidity positions.
- Measures how far the pool tick has moved since the last observation; moves up to 912 ticks (about 1 bps) are ignored, larger moves trigger a backrun.
- On a backrun, the hook performs an opposite swap against its own pool sized to 9999/10000 of the user's swap output (scaled linearly between 912 and 9116 ticks), then mints ERC6909 claims of the specified currency to the router's msgSender() address.
- Exact-input swaps only; exact-output swaps revert with NotExactIn.
- Anyone can call increaseCardinalityNext to pay for a larger observation buffer.
- Swap behaviour
- beforeSwap reverts for exact-output swaps and refreshes the oracle observation. afterSwap checks whether the tick moved more than 912 ticks since the last observation; if so it executes a counter-swap in the same pool and returns the resulting unspecified-currency delta to the swapper while minting ERC6909 claims of the specified currency to the router-reported sender. Swaps with small tick moves are unaffected, and the hook takes no fee and charges no delta in that case.
- Liquidity behaviour
- beforeAddLiquidity and beforeRemoveLiquidity only refresh the oracle observation. Adding liquidity reverts unless the position is exactly full range at the maximum tick spacing.
- Fee behaviour
- The pool must use a zero static fee (enforced in beforeInitialize). The hook returns a zero fee override. Economic cost to the swapper is the backrun: the swapper receives ERC6909 claims for the backrun amount while the hook absorbs the counter-swap's unspecified delta, so the price-impact recapture is credited back to the trader as claims rather than taken as a fee.
- Owner & admin controls
- No owner, pause, upgrade or parameter-setting functions were found in the ABI or source. Any caller can grow the observation cardinality. The contract is immutable and the pool manager address is fixed at construction.
Enabled Uniswap v4 callbacks
beforeInitialize, afterInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, afterSwapReturnDelta
beforeInitialize restricts the pool to zero fee and maximum tick spacing. afterInitialize seeds the observation array. beforeAddLiquidity enforces full-range positions and updates the oracle. beforeRemoveLiquidity updates the oracle. beforeSwap rejects exact-output swaps and updates the oracle. afterSwap detects large tick moves, performs the backrun swap and mints ERC6909 claims to the sender. afterSwapReturnDelta lets the hook return an unspecified-currency delta to the pool manager.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: No privileged role exists in the ABI or source; there is no owner key that could change parameters, pause swaps or upgrade the logic.
Risk to user funds: The hook does not hold user balances but mints ERC6909 claims for the backrun amount to the router-reported sender and performs counter-swaps that alter pool reserves. Failure to implement msgSender() blocks the affected swaps rather than locking funds.
Security findings
- [medium] Router must implement msgSender(): Backrun settlement calls msgSender() on the sender (the router). Routers that do not implement it revert the swap, and a router returning a wrong address would direct minted ERC6909 claims to that address.
- [medium] Hook executes its own swap and returns deltas: afterSwap performs a poolManager.swap on the same pool during the user's swap and returns an unspecified delta, so the hook can move pool balances and changes the net amounts users receive. The counter-swap uses no price limit beyond the tick extremes and the amount is derived from swap output, so the outcome depends on current pool state.
- [low] Oracle observation can be spammed: Anyone can call increaseCardinalityNext to enlarge the observation array; observations are written at most once per block and the cardinality is bounded by 65535, so cost is paid by the caller.
- [info] Zero-fee pool with no fee path: The hook always returns a zero fee override and the pool is forced to zero fee, so there is no fee revenue for LPs beyond the backrun behaviour.
Contract details
- Verified source
- Yes (BackGeoOracle)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 11,497 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc6909-claims, oracle, return-delta
Pools using BackGeoOracle
- ETH / USDC (0.00% fee) — 24h volume $17, TVL $664, 34 swaps today
- ETH / GRG (0.00% fee) — 24h volume $5.18, TVL $193, 1 swaps today
- ETH / USD₮0 (0.00% fee) — 24h volume $2.99, TVL $334, 13 swaps today
- ETH / ARB (0.00% fee) — 24h volume $1.99, TVL $135, 3 swaps today
- ETH / WBTC (0.00% fee) — 24h volume $0, TVL $80, 0 swaps today
- ETH / XAUt0 (0.00% fee) — 24h volume $0, TVL $21, 0 swaps today