Skip to content

Add FWATokenHook hook on ethereum#1116

Merged
marktoda merged 1 commit into
mainfrom
hooks/ethereum/0x2c67eba8a50af0db5fba55f725247a75cbda6444
Jul 21, 2026
Merged

Add FWATokenHook hook on ethereum#1116
marktoda merged 1 commit into
mainfrom
hooks/ethereum/0x2c67eba8a50af0db5fba55f725247a75cbda6444

Conversation

@hooklist-generator

Copy link
Copy Markdown
Contributor

Summary

ETH/FWAToken pool hook that charges a flat 1% fee on all swaps, routing proceeds to an owner-set fee wallet (buys: fee taken in FWAToken and swapped to ETH; sells: fee taken in ETH). Pool initialization is gated on the token's launching() flag; buy-side swaps revert for unauthorized callers until the owner enables external trading via externalBuysEnabled.

Flags

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

Properties

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

Warnings

  • Submitter did not provide a description. Using AI-generated description.

Closes #1111

@vercel

vercel Bot commented Jul 20, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
hooklist Ready Ready Preview, Comment Jul 20, 2026 2:41pm

Request Review

@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/0x2c67eba8a50af0db5fba55f725247a75cbda6444.json

Address Flags

Address 0x2c67eba8a50af0db5fba55f725247a75cbda6444 — last 2 bytes 0x6444 = 0b0110_0100_0100_0100.

Decoding bits 13–0:

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

getHookPermissions() in the verified source confirms identical values.

Properties

  • dynamicFee: false — No updateDynamicLPFee() call. No beforeSwap flag. Fee is a fixed 1% (FEE_BIPS = 100 / TOTAL_BIPS = 10_000). ✓
  • upgradeable: false — No proxy pattern, no delegatecall, no mutable implementation slot, no SELFDESTRUCT. source_meta.json confirms proxy: false. ✓
  • requiresCustomSwapData: false_afterSwap ignores hookData entirely; swaps execute correctly with empty calldata. ✓
  • vanillaSwap: false — Correct. afterSwapReturnsDelta is true and the hook executes a nested pool swap inside _handleBuy (poolManager.swap(...) in _swapTokenToEth), which modifies how the swap executes. ✓
  • swapAccess: "governance" — Buy-side access control in _afterSwap gates on externalBuysEnabled, a boolean toggled by the owner via setExternalBuysEnabled(). This is governance gating. ✓

Metadata

  • chainId: 1 — Matches ethereum in chains.json. ✓
  • name: "FWATokenHook" — Matches ContractName from Etherscan (source_meta.json) and the NatSpec @title in source. No promotional/audit language. ✓
  • verifiedSource: truesource_meta.json confirms verified: true. ✓
  • description — Accurately reflects the source: flat 1% fee in both directions, buy fees taken in FWAToken and swapped to ETH, sell fees taken in ETH, pool init gated on launching(), buy-side revert via ExternalBuysDisabled until owner enables external trading. All claims substantiated by the Solidity logic. ✓

Verdict

All flags, properties, and metadata are correct and consistent with the on-chain verified source.

@marktoda marktoda 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.

Bot review verified. FWATokenHook (ethereum). Flags: beforeInitialize, afterAddLiquidity, afterSwap, afterSwapReturnsDelta. LGTM.

@marktoda
marktoda merged commit 90b3a1c into main Jul 21, 2026
7 checks passed
@marktoda
marktoda deleted the hooks/ethereum/0x2c67eba8a50af0db5fba55f725247a75cbda6444 branch July 21, 2026 16:24
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: FWATokenHook on Ethereum

1 participant