UsddPsmHook
EthereumHookUsddPsmHook is a Uniswap v4 hook on Ethereum. Live for 4 days. Still in use: 1 trade in the last week, and 1 new pool this week.
- Contract name
- UsddPsmHook
How this hook works
Trading taxA trading tax hook. It takes a cut of every trade, can block traders and stops liquidity being added directly.
Takes a cut of every trade
On top of the normal pool fee, it keeps a share of each trade.
The code that does this (conductSwap):function _conductSwap(Currency settleCurrency, Currency takeCurrency, SwapParams calldata params, PoolId id) internal override returns (uint256 amountSettle, uint256 amountTake, bool hasSettled) { // Reuse the USDD quote to enforce executable capacity and exact integer rounding once. uint256 raw = _rawQuote(params.zeroForOne, params.amountSpecified, id); amountTake = params.amountSpecified < 0 ? uint256(-params.amountSpecified) : raw; amountSettle = params.amountSpecified < 0 ? raw : uint256(params.amountSpecified); bool selling = Currency.unwrap(takeCurrency) == gemToken; uint256 gemAmount = selling ? amountTake : amountSettle; IERC20 input = IERC20(Currency.unwrap(takeCurrency)); IERC20 output = IERC20(Currency.unwrap(settleCurrency)); uint256 inputBefore = input.balanceOf(address(this)); uint256 outputBefore = output.balanceOf(address(this)); uint256 joinBefore = IERC20(gemToken).balanceOf(address(gemJoin)); poolManager.take(takeCurrency, address(this), amountTake); if (input.balanceOf(address(this)) != inputBefore + amountTake) revert UnexpectedTokenDelta(); uint256 expectedSpent; uint256 expectedReceived; if (selling) { expectedSpent = gemAmount; expectedReceived = PsmMath.sellOutput(gemAmount, to18ConversionFactor, psm.tin()); psm.sellGem(address(this), gemAmount); if (IERC20(gemToken).balanceOf(address(gemJoin)) != joinBefore + gemAmount) revert UnexpectedTokenDelta(); } else { expectedSpent = PsmMath.buyCost(gemAmount, to18ConversionFactor, psm.tout()); expectedReceived = gemAmount; psm.buyGem(address(this), gemAmount); } // …Can block traders
It can stop specific addresses from trading.
The code that does this (tokenAvailable):function _tokenAvailable() private view returns (bool) { if (IStablecoinStatus(gemToken).paused()) return false; if (gemKind == GemKind.USDT) { ITetherStatus t = ITetherStatus(gemToken); // v4 settlement assumes ordinary ERC20 transfers. If Tether activates transfer // taxation or migrates implementation, stop quoting instead of silently underpaying. if (t.deprecated() || (t.basisPointsRate() != 0 && t.maximumFee() != 0)) return false; if (gemJoin.implementations(t.upgradedAddress()) != 1) return false; return !t.isBlackListed(address(this)) && !t.isBlackListed(managerAddress) && !t.isBlackListed(address(gemJoin)); } IStablecoinStatus c = IStablecoinStatus(gemToken); return !c.isBlacklisted(address(this)) && !c.isBlacklisted(managerAddress) && !c.isBlacklisted(address(gemJoin)); }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 sqrtPriceX96) internal override returns (bytes4) { if ( initialized || PoolId.unwrap(key.toId()) != PoolId.unwrap(canonicalPoolId) || sqrtPriceX96 != initialSqrtPriceX96() ) revert InvalidPool(); initialized = true; // Approve the actual USDD PSM spenders during initialization, as upstream does. IERC20(gemToken).forceApprove(address(gemJoin), type(uint256).max); IERC20(stableToken).forceApprove(address(psm), type(uint256).max); emit AggregatorPoolRegistered(key.toId()); pollTokenJar(); return IHooks.beforeInitialize.selector; }
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 auditt, c 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 handled a trade: $1.0k.
- Handled a trade 1 time, worth $1.0k
- Registered an aggregator pool 1 time
Settings changes: changed the token jar (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.