Three hidden flaws in Uniswap’s StablePair hook drain LP returns

Uniswap’s StablePair fee hook is designed to keep more of the value from rebalancing stablecoin pools with liquidity providers.

Yet the rule deciding which trade counts as a correction depends on a configured reference rate.

StablePair is a Uniswap v4 hook, a contract that changes a pool’s behavior. Its fee logic compares a cached pool price with a reference stored in the hook’s configuration. The design prices trades around that benchmark, leaving providers exposed if a token’s economic value moves away.

Uniswap Labs announced the two Ethereum pools, USDC/USDT and USDC/USDG, on Sept. 10. Its Sept. 16 explanation noted that Providers allocating capital now are choosing a fee mechanism alongside the token inventory it requires them to hold.

What the dynamic fee captures

The deployment documentation lists one-for-one reference rates for both pools. The implementation’s fee path uses that stored reference and the pool’s price, without consulting an external market-price feed.

Inside a narrow band around the reference, the fee varies by swap direction to target a consistent bid and ask before price impact. When the pool sits exactly at the reference, both directions pay the configured optimal fee. As it moves toward an edge, the fee in one direction falls while the other rises.

For a simple illustration, assume an optimal fee of one basis point (0.01%). At the reference, a swap with 10,000 input units would pay one input unit in LP fees.

Outside the band, the fee rules split trades by direction. A swap classified as moving farther from the reference pays zero LP fee, while a swap classified as pulling the pool toward it faces a decaying fee.

A trade pushing the pool away can give LPs a favorable price relative to that benchmark. The reverse trade lets an arbitrageur capture the gap by restoring the pool’s price. A single static fee rate charges both directions equally.

Read More:  UK targets $86 billion Russia-linked crypto pipeline with 100% sanctions fines

StablePair instead offers progressively better terms for the corrective trade as blocks pass.

If a trader accepts the fee, LPs collect it while the trade rebalances the pool. Uniswap Labs says the design captures the “vast majority” of rebalancing profit.

Related Reading

Malicious Uniswap v4 hooks are baiting DeFi traders with fake swap quotes

StablePair can adjust LP fees around a configured parity, but it cannot protect liquidity providers if a token loses its peg.

The first swap in each block caches the pool price used for later fee calculations. That removes the same-block fee advantage from splitting corrective swaps, but later trades can face stale inputs. If the live price crosses the reference mid-block, the cached classification can assign fees to the opposite directions until the next block.