Add DragonHook hook on ethereum - #7139
Conversation
|
Deployment failed for project hooklist with the following error: Learn More: https://vercel.com/uniswap?upgradeToPro=build-rate-limit |
There was a problem hiding this comment.
Review: hooks/ethereum/0x5cec52611fbb3c85f3a8b85422f548452faa40c8.json
Address Flags
Decoding the lowest 14 bits of 0x5cec52611fbb3c85f3a8b85422f548452faa40c8:
- Last 2 bytes:
0x40C8→ masked to 14 bits:0x00C8=0000 0000 1100 1000 - Bit 7 (beforeSwap): ✅ true
- Bit 6 (afterSwap): ✅ true
- Bit 3 (beforeSwapReturnsDelta): ✅ true
- All others: ✅ false
Flags in the hook file match the address bitmask.
Source Code Verification
Source is verified on Etherscan. Contract name DragonHook matches source_meta.json.
dynamicFee: false ✅
The hook returns 0 as the fee parameter in _beforeSwap. It never calls poolManager.updateDynamicLPFee() and uses no lpFeeOverride. Confirmed false.
upgradeable: false ✅
All key addresses (owner, dragonToken, hoardVault, platformWallet) are immutable. No proxy pattern, no delegatecall to mutable addresses, no SELFDESTRUCT. The mutable arena and officialPool fields are configurable by the owner but do not make the hook contract itself upgradeable.
requiresCustomSwapData: false ✅
hookData is optionally inspected in _afterSwap to decode a buyer address override, but falls back to sender when hookData.length < 32. No revert on empty hookData.
vanillaSwap: false ✅
beforeSwapReturnsDelta is true and the hook skims a 3% tax via BeforeSwapDelta on every swap, materially changing swap execution. Correctly false.
swapAccess: "none" ✅
_beforeSwap contains no access control gating who can swap. Swaps on a non-official pool are silently no-op'd (return ZERO_DELTA), but this is pool-ID routing, not caller-based access control. All callers can swap freely on the official pool.
Metadata
chainId: 1matchesethereuminchains.json✅name: "DragonHook"matches the on-chain contract name ✅verifiedSource: trueconfirmed bysource_meta.json✅descriptionis technically accurate: 3% tax (TOTAL_TAX_BPS=300), 2.5% to hoard vault (VAULT_BPS=250), 0.5% to platform wallet (PLATFORM_BPS=50), uses BeforeSwapDelta, forwards events to arena contract with sell streaks, whale/dip/crit buy detection — all substantiated by the Solidity logic. ✅
All fields verified. Approving.
Ponx
left a comment
There was a problem hiding this comment.
Bot review verified; bitmask/flags/properties check out. LGTM.
Summary
A v4 hook for an ETH/Dragon token pool that charges a 3% swap tax on every swap (2.5% routed to a hoard vault, 0.5% to a platform wallet) via BeforeSwapDelta, and forwards buy/sell events to an external arena contract tracking sell streaks, whale buys, dip buys, and daily crit intervals.
Flags
Properties
Warnings
Closes #7125