Skip to content

Add Ring FewV2 Shell Hook hook on ethereum - #10546

Merged
Ponx merged 1 commit into
mainfrom
hooks/ethereum/0x59255cbc688e402ef980b84668ba1d1c708b6088
Oct 13, 2026
Merged

Ponx merged 1 commit into
mainfrom
hooks/ethereum/0x59255cbc688e402ef980b84668ba1d1c708b6088

Conversation

@hooklist-generator

Copy link
Copy Markdown
Contributor

Summary

Uniswap v4 hook that executes each swap on the canonical Ring Swap v2 (FewV2) FewToken pair: it wraps the input 1:1 into its FewToken, swaps on the pair at live reserves, unwraps the output and settles through PoolManager. It needs no hookData and adds no hook fee. A two-step owner manages a time-locked token allowlist, and a guardian or the owner can pause swaps without blocking liquidity withdrawal.

Flags

Flag Value
beforeInitialize true
afterInitialize false
beforeAddLiquidity false
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 governance

Warnings

None

Closes #10545

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review: hooks/ethereum/0x59255cbc688e402ef980b84668ba1d1c708b6088.json

Address Bitmask (0x6088)

Decoded bits 13–0: beforeInitialize=1, afterInitialize=0, beforeAddLiquidity=0, afterAddLiquidity=0, beforeRemoveLiquidity=0, afterRemoveLiquidity=0, beforeSwap=1, afterSwap=0, beforeDonate=0, afterDonate=0, beforeSwapReturnsDelta=1, afterSwapReturnsDelta=0, afterAddLiquidityReturnsDelta=0, afterRemoveLiquidityReturnsDelta=0.

All 14 flags match the flags section exactly. Confirmed also by getHookPermissions() in FewV2ShellHookBase.

Properties

  • dynamicFee: false ✓ — _beforeSwap returns feeOverride = 0; no updateDynamicLPFee call exists.
  • upgradeable: false ✓ — source_meta.json confirms proxy: false. All factories and dependencies are immutable. No delegatecall to any mutable address. No SELFDESTRUCT.
  • requiresCustomSwapData: false ✓ — The hookData parameter is unnamed and never read in FewV2ShellHookBase._beforeSwap; swaps function without it.
  • vanillaSwap: false ✓ — beforeSwapReturnsDelta is true, and the hook fully replaces swap execution by routing through an external FewV2 AMM pair and returning a custom BeforeSwapDelta.
  • swapAccess: "governance" ✓ — _beforeSwap is guarded by whenNotPaused (OpenZeppelin Pausable). The pause() function is callable by onlyGuardianOrOwner, and unpause() by onlyOwner. This is a boolean admin flag matching the "governance" classification.

Metadata

  • verifiedSource: true ✓ — source_meta.json confirms verified: true.
  • chainId: 1 ✓ — Correct for ethereum per chains.json.
  • name: "Ring FewV2 Shell Hook" ✓ — Project-qualified label for FewV2ShellHook. No audit/safety/endorsement language.
  • description ✓ — Every technical claim is verified in source: 1:1 FewToken wrapping (_wrapExactTo / _approveAndWrapTo), FewV2 swap at live reserves (_executeFewV2ExactInput / _executeFewV2ExactOutput using FewV2Math.getAmountOut), unwrap + PoolManager settlement (_unwrapAndSettleExact), no hookData use (unnamed parameter), no hook fee (feeOverride = 0), Ownable2Step two-step owner, time-locked allowlist (proposeUnderlying + commitUnderlying with immutable addTimelockDelay), guardian/owner pause, liquidity operations unaffected (no liquidity hook flags).

All checks pass.

@Ponx
Ponx merged commit 6e01dcc into main Oct 13, 2026
5 checks passed
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 Shell Hook

1 participant