MoonbaseHook on Arc
Uniswap v4 Hook Contract 0xf4eb793908d56315321bcbb1f6b4ee396bad28cc on Arc · Dynamic fee · Verified contract
- Volume (24h)
- $1.96
- Value locked (TVL)
- <$0.01
- All-time volume
- $1.96
- Pools using this hook
- 2
- Swaps (24h)
- 5 (2 traders)
- Total swaps
- 5
What it does
Moonbase fee hook that charges a fixed 1% platform fee plus a 0 to 3% creator or holder-rewards fee on every trade, always paid in the pair asset, and splits it between Moonbase, the token creator and token holders.
This read was written for the hook 0x6ed1…a8cc on Base and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.
How it works step by step
- Charges a fixed 1% Moonbase fee plus a launch-time creator or holder-rewards fee of 0 to 3% on each trade.
- Always takes the fee in the pair asset (native coin, dollar token or tokenized stock), never in the launched token.
- Books creator fees to a per-creator claimable balance, claimable only by that creator.
- Accrues holder-reward and Moonbase fees to wallets that can be flushed by anyone, paying only the configured Moonbase and Rewards wallets.
- Restricts pool initialization and liquidity addition to the Moonbase factory, and provides no liquidity removal path.
- Swap behaviour
- On every swap, beforeSwap or afterSwap (depending on which side the trader fixed) computes the total fee and books it as a PoolManager claim, returning it through the swap deltas. The fee is split into creator, holder and Moonbase portions.
- Liquidity behaviour
- Only the factory can add liquidity, and only through beforeAddLiquidity permission checks; there is no remove-liquidity path in the hook, so liquidity is locked forever. beforeRemoveLiquidity and afterAddLiquidity are not implemented and revert.
- Fee behaviour
- Each pool has a fixed total fee of 1% (Moonbase) plus a creator fee or holder-rewards fee of 0 to 3%, set at launch. The fee is always taken in the pair asset (never the launched token), on whichever side the trader fixes. The fee is split at each trade: creator share to a claimable counter, holder share to the Rewards wallet, Moonbase share (1% plus rounding dust) to the Moonbase wallet.
- Owner & admin controls
- Owner (multisig) can set the factory once, propose new Moonbase and Rewards wallet addresses (effective only after a 48-hour public delay, anyone can apply them after that), and offer ownership via a two-step transfer. Owner cannot pause swaps, change fee rates per pool (rates are fixed at registration), or withdraw pool liquidity. Factory-only: register pool launch parameters and add liquidity.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize: restricts pool initialization to the factory for registered pools. beforeAddLiquidity: restricts liquidity additions to the factory. beforeSwap: computes and books the fee on the pair-asset amount when the trader fixes that side, returning it as a before-swap delta. afterSwap: computes and books the fee when the pool computed the pair-asset side, returning it as an after-swap delta. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to take the fee from swap amounts.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The owner cannot redirect already booked fees directly, and wallet changes require a 48-hour public delay. However, the owner key can propose changing where all future Moonbase and holder fees are sent, and can transfer admin control to another address after acceptance. Compromise of the owner key could redirect future fee flows after the delay.
Risk to user funds: The hook holds fee amounts only as ERC-6909 claims on the PoolManager during a transaction and then moves them out via flush or claimCreatorFees to the Moonbase, Rewards or creator addresses. It does not hold user principal or LP liquidity, and cannot block swaps or remove liquidity. The owner could redirect future fees by changing wallets after the public delay.
Security findings
- [info] Hook takes swap amounts via return deltas: Fees are taken via return deltas, so the hook takes tokens from every swap on registered pools, which is by design but means a bug in fee math would directly affect trader amounts.
- [medium] Fee destination wallets are owner-changeable: Moonbase and Rewards wallets can be changed by the owner through proposeWallets, with a 48-hour delay before applyWallets can be called by anyone.
- [low] Timelocked admin wallet change: Admin can change the Moonbase and Rewards wallets, but the delay gives public visibility of any change before it takes effect.
- [low] Fees held as PoolManager claims: Fees are held as PoolManager ERC-6909 claims until flush or claimCreatorFees, so unpaid claims depend on the PoolManager and the hook's own accounting being correct.
Contract details
- Verified source
- Yes (MoonbaseHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 11,885 bytes
- Upgradeable proxy
- No
- Detected patterns
- fee-sharing, launchpad, ownable, return-delta, rewards, self-unlock
Pools using MoonbaseHook
- USDC / ARCDETRUMP (0.00% fee) — 24h volume $1.96, TVL <$0.01, 3 swaps today
- cirBTC / TEST (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today