Skip to content

Add Ring FewV2 Direct Routing Hook hook on ethereum#601

Open
hooklist-generator[bot] wants to merge 1 commit into
mainfrom
hooks/ethereum/0x1c94eb938ffb066c3a5f0d43e44a428f35a1e888
Open

Add Ring FewV2 Direct Routing Hook hook on ethereum#601
hooklist-generator[bot] wants to merge 1 commit into
mainfrom
hooks/ethereum/0x1c94eb938ffb066c3a5f0d43e44a428f35a1e888

Conversation

@hooklist-generator
Copy link
Copy Markdown

Summary

Ownerless Uniswap v4 hook that exposes Ring FewV2 direct-pair liquidity through v4 swaps. The hook wraps the input token into its canonical FewToken, swaps through the corresponding FewV2 pair, unwraps the output token, and settles back through PoolManager. It does not require or decode custom hookData, does not allow liquidity in the v4 pool, and has no hook owner, pause, upgrade path, or route-control admin.

Flags

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

Properties

Property Value
dynamicFee false
upgradeable false
requiresCustomSwapData false
vanillaSwap false
swapAccess none

Warnings

None

Closes #600

@vercel
Copy link
Copy Markdown

vercel Bot commented May 29, 2026

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

Project Deployment Actions Updated (UTC)
hooklist Ready Ready Preview, Comment May 29, 2026 3:09pm

Request Review

Copy link
Copy Markdown
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.

Review: hooks/ethereum/0x1c94eb938ffb066c3a5f0d43e44a428f35a1e888.json

Contract Identity

  • Source contract name: RingAggregatorHook (confirmed in source_meta.json and NatSpec @title)
  • Verified source: true ✓ (matches source_meta.json: "verified": true, "proxy": false)
  • ChainId: 1 ✓ (matches chains.json for ethereum)

Flags (address bitmask vs. JSON)

0x...e8880b1110_1000_1000_1000, lower 14 bits: 10_1000_1000_1000

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

All 14 flags match the address bitmask and the getHookPermissions() return value.


Properties

  • dynamicFee: false ✓ — _beforeSwap always returns 0 as the third value (no fee override). No call to poolManager.updateDynamicLPFee() anywhere in the source.

  • upgradeable: false ✓ — No proxy pattern, no delegatecall, no SELFDESTRUCT, no mutable implementation pointer. All wiring (fewFactory, fewV2Factory, weth, feeRecipient, uniBurner) is immutable. The only mutable state is _approved (a gas-optimization approval cache, internal only).

  • requiresCustomSwapData: false ✓ — _beforeSwap accepts bytes calldata (hookData) but never decodes or uses it. Swaps execute correctly with empty hookData.

  • vanillaSwap: false ✓ — The hook intercepts the full swap via beforeSwapReturnsDelta: true. In _beforeSwap it takes the input token, wraps it to a FewToken, routes through the corresponding FewV2 pair, unwraps the output, and settles a BeforeSwapDelta back to PoolManager. The swap execution is entirely replaced by the FewV2 route — it cannot be vanilla.

  • swapAccess: "none" ✓ — _beforeSwap performs no access control. There is no allowlist, owner check, governance flag, or temporal gate. Any caller can initiate a swap.


Metadata

  • name: "Ring FewV2 Direct Routing Hook" ✓ — The contract is RingAggregatorHook and its NatSpec @title explicitly references "Ring FewV2 direct-pair" routing. The label is substantiated by the source and contains no promotional, audit, or endorsement language.

  • description ✓ — Accurately describes the contract: ownerless, wraps input to FewToken, routes through FewV2 pair, unwraps output, settles via PoolManager, no hookData decoding, liquidity blocked (_beforeAddLiquidity always reverts), no admin. Every claim is directly verifiable in the Solidity source.


All flags, properties, and metadata are correct. Approving.

@DreamXzxy
Copy link
Copy Markdown

Adding deployment evidence for reviewers:

Smoke swap details:

  • input: 0.0001 ETH
  • output: 0.200262 USDC
  • poolId: 0x56c56d2d3064b20322613b1a64377cb705e964d42899717eb2d51f2a9e8b8aa3
  • hookData: empty
  • fee event: UniFeeAccrued emitted to RingUniBurner

Both contracts are verified on Etherscan. Audit is in progress; we’ll update the audit URL once the final report is available.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hook: Ring FewV2 Direct Routing Hook

1 participant