Add TaxHook hook on ethereum - #7133
Merged
Ponx merged 1 commit intoSep 16, 2026
Merged
Conversation
|
Deployment failed for project hooklist with the following error: Learn More: https://vercel.com/uniswap?upgradeToPro=build-rate-limit |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Review: hooks/ethereum/0xd110e745ae77eca2d1ef631b27e426eebaa9c0cc.json
Address Flags
Decoded lowest 14 bits of 0x...c0cc (0xC0CC = 1100 0000 1100 1100 binary):
| Bit | Flag | Expected | Hook File |
|---|---|---|---|
| 13 | beforeInitialize | false | false ✓ |
| 12 | afterInitialize | false | false ✓ |
| 11 | beforeAddLiquidity | false | false ✓ |
| 10 | afterAddLiquidity | false | false ✓ |
| 9 | beforeRemoveLiquidity | false | false ✓ |
| 8 | afterRemoveLiquidity | false | false ✓ |
| 7 | beforeSwap | true | true ✓ |
| 6 | afterSwap | true | true ✓ |
| 5 | beforeDonate | false | false ✓ |
| 4 | afterDonate | false | false ✓ |
| 3 | beforeSwapReturnsDelta | true | true ✓ |
| 2 | afterSwapReturnsDelta | true | true ✓ |
| 1 | afterAddLiquidityReturnsDelta | false | false ✓ |
| 0 | afterRemoveLiquidityReturnsDelta | false | false ✓ |
Also confirmed by getHookPermissions() in the verified source.
Properties
- dynamicFee: false —
_beforeSwapreturns0as the fee override slot andupdateDynamicLPFee()is never called. ✓ - upgradeable: false —
TAX_ADMINis aconstant,TOKENisimmutable, no proxy pattern, nodelegatecallto a mutable address, noSELFDESTRUCT. ✓ - requiresCustomSwapData: false —
hookDataparameter is ignored in both callbacks. ✓ - vanillaSwap: false —
beforeSwapReturnsDeltaandafterSwapReturnsDeltaare both true; the hook actively takes 3% from swap amounts. Correctlyfalse. ✓ - swapAccess: "none" — No access control on swaps. Pools that don't match
_isOurPool()(ETH/TOKEN) simply receive zero deltas; any caller may swap. ✓
Metadata
name: "TaxHook"matchescontractNamefrom Etherscan source metadata. ✓chainId: 1(ethereum mainnet) is correct. ✓verifiedSource: trueconfirmed by source_meta.json (verified: true,proxy: false). ✓descriptionis factually accurate: the contract chargesTAX_BPS = 300(3% / 300 bps), usespoolManager.take()to extract ETH, forwards it to the hardcodedTAX_ADMINconstant address, applies the tax on ETH→TOKEN buys in_beforeSwap(via returnedBeforeSwapDelta) and TOKEN→ETH sells in_afterSwap(via returned int128 delta). No audit/safety/marketing language present. ✓
All fields verified against on-chain source. No issues found.
Ponx
approved these changes
Sep 16, 2026
Ponx
left a comment
Collaborator
There was a problem hiding this comment.
Bot review verified; bitmask/flags/properties check out. LGTM.
Ponx
deleted the
hooks/ethereum/0xd110e745ae77eca2d1ef631b27e426eebaa9c0cc
branch
September 16, 2026 23:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Charges a fixed 3% (300 bps) tax on every ETH/TOKEN pool swap by taking the tax amount from the pool manager and forwarding it to a hardcoded treasury address. Tax is applied on buys (via beforeSwap delta) and sells (via afterSwap delta).
Flags
Properties
Warnings
Closes #7119