CMDHook on Ethereum
Uniswap v4 Hook Contract 0x7b0d132c6bf845d5a072b6cc9201546f0af8a044 on Ethereum · Fee sharing · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $94.00K
- All-time volume
- $6.99M
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 14,068
What it does
A Uniswap v4 fee hook for the CMD token that taxes swaps: buys and early sells pay a decaying fee routed to fee and buyback addresses, while later sells pay a resting fee plus burn, LP, cooldown and dampener surcharges capped at 10%.
How it works step by step
- Charges a launch fee starting at 99% on buys and sells that decays 1% per block to a 1% resting fee
- After the decay window, applies a sell-side bundle of 1% resting fee, up to 2% burn, 0.25% LP slice, 5% cooldown surcharge and up to 3% dampener surcharge, capped at 10%
- Routes resting fee ETH to feeAddress and the remainder to buybackAddress
- Burns CMD sold by converting part of the fee to CMD and sending it to vitalik.eth via CMDCommandments
- Feeds the LP slice to CMDCommandments, which owns a locked permanent LP position
- Blocks exact-output swaps and ignores swaps initiated by the hook or the CMD contract
- Swap behaviour
- On buys the hook takes a decaying fee in CMD and converts it to ETH for fee and buyback recipients; on sells the hook takes a fee in ETH, splitting it between fee and buyback recipients, burning CMD and funding a locked LP, and the amount is returned via afterSwap return delta.
- Liquidity behaviour
- No liquidity callbacks; LP is not managed by this hook. The associated CMDCommandments contract owns a locked permanent position funded by the sell LP slice and harvested 1% per 50,000 blocks.
- Fee behaviour
- Buys pay a decaying fee starting at 99% and falling 1% per block to a 1% resting fee; the fee is taken in CMD from the swap and split into a 1% slice sent to feeAddress in ETH and the remainder converted to ETH via an internal swap and sent to buybackAddress. Sells after the decay window pay a 1% resting fee plus a burn slice (up to 2%), a 0.25% LP slice, a cooldown surcharge of 5% for repeat sellers within 6 hours, and a dampener surcharge of up to 3% based on 24-hour sell volume, with the total capped at 10%. Sells during the decay window pay the decayed fee split between feeAddress and buybackAddress.
- Owner & admin controls
- Owner (Solady Ownable) can call updateFeeAddress and updateBuybackAddress to redirect all hook fee ETH to new recipients; ownership can be transferred or handed over via requestOwnershipHandover/completeOwnershipHandover. The hook is deployed with cmd (CMDCommandments) as the immutable pool-config caller and the hook address is swappable by the CMD token owner via updateHookAddress. The CMD token itself is UUPS upgradeable by its owner and can add distributors, which bypass transfer restrictions.
Enabled Uniswap v4 callbacks
beforeInitialize, afterSwap, afterSwapReturnDelta
beforeInitialize validates the pool is ETH/token, sets deployment block and calls cmd.configurePool to set the locked LP ticks. afterSwap takes fees, runs internal swaps, burns CMD and distributes ETH, and returns a delta equal to the taken fee so the pool's output is reduced (afterSwapReturnDelta).
Security & trust assessment
Risk level: high (verified source, high confidence).
Who controls it: The owner can redirect all fee ETH to any address and can take ownership via transfer. Because the CMD token owner can change the hook address and the CMD owner can upgrade the token implementation, a privileged key can change nearly every rule governing trades, burns and holder transfers.
Risk to user funds: Traders pay the taxes described above on every sell, and fee ETH flows to owner-chosen addresses; the hook can hold ETH transiently and the protocol's locked LP and burn mechanisms can move pool funds through the CMD contract, while the token's upgradability and hook swappability mean the rules can change.
Security findings
- [medium] Owner-redirectable fee destinations: The hook takes its fee in ETH on every sell via afterSwap return delta, and buys/sells route fee ETH to owner-changeable feeAddress and buybackAddress.
- [medium] Very high sell-side taxes: Sells pay up to a 10% combined fee (resting, burn, LP, cooldown and dampener), and the fee tiers are hardcoded constants with a decaying 99% buy fee at launch.
- [high] Upgradeable token and swappable hook controlled by owner: The CMD token is UUPS upgradeable and its owner can set the hook address and add distributors that bypass transfer rules, so the rules can be altered after launch.
- [low] User attribution falls back to tx.origin: The sell path depends on an external IMsgSender call and falls back to tx.origin for user attribution, which affects cooldown and dampener accounting for routers and contracts.
- [info] Pool initialization restricted: The hook is gated to ETH/token pools and only the owner or the CMD contract may initialize the pool, so the pool configuration cannot be set by arbitrary parties.
Contract details
- Verified source
- Yes (CMDHook)
- Compiler
- solc 0.8.30+commit.73712a01
- Bytecode size
- 10,314 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, erc20, moves-currency, ownable, return-delta, tax
Pools using CMDHook
- ETH / CMD (0.00% fee) — 24h volume $0, TVL $94.00K, 0 swaps today