BagiHasilHook
RobinhoodBagiHasilHook is a Uniswap v4 hook on Robinhood Chain. Live for 1 day. Still in use: 19 trades in the last week, and 3 new pools this week.
- Contract name
- BagiHasilHook
How this hook works
Trading taxA trading tax hook. It takes a cut of every trade and only lets approved callers create pools.
Takes a cut of every trade
On top of the normal pool fee, it keeps a share of each trade. The fee is paid out in the same trade.
The code that does this (afterSwap):function afterSwap(address, PoolKey calldata key, SwapParams calldata params, BalanceDelta delta, bytes calldata) external hanyaPoolManager returns (bytes4, int128) { bool exactInput = params.amountSpecified < 0; bool specifiedToken0 = exactInput == params.zeroForOne; (Currency mataUang, int128 jumlah) = specifiedToken0 ? (key.currency1, delta.amount1()) : (key.currency0, delta.amount0()); if (jumlah < 0) jumlah = -jumlah; uint256 bagian = hitungBagian(key.fee, exactInput, uint256(uint128(jumlah))); if (bagian == 0) return (IHooks.afterSwap.selector, 0); poolManager.take(mataUang, penerima, bagian); emit BagiHasil(key.toId(), mataUang, penerima, bagian); return (IHooks.afterSwap.selector, int128(int256(bagian))); }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, PoolKey calldata key, uint160) external view hanyaPoolManager returns (bytes4) { if (tx.origin != owner) revert BukanOwner(); if (LPFeeLibrary.isDynamicFee(key.fee) || key.fee == 0 || key.fee > FEE_LP_MAKS) { revert FeeTidakDidukung(key.fee); } return IHooks.beforeInitialize.selector; }
Who controls it: It has an admin address, but no admin-only settings in its own code. The code cannot be changed.
Based on the hook’s published code.What do these labels mean?
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 runs when a pool is created, often to lock in that pool’s settings.
Hook history
- Bagi hasil 19 times
Latest transactions
- 0x3e4c62de…b11277 block 114,641,607
- 0x7c17197e…555792 block 114,606,207
- 0xfe230854…29a1f8 block 114,584,779
- 0xe7f69258…ec2273 block 114,498,829
- 0xc4c1a84a…ab1b20 block 114,292,758
- 0x506c820f…e58eca block 114,207,979
- 0x2f6cfd86…52a7b2 block 114,204,829
- 0x31c8b3e6…167650 block 114,196,576
- 0x9ecd3440…818b52 block 114,196,520
- 0x7a90b965…25b8a7 block 114,183,968
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.