PearHook
EthereumPearHook is a Uniswap v4 hook on Ethereum. Brand new: its first pool went live today. Still in use: 37 trades in the last week, and 14 new pools this week.
- Contract name
- PearHook
How this hook works
Token hub and spokesPEAR is a token that this hook creates and runs. Every buy and sell on a PEAR pool pays a 2% tax to the hook developer, and the main PEAR/ETH liquidity is held by the hook and locked for a set time.
Main liquidity is time-locked
The hook puts the whole starting PEAR supply into the PEAR/ETH pool and nobody else can add or remove liquidity there. The hook developer can only take it out after the lock ends, and can make the lock longer but never shorter.
The code that does this (unwind):function unwind(PoolId id, uint256 start, uint256 count) external nonReentrant returns (uint256 otherAmount, uint256 pearAmount) { if (msg.sender != beneficiary) revert NotBeneficiary(); if (lpUnlockTime == 0 || block.timestamp < lpUnlockTime) revert LiquidityLocked(); if (PoolId.unwrap(id) != PoolId.unwrap(hubId) && _spokes[id].token == address(0)) revert UnknownPool(); (otherAmount, pearAmount) = abi.decode( poolManager.unlock(abi.encode(Action.Withdraw, abi.encode(id, start, count))), (uint256, uint256) ); emit Unwound(id, otherAmount, pearAmount); }2% tax goes to the hook developer
Every buy and sell on a PEAR pool pays 2%: in ETH on the main pool, and in the other token on side pools. Plain PEAR transfers are not taxed, and anyone can trigger the payout, but it always goes to the hook developer.
The code that does this (beforeSwap):function beforeSwap(address sender, PoolKey calldata key, SwapParams calldata params, bytes calldata) external onlyPoolManager returns (bytes4, BeforeSwapDelta, uint24) { // no swaps on PEAR pools while listSpoke / sweep / compound / bootstrap are mid-flight if (_reentrancyGuardEntered()) revert Reentrancy(); if (Currency.unwrap(key.currency0) == address(0)) { // HUB: record the oracle on the first swap of the block, using the pre-swap tick. (, int24 tick,,) = poolManager.getSlot0(hubId); if (oracle.write(uint32(block.timestamp), tick)) { hubBlockTime = uint32(block.timestamp); hubBlockOpenTick = tick; hubBlockMaxDev = 0; } // swap tax, always in ETH. When ETH is the specified currency it is charged here (the swap is // resized by the tax); otherwise it is charged on the ETH leg in afterSwap. int256 specified = params.amountSpecified; if (params.zeroForOne == (specified < 0)) { uint256 tax = uint256(specified < 0 ? -specified : specified) * TAX_BPS / BPS; _accrueEthTax(tax); return (IHooks.beforeSwap.selector, toBeforeSwapDelta(int128(uint128(tax)), 0), 0); } return (IHooks.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0); } return (IHooks.beforeSwap.selector, _fillSpoke(key.toId(), sender, params), 0); }Side pools filled by the hook
Anyone can open a PEAR pair with a token that already trades against ETH on Uniswap v3, and the hook mints fresh PEAR for it (1% of what is left under a fixed cap). These pools hold no normal liquidity: the hook fills each trade from its own stock at a price taken from average market prices plus a spread, with limits on how much PEAR can leave per block and per period.
The code that does this (_fillSpoke):function _fillSpoke(PoolId id, address sender, SwapParams calldata params) internal returns (BeforeSwapDelta) { Spoke storage s = _spokes[id]; if (s.token == address(0)) revert UnknownPool(); bool pearOut = params.zeroForOne != s.pearIsCurrency0; (uint256 amountIn, uint256 amountOut, uint256 fee, Pricing memory p) = _quote(s, params.zeroForOne, params.amountSpecified, true); taxOwed[s.token] += p.tax; // always in X if (amountIn > uint128(type(int128).max) || amountOut > uint128(type(int128).max)) revert AmountTooLarge(); if (pearOut) { // ── risk controls: PEAR leaving the hook ── if (amountOut > s.pearInventory) revert BudgetExceeded(); uint256 budget = s.pearBudget; if (block.timestamp >= uint256(s.epochStart) + EPOCH) { s.epochStart = uint64(block.timestamp); s.epochPearOut = 0; } uint256 epochOut = uint256(s.epochPearOut) + amountOut; if (epochOut > budget * EPOCH_CAP_BPS / BPS) revert EpochCapExceeded(); if (s.lastOutBlock != block.number) { s.lastOutBlock = uint64(block.number); s.blockPearOut = 0; } uint256 blockOut = uint256(s.blockPearOut) + amountOut; if (blockOut > budget * BLOCK_CAP_BPS / BPS) revert BlockCapExceeded(); s.epochPearOut = uint128(epochOut); s.blockPearOut = uint128(blockOut); s.pearInventory -= uint128(amountOut); // …Fees deepen the main pool
Anyone can sell a side pool's collected tokens for ETH, or collect the main pool's trading fees, and the hook adds the result back to the main pool as more liquidity. Whoever does it gets a small reward.
The code that does this (_cbSweep):function _cbSweep(bytes memory args) internal returns (bytes memory) { (PoolId spokeId, uint256 sweepAmount, uint256 minWethOut, int24 refTwapTick, address keeper) = abi.decode(args, (PoolId, uint256, uint256, int24, address)); keeper; // paid by the caller of unlock Spoke storage s = _spokes[spokeId]; address x = s.token; address refPool = s.refPool; bool zeroForOne = s.xIsToken0Ref; // claims → real X in the hook poolManager.burn(address(this), uint256(uint160(x)), sweepAmount); poolManager.take(Currency.wrap(x), address(this), sweepAmount); // X → WETH on the ref pool, bounded by a price limit around the TWAP uint256 xIn; uint256 wethOut; { uint160 limit = calc.sweepLimit(refPool, refTwapTick, zeroForOne); assembly ("memory-safe") { tstore(SWEEP_POOL_SLOT, refPool) } (int256 a0, int256 a1) = IUniswapV3Pool(refPool).swap(address(this), zeroForOne, int256(sweepAmount), limit, abi.encode(x)); assembly ("memory-safe") { tstore(SWEEP_POOL_SLOT, 0) } (xIn, wethOut) = zeroForOne ? (uint256(a0), uint256(-a1)) : (uint256(a1), uint256(-a0)); } if (xIn == 0 || wethOut == 0) revert NothingToSweep(); // …
Who controls it: No upgrades and no settings that can be changed. After the one-time launch, the hook developer can only receive the tax, extend the liquidity lock, and once the lock ends withdraw the main pool liquidity and side pool stock. Everything else is open to anyone.
Based on the hook’s published code.What do these labels mean?
Safety report
Before you build on it. Automated checks, not an auditPearCalc: nothing there can change how trades go.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 before liquidity is removed, so it can delay or refuse LP exits.
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 paid the trading tax to the hook developer: $30.95, and filled a trade on a side pool from its own stock: $0.382.
- Paid the trading tax to the hook developer 4 times, worth $30.95
Latest transactions
- 0x33c981ad…24bb78 block 26,430,883 · 0.0100 ETH
- 0xdae858e6…c7f356 block 26,430,866 · 0.000793 ETH
- 0x16325cd0…fd48c6 block 26,430,850 · 0.00110 USDC
- 0x6ffcffc6…491244 block 26,430,849 · 0.00623 ETH
- Filled a trade on a side pool from its own stock 26 times, worth $0.382
Latest transactions
- 0x68ccd165…01b50f block 26,430,859
- 0x3cb8f7e3…c89951 block 26,430,859
- 0x4f923b1b…b8682d block 26,430,859
- 0x1a88a870…1d395c block 26,430,859
- 0x53dff486…508417 block 26,430,859
- 0x6296d1b9…6e8825 block 26,430,859
- 0xa713f08b…a8cfc9 block 26,430,859
- 0x72467228…d7ad9a block 26,430,859
- 0xc76a9cab…9b0126 block 26,430,859
- 0x7123bfa6…8416d1 block 26,430,859
- Opened a new PEAR pair 13 times
- Launched PEAR and seeded the main pool 1 time
- Withdrew liquidity after the lock ended 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.