UniswapV2Aggregator
RobinhoodUniswapV2Aggregator is a Uniswap v4 hook on Robinhood Chain. Live for 1 day. Active: 123 trades in the last week, and 1 new pool this week.
- Contract name
- UniswapV2Aggregator
How this hook works
Route to Uniswap v2This hook lets Uniswap v4 trades be filled by the matching Uniswap v2 pool. The v4 pool holds no money of its own: every trade is passed straight through to the v2 pair, with Uniswap's protocol fee taken if it is switched on.
Trades go to the v2 pool
When someone trades in this pool, the hook makes the same trade in the Uniswap v2 pair for the two tokens and hands back the result.
The code that does this (_beforeSwap):function _beforeSwap(address sender, PoolKey calldata key, SwapParams calldata params, bytes calldata) internal virtual override returns (bytes4, BeforeSwapDelta, uint24) { (uint256 amountIn, uint256 amountOut) = _internalSettle(key, params); return _innerBeforeSwap(sender, key, params, amountIn, amountOut); }No liquidity of its own
Liquidity providers cannot add liquidity here. All the liquidity comes from the v2 pair.
The code that does this (_beforeAddLiquidity):function _beforeAddLiquidity(address, PoolKey calldata, ModifyLiquidityParams calldata, bytes calldata) internal pure override returns (bytes4) { revert LiquidityNotAllowed(); }One pool per pair
A pool can only be set up for tokens that already have a v2 pair, and it uses the same price formula as v2.
The code that does this (_beforeInitialize):function _beforeInitialize(address, PoolKey calldata key, uint160) internal virtual override returns (bytes4) { if (key.currency0.isAddressZero() || key.currency1.isAddressZero()) revert NativeCurrencyNotSupported(); if (key.fee != fee) revert ExternalPoolMismatch(); if (key.tickSpacing != 1) revert ExternalPoolMismatch(); address token0 = Currency.unwrap(key.currency0); address token1 = Currency.unwrap(key.currency1); address pairAddr = _resolveExternalPool(token0, token1); if (IUniswapV2Pair(pairAddr).token0() != token0 || IUniswapV2Pair(pairAddr).token1() != token1) { revert ExternalPoolMismatch(); } PoolKey storage existing = _canonicalPoolKeyByAddress[pairAddr]; if (address(existing.hooks) != address(0)) { revert PairAlreadyHasCanonicalPool(existing.toId()); } _canonicalPoolKeyByAddress[pairAddr] = key; poolIdToExternalPair[key.toId()] = pairAddr; _initializedPools.push(key); emit AggregatorPoolRegistered(key.toId()); pollTokenJar(); return IHooks.beforeInitialize.selector; }Protocol fee
If Uniswap's protocol fee is on for the pool, a share of each trade is sent to Uniswap's fee jar.
The code that does this (_applyProtocolFee):function _applyProtocolFee( IPoolManager poolManager, PoolKey calldata key, SwapParams calldata params, int128 unspecifiedDelta ) internal returns (int128) { uint24 protocolFee = _getProtocolFee(poolManager, params.zeroForOne, key.toId()); return _applyWithProtocolFee(poolManager, key, params, unspecifiedDelta, protocolFee); }
Who controls it: There are no admin settings. The fee jar comes from Uniswap's own fee settings, and the code cannot be upgraded.
Based on the hook’s published code.What do these labels mean?
Safety report
Before you build on it. Automated checks, not an auditpairAddr on every trade.What it can do
Its code executes inside each trade in pools that use it.
It can take or add tokens during a swap. Fees, burns and custom curves work this way, and so do scams.
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
Across all its pools, the hook filled a trade through Uniswap v2: $68.4k.
- Filled a trade through Uniswap v2 123 times, worth $68.4k
Latest transactions
- 0x1e499964…44aa61 block 118,458,722
- 0x7bf4c229…d61ce0 block 118,458,213
- 0x32208091…db0469 block 118,457,559
- 0xc218cb7b…a472d4 block 118,456,869
- 0xad1eaa9c…676a7e block 118,456,276
- 0x728cc80a…b366ca block 118,454,230
- 0x92e9b178…c5547d block 118,453,887
- 0x26ec092d…427528 block 118,453,193
- 0x3f9df595…dd7e9d block 118,451,070
- 0x1632bac3…12e2ec block 118,450,459
Settings changes: updated where protocol fees go (1 time), set up a pool that routes to Uniswap v2 (1 time).
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. Dollar values count the amounts paid in ETH, stablecoins, BNB and BTC, at today’s prices.