Psm3Aggregator
BaseHookPsm3Aggregator is a Uniswap v4 hook on Base. Brand new: its first pool went live today. Still in use: 16 trades in the last week, and 3 new pools this week.
- Contract name
- Psm3Aggregator
How this hook works
Trading taxA trading tax hook. It takes a cut of every trade, stops liquidity being added directly 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. It can never be above 1%. The fee is paid out in the same trade.
The code that does this (conductSwap):function _conductSwap(Currency settleCurrency, Currency takeCurrency, SwapParams calldata params, PoolId) internal override returns (uint256 amountSettle, uint256 amountTake, bool hasSettled) { address tokenIn = Currency.unwrap(takeCurrency); address tokenOut = Currency.unwrap(settleCurrency); uint256 reported; if (params.amountSpecified < 0) { amountTake = (-params.amountSpecified).toUint256(); PoolManagerCalls.take(poolManager, takeCurrency, address(this), amountTake); PoolManagerCalls.sync(poolManager, settleCurrency); reported = PSM.swapExactIn(tokenIn, tokenOut, amountTake, 1, address(poolManager), 0); } else { reported = params.amountSpecified.toUint256(); amountTake = PSM.previewSwapExactOut(tokenIn, tokenOut, reported); PoolManagerCalls.take(poolManager, takeCurrency, address(this), amountTake); PoolManagerCalls.sync(poolManager, settleCurrency); uint256 pulled = PSM.swapExactOut(tokenIn, tokenOut, reported, amountTake, address(poolManager), 0); // The PSM never pulls more than `maxAmountIn` (it reverts); anything it leaves is dust for `sweepDust`. if (pulled > amountTake) revert ReportedOutputNotReceived(amountTake, pulled); } amountSettle = PoolManagerCalls.settle(poolManager); if (amountSettle < reported) revert ReportedOutputNotReceived(reported, amountSettle); hasSettled = true; }Liquidity can’t be added directly
Nobody can add liquidity to its pools through Uniswap directly. Liquidity only comes in through the hook’s own code.
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) internal override returns (bytes4) { address token0 = Currency.unwrap(key.currency0); address token1 = Currency.unwrap(key.currency1); PoolId id = key.toId(); // Emitted first: a refused registration reverts and drops the log; the approvals below are the only calls out. emit AggregatorPoolRegistered(id); require(token0 != token1 && _isAsset(token0) && _isAsset(token1), TokensNotSupported(token0, token1)); bytes32 pairKey = EfficientHashLib.hash(uint256(uint160(token0)), uint256(uint160(token1))); PoolId existing = _canonicalPoolByPair[pairKey]; require(PoolId.unwrap(existing) == bytes32(0), PairAlreadyHasCanonicalPool(existing, token0, token1)); _canonicalPoolByPair[pairKey] = id; poolIdToTokens[id] = PoolTokens({token0: token0, token1: token1}); _approvePsm(token0); _approvePsm(token1); return IHooks.beforeInitialize.selector; }Anyone can trigger payouts
Anyone can send the collected fees on to where they go, so nobody has to wait on the hook developer.
The code that does this (sweepDust):function sweepDust(Currency currency) external returns (uint256 amount) { if (PoolStateReader.isUnlocked(poolManager)) revert PoolManagerUnlocked(); address recipient = VAULT; if (recipient == address(0)) revert NoVault(); amount = currency.balanceOfSelf(); emit DustSwept(currency, recipient, amount); if (amount != 0) { if (currency.isAddressZero()) SafeTransferLib.forceSafeTransferETH(recipient, amount); else amount = SafeTransferLib.safeTransferAll(Currency.unwrap(currency), recipient); } }
Who controls it: Nobody. The hook has no admin functions, and the code cannot be changed.
Based on the hook’s published code.What do these labels mean?
Safety report
Before you build on it. Automated checks, not an auditWhat 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 handled a trade: $370.28, and handled a trade: $370.28.
- Handled a trade 16 times, worth $370.28
Latest transactions
- 0xba6d71e9…b3749b block 64,657,441
- 0x8576c261…3a6638 block 64,657,288
- 0x37114e95…9d620a block 64,657,243
- 0xc36dda22…5848b1 block 64,656,183
- 0x253bfdcc…d91e72 block 64,655,957
- 0x49cfdf16…362d55 block 64,655,766
- 0x69d9009a…8bee66 block 64,655,556
- 0x2cbf6efa…15e09e block 64,655,392
- 0xa6b49554…cfcfab block 64,654,200
- 0x036591a4…1c9779 block 64,654,013
- Handled a trade 16 times, worth $370.28
Latest transactions
- 0xba6d71e9…b3749b block 64,657,441
- 0x8576c261…3a6638 block 64,657,288
- 0x37114e95…9d620a block 64,657,243
- 0xc36dda22…5848b1 block 64,656,183
- 0x253bfdcc…d91e72 block 64,655,957
- 0x49cfdf16…362d55 block 64,655,766
- 0x69d9009a…8bee66 block 64,655,556
- 0x2cbf6efa…15e09e block 64,655,392
- 0xa6b49554…cfcfab block 64,654,200
- 0x036591a4…1c9779 block 64,654,013
- Registered an aggregator pool 3 times
Latest transactions
- 0xf962e203…f69dec block 64,630,564
- 0xdafa920f…30cd72 block 64,630,555
- 0xe2253834…19a309 block 64,630,546
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.