Fee sharing hook on BNB Chain
Uniswap v4 Hook Contract 0x5cee8d488fa24919ceea0afe74aee359bab32acc on BNB Chain · Fee sharing
- Volume (24h)
- $0
- Value locked (TVL)
- $79
- All-time volume
- $1.12K
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 55
What it does
Appears to be a fee-sharing hook that charges a swap tax via external tax parameters and distributes accrued fees, though exact behaviour is unverified.
How it works step by step
- Computes a base fee (BASE_FEE_BPS) and tax rate (taxRate, marketTax) for each swap
- Records swaps and accrues tax through recordSwap and accrueTax
- Takes or returns currency deltas during swaps via return-delta permissions
- Distributes accrued fees through swapFees
- Uses unlock and unlockCallback to settle balances with the PoolManager
- Swap behaviour
- beforeSwap and afterSwap compute and record a tax on swaps (recordSwap, accrueTax) and may take or return currency deltas through the return-delta permissions.
- Liquidity behaviour
- beforeAddLiquidity and beforeRemoveLiquidity are present as view functions in the dispatch table, suggesting they may revert or gate liquidity changes; actual logic cannot be confirmed from bytecode alone.
- Fee behaviour
- Hook reads a base fee (BASE_FEE_BPS) and a tax rate (taxRate, marketTax) and calls accrueTax to account a tax on swaps; swapFees(address,address,address,uint256,uint256) is a dispatched function that appears to distribute accrued fees. Exact fee formulas cannot be determined without source.
- Owner & admin controls
- swapFees and unlockCallback are externally callable; decoded bytecode does not reveal an owner check, so caller restrictions cannot be confirmed. No pause or upgrade functions were decoded. Tax-related parameters (taxRate, taxEnabled, marketTax, BASE_FEE_BPS) are read via external calls and appear configurable by an external contract rather than by a verified owner.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize: pool initialization checks or setup. beforeAddLiquidity and beforeRemoveLiquidity: gating or inspection of liquidity changes. beforeSwap and afterSwap: tax computation and recording of swaps via recordSwap. beforeSwapReturnDelta and afterSwapReturnDelta: the hook takes or returns currency deltas, so it can alter the amounts settled in a swap, consistent with the moves-currency and self-unlock heuristic tags.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: Callers of swapFees and unlockCallback are not restricted in any decoded check. Whoever controls the external tax, vault or market configuration contracts can change tax rates or redirect accrued fees, which affects all swappers in pools using this hook.
Risk to user funds: The hook can take and move currency during swaps and fee accrual, so it can alter amounts settled for swappers and liquidity providers. Tax rates set by external contracts determine how much of each swap is diverted. Without source, the exact exposure cannot be fully quantified.
Security findings
- [medium] Hook settles currency during swaps: The hook has beforeSwapReturnDelta and afterSwapReturnDelta enabled and calls take, transferFrom and transfer, so it moves currency during swaps and can change the amounts settled.
- [medium] Self-unlock pattern: The hook calls unlock and has an unlockCallback entry point, so it can open its own unlock context with the PoolManager.
- [medium] Tax parameters set externally: Tax rate, marketTax and taxEnabled are read from external calls, so tax parameters are set outside this bytecode and may be changed without a visible on-chain event in this contract.
- [low] Unclear access control on fee distribution: swapFees and unlockCallback appear without a decoded access check; caller restriction could not be confirmed.
- [info] Reentrancy guard and SafeERC20 present: Decoded bytecode shows a reentrancy guard error and SafeERC20 usage, which suggests reentrancy protection and safe token transfers were implemented.
Contract details
- Verified source
- No
- Bytecode size
- 9,854 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, return-delta, self-unlock
Pools using Fee sharing hook
- WBNB / KNOTDOG (0.00% fee) — 24h volume $0, TVL $79, 0 swaps today