Fee sharing hook on Arc

Uniswap v4 Hook Contract 0x61d3117023d827f4851e88a7cad5c7bd49e4c4cc on Arc · Fee sharing

Volume (24h)
$102
Value locked (TVL)
$13.99K
All-time volume
$470.56K
Pools using this hook
295
Swaps (24h)
33 (21 traders)
Total swaps
4,592

What it does

A fee-taking hook that skims a configurable total fee on swaps through return deltas and splits it between a treasury, token creators and a multi-level referral tree, for tokens registered by a launcher.

How it works step by step

  • Takes a fee on swaps for pools whose tokens are registered (registerToken, isRegisteredToken, canonicalPool), using beforeSwap and afterSwap return deltas and pulling the currency out of the pool manager with take.
  • Splits the fee into referral, creator, treasury and other shares (setFeeSplit with referralFeeShare, creatorFeeShare, treasuryFeeShare), with L1, L2 and L3 referral fee constants and a uniReferral address.
  • Looks up referrers through an external referral tree (getReferralTree, updateReferrer) and records creator and referrer mappings per token.
  • Calls external contracts named by selectors addTickets(address,uint256) and triggerDrop(), which suggests a ticket or drop reward mechanic tied to swaps, though this is not confirmed.
  • Uses role-based access control (ADMIN_ROLE, DEFAULT_ADMIN_ROLE) plus a launcher address and a whitelist of relayers to manage setup.
Swap behaviour
beforeSwap and afterSwap both read the total fee, the share settings, the registered-token, canonical-pool and relayer mappings, and the referrer mappings. They return deltas so the hook can take a fee from the swap amounts, then send out the shares and possibly call the referral and ticket contracts. The exact fee-charging side and the distribution flow cannot be fully confirmed from the bytecode.
Liquidity behaviour
afterAddLiquidity is enabled, but the decoded function takes no state-reading or writing action that can be identified, and the other liquidity callbacks are not enabled. It most likely just returns, or acts as a pass-through. No fee or delta handling for liquidity was found.
Fee behaviour
A totalFee (denominated by FEE_DENOMINATOR and BPS_DENOMINATOR) is set by an admin with setTotalFee and taken from swaps via return deltas. It is divided by setFeeSplit across referral, creator and treasury shares, with a feeRecipient receiving the treasury portion. The fixed L1, L2 and L3 referral fee constants set the referral levels. Pool-level LP fees are not changed by the hook, as no dynamic fee override was seen.
Owner & admin controls
Accounts holding ADMIN_ROLE or DEFAULT_ADMIN_ROLE (OpenZeppelin-style AccessControl with grantRole, revokeRole, renounceRole) can change the total fee, the fee split, the fee recipient, the launcher address and the relayer whitelist. The launcher can register tokens and set up pools and referral links. Other setters (a function with a bool and uint16 and some with several uint256 arguments) write per-id flags and uint16 values, with unknown purpose. No pause function and no upgrade or proxy function were found.

Enabled Uniswap v4 callbacks

afterAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

afterAddLiquidity is enabled but appears to do nothing meaningful. beforeSwap computes and takes the hook fee through a return delta and sets up the referral and creator accounting. afterSwap handles the fee on the output side through its return delta and settles distribution. beforeSwapReturnDelta and afterSwapReturnDelta allow the hook to modify the swap amounts, which is how the fee is taken.

Security & trust assessment

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

Who controls it: Admin role holders can raise the fee, change the split, redirect the fee recipient, replace the launcher and whitelist relayers. They can also grant or revoke roles. This directly affects swap cost and where proceeds go, but nothing shows they can withdraw LP positions.

Risk to user funds: The hook takes swap fee currency from the pool manager through take and passes it on to recipients, so it may briefly or persistently hold fee tokens. No function was seen to withdraw LP liquidity, and the liquidity callbacks are mostly inactive. Swaps could be blocked if an external call reverts. Beyond the fee, user principal exposure appears limited, but this cannot be confirmed without source.

Security findings

  • [medium] Hook takes fees via swap return deltas: beforeSwapReturnDelta and afterSwapReturnDelta are enabled and the bytecode calls take(address,address,uint256), so the hook removes currency from swaps for itself and its recipients. Traders receive worse prices by the fee amount.
  • [medium] Admin can change the fee and its split: setTotalFee and setFeeSplit are role-gated and write the fee storage that beforeSwap and afterSwap read. Whether a cap exists on the fee could not be seen in the decoded code, so a high fee may be possible.
  • [low] Fee recipient and launcher are changeable: setFeeRecipient and setLauncher let privileged accounts redirect treasury proceeds and change who registers tokens and pools.
  • [low] Swaps depend on external contracts: The hook calls out to a referral tree (getReferralTree, updateReferrer), creator() and likely a ticket and drop contract (addTickets, triggerDrop). A failure or revert in these calls could block swaps on affected pools, though error handling is unknown.
  • [info] Unverified source: No verified source is available, so the exact fee logic, caps and token flows are inferred from selectors and storage access only.

Contract details

Verified source
No
Bytecode size
13,679 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, return-delta

Pools using Fee sharing hook