Fee sharing hook on Monad

Uniswap v4 Hook Contract 0x2a27462199df20a0b3c599073ce2480344ef6acc on Monad · Fee sharing

Volume (24h)
$6.66K
Value locked (TVL)
$197
All-time volume
$6.66K
Pools using this hook
4
Swaps (24h)
67 (12 traders)
Total swaps
67

What it does

A creator-tax token hook that taxes swaps on pools it manages, routing fees to treasury, holder rewards, referrers and a buyback reserve, while gating liquidity positions.

This read was written for the hook 0xdd80…2acc on Monad and reused here: the two run the same code.

How it works step by step

  • Applies dynamic creator, platform, LP and referral taxes on swaps, capped by MAX_CREATOR_TAX_BPS and MAX_TOTAL_BUY_FEE_BPS
  • Takes a share of swap amounts through beforeSwapReturnDelta and afterSwapReturnDelta and settles through the PoolManager
  • Routes collected fees to a treasury, holder rewards contract, referrers and a buyback reserve
  • Runs buybacks gated by buybackCooldownBlocks and buybackMaxImpactBps, tracked per pool
  • Tracks LP positions and exemptions with MAX_POSITIONS and MAX_EXEMPT_WALLETS on liquidity add and remove
  • Lets the owner lower taxes over time in TAX_STEP_BPS steps (TaxCanOnlyDecrease guard)
Swap behaviour
beforeSwap and afterSwap compute dynamic buy/sell taxes (creator, platform, LP and referral components), can take a share of the swap via return deltas, and may trigger a buyback of the token when cooldown and impact conditions permit.
Liquidity behaviour
beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity are implemented, with position tracking (MAX_POSITIONS, MAX_EXEMPT_WALLETS, isExempt) and liquidity-gated checks; the hook also appears to manage positions for the creator and enforce a max-position limit.
Fee behaviour
Dynamic taxes are applied on swaps through beforeSwap/afterSwap with a creator tax (capped by MAX_CREATOR_TAX_BPS), a buy fee capped by MAX_TOTAL_BUY_FEE_BPS, a platform fee (PLATFORM_FEE_BPS), an LP fee (LP_FEE), and a referral share (referralShareBps). Tax can step down via TAX_STEP_BPS and lowerTaxes, and fees are tracked per pool in currentFees. Part of the collected fee is routed to treasury, holder rewards, referrers and a buyback reserve.
Owner & admin controls
Owner (ownable, transferOwnership at 0xf2fde38b) can set treasury (setTreasury), factory (setFactory), risk oracle (setRiskOracle), referral share (setReferralShare), holder rewards address (setHolderRewards), register creators (setCreator), toggle referrers (setReferrer), change buyback cooldown and max impact (via 0x40b34b6d and 0x361e5c26 selectors), and lower taxes (lowerTaxes, with a TaxCanOnlyDecrease guard). A pause-like flag (0x902b3d5a / 0x40b34b6d bool) and an emergency delay constant exist, suggesting owner-gated emergency controls; no upgrade proxy pattern was identified in the decoded selectors.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize and afterInitialize register pool configuration (poolKeyOf, config). beforeAddLiquidity/afterAddLiquidity and beforeRemoveLiquidity/afterRemoveLiquidity gate and track LP positions. beforeSwap and afterSwap apply dynamic buy/sell taxes, track buybacks and distribute fees. beforeSwapReturnDelta and afterSwapReturnDelta let the hook take a share of swap amounts as tax, so the hook settles tokens through the PoolManager (take/unlock/settle selectors present).

Security & trust assessment

Risk level: medium, estimated (decoded bytecode, low confidence).

Who controls it: The owner can redirect treasury and holder-reward destinations, change the risk oracle, set referral and creator taxes within caps, and approve creators; a malicious or compromised key could redirect tax revenue or alter the oracle used for gating swaps.

Risk to user funds: The hook can take a tax from each swap via return deltas and move tokens to treasury, holder rewards, referrers and a buyback reserve. It can also revert swaps or liquidity actions via wallet limits, cooldowns and oracle checks, so it can block user operations rather than directly hold pool funds long-term.

Security findings

  • [info] Swap return-delta taxation: Hook takes a portion of every swap via return deltas, so users pay the tax on swaps through this hook.
  • [medium] Owner-controlled fee and oracle destinations: The owner can change treasury, holder rewards, factory and risk oracle addresses; there is no evidence of a timelock in decoded selectors beyond an EMERGENCY_DELAY constant.
  • [medium] Self-unlock buyback mechanism: Buyback logic uses the PoolManager unlock/take/settle flow and self-unlock tags, so a bug in cooldown or impact checks could allow repeated buybacks at adverse prices; cooldown and max-impact parameters are owner-adjustable.
  • [medium] Swaps and transfers can be blocked: Without verified source, the exact implementation of gating (max wallet, exemptions, risk oracle checks) cannot be confirmed, and reverts such as MaxWalletExceeded and TooEarly indicate transfers or swaps can be blocked by the hook.
  • [info] Owner key and token movement: Contract is ownable and performs token moves and transfers; ownership and key management details are not verifiable from bytecode alone.

Contract details

Verified source
No
Bytecode size
23,926 bytes
Upgradeable proxy
No
Detected patterns
erc20, moves-currency, ownable, return-delta, self-unlock

Pools using Fee sharing hook