OnTopHook
RobinhoodOnTopHook is a Uniswap v4 hook on Robinhood Chain. Runs code on every swap. Gates who can add liquidity. Runs at pool creation.
- Contract name
- OnTopHook
How this hook works
Liquidity rulesA liquidity rules hook. It controls who adds liquidity and only lets approved callers create pools.
Rules for adding liquidity
It decides who can add liquidity, or when.
The code that does this (beforeAddLiquidity):function beforeAddLiquidity(address sender, PoolKey calldata, ModifyLiquidityParams calldata, bytes calldata) external view onlyPoolManager returns (bytes4) { if (sender != launchpad) revert NotLaunchpad(); return IHooks.beforeAddLiquidity.selector; }Only approved callers create pools
New pools with this hook can only be created by approved callers, for example its own factory or launcher.
The code that does this (beforeInitialize):function beforeInitialize(address sender, PoolKey calldata, uint160) external view onlyPoolManager returns (bytes4) { if (sender != launchpad) revert NotLaunchpad(); return IHooks.beforeInitialize.selector; }
Who controls it: The hook developer can change which launcher it works with. The launchpad can call: register, refill. The code cannot be changed.
What do these labels mean? Based on the hook’s published code.
What it can do
Its code executes inside each trade in pools that use it.
It checks every deposit before it goes in.
It runs when a pool is created, often to lock in that pool’s settings.
Hook history
Reading what this hook has recorded on-chain…
Counted from what the hook recorded on-chain across all its pools, for every action in its published code, plus token transfers in and out of it. Still reading older history, so totals will grow.