Fee sharing hook on Robinhood Chain
Uniswap v4 Hook Contract 0x6e582dcdbb21902080124fc677db1ed8c1596544 on Robinhood Chain · Fee sharing
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 4 (2 traders)
- Total swaps
- 4
What it does
This hook takes a tax on swaps in afterSwap and distributes it between a protocol fee recipient and distributors, so traders on its pools receive slightly less than the pool's price would otherwise give them, while liquidity providers are tracked but not taxed by it.
How it works step by step
- Tracks registered external base pools via setExternalBaseEnabled and a per-pool externalBasePool mapping, letting configured external bases participate in the hook's pools
- Initializes pools in beforeInitialize only when the pool's pairing is permitted, otherwise reverting with PairingDisabled or PoolAlreadyInitialized
- Takes a tax on swaps in afterSwap and moves the taxed currency through take and accountTransferDelta, using afterSwapReturnDelta so the hook can claim part of the swap output
- Splits collected value between a protocol fee recipient (PROTOCOL_FEE_BPS share) and distributors set by setDistributors, with a fee decay recipient referenced in the bytecode
- Tracks liquidity through afterAddLiquidity and afterRemoveLiquidity, reading registered pools and external base state to keep accounting consistent
- Uses an ERC20-style transfer and transferAllowance path to move tokens held by the hook
- Swap behaviour
- Swaps are processed in afterSwap, where the hook takes a tax on the swap and returns a delta to the PoolManager. Which trade direction pays the tax cannot be determined from the decoded bytecode alone.
- Liquidity behaviour
- afterAddLiquidity and afterRemoveLiquidity run after position changes and update hook accounting for the pool; beforeAddLiquidity and beforeRemoveLiquidity are present as selectors but not enabled in the hook permissions, so they do not gate liquidity.
- Fee behaviour
- A tax is taken on swaps and split between a protocol fee recipient (PROTOCOL_FEE_BPS) and distributors; the exact tax rate source is not determinable from bytecode.
- Owner & admin controls
- Owner (Ownable with ownership handover) can transfer or renounce ownership, set the protocol fee recipient, enable or disable external bases, and set distributors. Changes to the protocol fee recipient and distributor set take effect immediately.
Enabled Uniswap v4 callbacks
beforeInitialize, afterAddLiquidity, afterRemoveLiquidity, afterSwap, afterSwapReturnDelta
beforeInitialize gates which pools can be created with this hook; afterAddLiquidity and afterRemoveLiquidity update accounting after liquidity changes; afterSwap applies the tax and the hook's return delta; afterSwapReturnDelta lets the hook keep part of the swap output.
Security & trust assessment
Risk level: high, estimated (decoded bytecode, low confidence).
Who controls it: The owner key can redirect protocol fees, change distributors, enable or disable external bases, and transfer ownership, which could divert accrued fee value.
Risk to user funds: The hook takes a tax from swaps via return deltas and holds accrued currency before distribution, so traders on taxed pools pay the tax and funds held by the hook depend on owner-configured recipients.
Security findings
- [medium] Hook takes swap value via return delta: afterSwapReturnDelta with a tax path means the hook removes part of each swap's output for itself, reducing what traders receive on taxed swaps.
- [medium] Owner controls fee recipient and distributors: The owner can redirect the protocol fee recipient via setProtocolFeeRecipient and change the distributor list via setDistributors, changing where collected value flows.
- [medium] Owner can enable or disable external bases: setExternalBaseEnabled controls which external base pools are accepted, which can affect pool pairing and trading for existing or future pools.
- [info] Hook holds tokens: The hook transfers and takes currency through take and transfer selectors, so collected tax balances are held by the contract until distributed.
Contract details
- Verified source
- No
- Bytecode size
- 11,981 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc20, fee-sharing, moves-currency, ownable, return-delta, tax
Pools using Fee sharing hook
- IMD / PG (0.00% fee) — 24h volume $0, TVL $0, 4 swaps today