StockifyFeeHook on Base
Uniswap v4 Hook Contract 0x47ec48c74f3069e9ae69406197821996d80200cc on Base · Fee sharing · Verified contract
- Volume (24h)
- $9.20K
- Value locked (TVL)
- $32.77K
- All-time volume
- $6.75M
- Pools using this hook
- 3
- Swaps (24h)
- 147 (47 traders)
- Total swaps
- 25,611
What it does
Takes a fixed 3% native ETH fee on both buy and sell swaps of the ETH/STFY pool and forwards it to a dividend vault that funds stock token purchases.
How it works step by step
- Charges a fixed 3% fee (FEE_BPS 300) on native ETH swap amounts in the ETH/STFY pool
- Takes buy-side fees in beforeSwap and sell-side fees in afterSwap using poolManager.take
- Sends collected ETH directly to the immutable dividendVault address
- Uses before- and after-swap return deltas so the fee is deducted from the trader's amounts
- Ignores pools where ETH is not currency0 and swaps too small to produce a non-zero fee
- Swap behaviour
- On swaps where ETH is currency0 and ETH is the specified side (buys with exact input, sells with exact output), beforeSwap takes 3% of the ETH amount to dividendVault. On the opposite-direction swaps, afterSwap takes 3% of the ETH amount from the output to dividendVault. Swaps on pools where ETH is not currency0 pass through unchanged.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Charges a fixed 3% (FEE_BPS = 300) fee in native ETH on both swap directions of the ETH/STFY pool, only when ETH is currency0. On buys (ETH specified, exact input) the fee is taken in beforeSwap via poolManager.take to dividendVault and returned as a before-swap delta; on sells (ETH is the output, exact output) the fee is taken in afterSwap and returned as an after-swap delta. Fee is forwarded to the DividendVault contract.
- Owner & admin controls
- No admin controls found. The dividendVault address is immutable and set in the constructor; there is no owner, pause, upgrade or parameter-change function. FEE_BPS is a constant at 300 (3%).
Enabled Uniswap v4 callbacks
beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeSwap: takes the 3% ETH fee to the dividend vault on ETH-specified buys and returns it as a before-swap delta. beforeSwapReturnDelta: lets the hook's before-swap delta reduce the swap's input, so the fee is paid out of the trader's input. afterSwap: takes the 3% ETH fee on ETH-output sells and returns it as an after-swap delta. afterSwapReturnDelta: lets the hook's after-swap delta adjust the unspecified currency amount so the fee is paid out of the trader's output.
Security & trust assessment
Risk level: low (verified source, high confidence).
Who controls it: Effectively none. No privileged role exists in the contract, so no key can change the fee, redirect the vault, or pause swaps. The only trust assumption is the immutable dividendVault address, which cannot be corrected after deployment.
Risk to user funds: The hook does not custody user funds; it pulls a fixed 3% ETH fee from each qualifying swap via poolManager.take into DividendVault, so users pay that fee on every trade in the ETH/STFY pool. No admin path can change or block this.
Security findings
- [medium] Immutable fee recipient: The dividend vault address is immutable and baked into the CREATE2 initcode. If the vault is wrong or later malfunctions, the 3% fee on every trade cannot be redirected without redeploying the hook and pool.
- [info] Hook moves currency via return deltas: The hook takes tokens from the pool via poolManager.take and uses return deltas, so it moves ETH on every qualifying swap; it does not hold funds itself but depends on the vault accepting them.
- [info] Rounding to zero on small swaps: The fee rounds down to zero for very small amounts (fee = amount*300/10000), so dust swaps pay no fee; this is a neutral design observation.
- [info] Fee applies only when ETH is currency0: Fee logic only applies when ETH is currency0; swaps on pools with the opposite ordering or non-ETH pairs pass through unfeed.
Contract details
- Verified source
- Yes (StockifyFeeHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 2,873 bytes
- Upgradeable proxy
- No
- Detected patterns
- liquidity-management, moves-currency, return-delta
Pools using StockifyFeeHook
- ETH / STFY (1.00% fee) — 24h volume $9.20K, TVL $32.77K, 147 swaps today
- ETH / TEST (1.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / TEST2 (1.00% fee) — 24h volume $0, TVL $0, 0 swaps today