InkotHook on Ink
Uniswap v4 Hook Contract 0x161b70a403104f2dba391ef4048e08c624b9e0cc on Ink · Dynamic fee · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 22 (15 traders)
- Total swaps
- 22
What it does
Takes a fixed 5% fee on the ETH side of every swap in the token/ETH pool, splitting it 2 to 3 between an immutable vault and operator address.
This read was written for the hook 0xfa96…e0cc on Ink 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 constant 5% of the ETH leg on every swap via beforeSwap for ETH-specified swaps and afterSwap for ETH-unspecified swaps
- Mints the toll as ERC-6909 claims inside the PoolManager rather than donating it to LPs
- Splits accrued toll into vaultAccrued (2 points) and opAccrued (3 points) counters
- Lets anyone trigger payouts via collect (to the vault) and claimOperator (to the operator) through an unlock callback that burns claims and takes ETH
- Restricts pool initialization to one ETH/token key with fixed fee and tick spacing, initiated only by the LpManager
- Swap behaviour
- On each swap the hook determines whether ETH is the specified or unspecified currency, computes a 5% fee on the gross ETH amount (adjusted for exact-output), mints that amount as ERC-6909 claims, and returns it as a delta so the trader's ETH settlement is reduced by the toll.
- Liquidity behaviour
- No liquidity callbacks. beforeAddLiquidity, beforeRemoveLiquidity and the after-liquidity hooks revert with HookNotImplemented, and no liquidity permission is claimed, so withdrawals cannot be blocked by this hook.
- Fee behaviour
- Fixed 5% toll on the gross ETH leg of every swap, taken as ERC-6909 claims via beforeSwap or afterSwap return deltas: 2 points accrue to the vault and 3 points to the operator. The pool's LP fee is zero and tollBps() is a pure constant.
- Owner & admin controls
- No owner, no setter, no pause and no upgrade path: the vault and operator addresses and the 5% toll are fixed immutables set in the constructor. Only the immutable LpManager (opener) can initialize the single pinned pool. Payouts are permissionless (collect and claimOperator).
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize restricts the single ETH/token pool to the LpManager with fixed parameters. beforeSwap and afterSwap take the 5% toll on the ETH leg through return deltas (ERC-6909 mint inside the PoolManager). beforeSwapReturnDelta and afterSwapReturnDelta allow the hook to take that fee from swap amounts.
Security & trust assessment
Risk level: low (verified source, high confidence).
Who controls it: No privileged key exists. The operator and vault addresses are immutable and cannot be changed, and the toll rate is a pure constant, so no single party can alter fees or block swaps.
Risk to user funds: The hook holds only ERC-6909 claims it mints for its own fee accounting and can withdraw them solely to the immutable vault and operator addresses through permissionless payout functions. It cannot move pool liquidity or user principal, and it does not block withdrawals, but every swap is taxed 5% of the ETH leg.
Security findings
- [info] Fixed 5% toll on every swap: The hook can take 5% of the ETH leg of every swap via return deltas, so traders receive less than the pool price implies; the rate is hardcoded with no cap change path.
- [low] Payout depends on recipient accepting ETH: Claims are minted inside the PoolManager and paid out with unlock and take; if the operator or vault address cannot receive ETH the counters for that party remain unpaid, but the separate counters prevent one from blocking the other.
- [low] Fee computation depends on currency ordering: Fee math depends on whether ETH is the specified or unspecified currency and uses the exact-output divisor BPS minus bps; this is correct under the stated v4 shape but is sensitive to hook-flag and currency-ordering assumptions.
- [info] No admin or upgrade surface: The hook has no owner, pause, upgrade or parameter setter in the verified source, so there is no admin rug surface; pool initialization is restricted to one configured LpManager address.
Contract details
- Verified source
- Yes (InkotHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 5,512 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc6909-claims, liquidity-management, moves-currency, return-delta, self-unlock, tax