Skip to content

Add BackGeoOracle hook on ethereum#384

Open
claude[bot] wants to merge 1 commit intomainfrom
hooks/ethereum/0xB13250f0Dc8ec6dE297E81CDA8142DB51860BaC4
Open

Add BackGeoOracle hook on ethereum#384
claude[bot] wants to merge 1 commit intomainfrom
hooks/ethereum/0xB13250f0Dc8ec6dE297E81CDA8142DB51860BaC4

Conversation

@claude
Copy link

@claude claude bot commented Mar 23, 2026

Summary

BackGeoOracle is a TWAP oracle hook with built-in backrun protection. It records on-chain price observations and automatically executes reverse swaps after large price-impact trades to restore the pool price toward the geometric mean, crediting the original swapper with ERC6909 tokens. Only exact-input swaps are supported, and liquidity positions must be full-range.

Flags

Flag Value
beforeInitialize true
afterInitialize true
beforeAddLiquidity true
afterAddLiquidity false
beforeRemoveLiquidity true
afterRemoveLiquidity false
beforeSwap true
afterSwap true
beforeDonate false
afterDonate false
beforeSwapReturnsDelta false
afterSwapReturnsDelta true
afterAddLiquidityReturnsDelta false
afterRemoveLiquidityReturnsDelta false

Properties

Property Value
dynamicFee false
upgradeable false
requiresCustomSwapData false

Warnings

  • The hook requires calling routers to implement IMsgSender.msgSender() when a backrun is triggered; routers that don't implement this interface will cause the transaction to revert. This is a router compatibility constraint, not a hookData requirement.
  • Only exact-input swaps are supported; exact-output swaps will revert with NotExactIn.

Closes #373

@vercel
Copy link

vercel bot commented Mar 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hooklist Ready Ready Preview, Comment Mar 23, 2026 5:37pm

Request Review

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Review: APPROVE

Hook Review: BackGeoOracle (0xB13250f0Dc8ec6dE297E81CDA8142DB51860BaC4) on Ethereum

Address Bitmask Verification

Address last 14 bits: 0x3AC4 (11101011000100)

Bit Flag Address JSON Source
13 beforeInitialize ✅ true true true
12 afterInitialize ✅ true true true
11 beforeAddLiquidity ✅ true true true
10 afterAddLiquidity ✅ false false false
9 beforeRemoveLiquidity ✅ true true true
8 afterRemoveLiquidity ✅ false false false
7 beforeSwap ✅ true true true
6 afterSwap ✅ true true true
5 beforeDonate ✅ false false false
4 afterDonate ✅ false false false
3 beforeSwapReturnsDelta ✅ false false false
2 afterSwapReturnsDelta ✅ true true true
1 afterAddLiquidityReturnsDelta ✅ false false false
0 afterRemoveLiquidityReturnsDelta ✅ false false false

All 14 flags match the address bitmask and getHookPermissions() in source.

Properties Verification

  • dynamicFee: false ✅ — _beforeSwap returns 0 for the fee override; no updateDynamicLPFee() calls anywhere.
  • upgradeable: false ✅ — No proxy patterns, no delegatecall, no SELFDESTRUCT. Standard non-upgradeable contract.
  • requiresCustomSwapData: false ✅ — Neither _beforeSwap nor _afterSwap reads from hookData; the bytes calldata parameter is unused in both.

Metadata Verification

  • name: BackGeoOracle matches ContractName from Etherscan ✅
  • chain / chainId: ethereum / 1
  • verifiedSource: true — confirmed verified on Etherscan ✅
  • deployer: Valid 0x address format ✅
  • Proxy: Not a proxy contract ✅

Notes

The hook only supports exactIn swaps (reverts with NotExactIn if amountSpecified >= 0), and the _afterSwap backrun logic requires the calling router to implement IMsgSender.msgSender() (reverts with CallingRouterDoesNotReturnSender otherwise when a backrun is triggered). Neither condition relates to hookData, so requiresCustomSwapData: false is correct.

All flags, properties, and metadata are accurate. ✅


A human reviewer must still approve this PR before merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

0 participants