|

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

StablePair fee flow compares a configured reference, cached pool price and swap direction. Outside the band, away-from-reference swaps pay zero LP fee and toward-reference swaps face a decaying fee; conditional loss of parity can leave active LPs holding more of the weaker asset.

Uniswap’s StablePair payment hook is designed to maintain extra of the worth from rebalancing stablecoin swimming pools with liquidity suppliers.

Yet the rule deciding which commerce counts as a correction relies on a configured reference fee.

StablePair is a Uniswap v4 hook, a contract that adjustments a pool’s conduct. Its payment logic compares a cached pool worth with a reference saved in the hook’s configuration. The design costs trades round that benchmark, leaving suppliers uncovered if a token’s financial worth strikes away.

Uniswap Labs announced the two Ethereum pools, USDC/USDT and USDC/USDG, on Sept. 10. Its Sept. 16 explanation famous that Providers allocating capital now are selecting a payment mechanism alongside the token stock it requires them to carry.

What the dynamic payment captures

The deployment documentation lists one-for-one reference charges for each swimming pools. The implementation’s payment path makes use of that saved reference and the pool’s worth, with out consulting an exterior market-price feed.

Inside a slender band across the reference, the payment varies by swap route to focus on a constant bid and ask earlier than worth impression. When the pool sits precisely on the reference, each instructions pay the configured optimum payment. As it strikes towards an edge, the payment in one route falls whereas the opposite rises.

For a easy illustration, assume an optimum payment of 1 foundation level (0.01%). At the reference, a swap with 10,000 enter models would pay one enter unit in LP charges.

Outside the band, the fee rules split trades by direction. A swap categorized as transferring farther from the reference pays zero LP payment, whereas a swap categorized as pulling the pool towards it faces a decaying payment.

A commerce pushing the pool away may give LPs a positive worth relative to that benchmark. The reverse commerce lets an arbitrageur seize the hole by restoring the pool’s worth. A single static payment fee prices each instructions equally.

StablePair as a substitute gives progressively higher phrases for the corrective commerce as blocks go.

If a dealer accepts the payment, LPs accumulate it whereas the commerce rebalances the pool. Uniswap Labs says the design captures the “overwhelming majority” of rebalancing revenue.

Related Reading

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


StablePair fee flow compares a configured reference, cached pool price and swap direction. Outside the band, away-from-reference swaps pay zero LP fee and toward-reference swaps face a decaying fee; conditional loss of parity can leave active LPs holding more of the weaker asset.
StablePair can alter LP charges round a configured parity, but it surely can not defend liquidity suppliers if a token loses its peg.

The first swap in each block caches the pool price used for later payment calculations. That removes the same-block payment benefit from splitting corrective swaps, however later trades can face stale inputs. If the stay worth crosses the reference mid-block, the cached classification can assign charges to the other instructions till the following block.

Inventory danger and the proof on returns

The boundary seems when the skin market stops treating the 2 cash as equal.

Consider a conditional issuer shock that reduces one coin’s exterior worth whereas the configured reference nonetheless assumes one-for-one trade. Selling that weakening coin for the stronger coin can transfer the pool farther from the reference whereas transferring its worth nearer to the skin market.

A commerce the payment rule classifies as transferring away from the reference might then mirror worth discovery, relatively than a short lived imbalance.

The payment logic can not confirm issuer solvency or restore redemption worth. This situation is hypothetical and shouldn’t be learn as a report of a present depeg, exploit, or loss in both StablePair pool.

If an LP holds 10,000 hypothetical cash and their exterior worth falls from $1 to $0.90 every, that stock is price $9,000, a $1,000 decline earlier than charges. Capturing earnings from rebalancing trades doesn’t by itself reimburse that change in token worth.

Trades can even change what the supplier owns. Selling the weaker coin into obtainable liquidity removes the stronger coin and leaves energetic LP positions with extra of the weaker asset. An away-from-reference commerce charged zero LP payment contributes no LP payment to offset that added publicity.

The quantity exchanged nonetheless relies on obtainable liquidity, the supplier’s chosen vary, and worth impression. StablePair’s zero-fee classification additionally relies on the cached worth, so it shouldn’t be learn as a rule that each sale of a weakening coin is all the time free.

On Sept. 30, the Uniswap interface’s Stats panels confirmed the USDC/USDT StablePair pool with about $6.1 million in whole worth locked and $117.9 million in 24-hour quantity round 15:59 UTC. The USDC/USDG pool displayed about $2.6 million and $8.7 million, respectively, round 15:57 UTC.

A same-pair reference was obtainable: the Ethereum USDC/USDT v3 pool charging 0.01% displayed about $34.2 million in TVL, $15 million in 24-hour quantity, and $1,100 in 24-hour charges round 16:02 UTC.

The observations weren’t synchronized, the swimming pools have completely different payment guidelines and liquidity situations, and the StablePair panels provided no comparable absolute payment whole or realized position-level return.

In financial phrases, testing that return declare would require comparable intervals and energetic liquidity ranges, payment earnings, and stock valuation. Volume alone can not present how significantly better an LP did than in one other pool or by holding the property.

Governance controls the benchmark, with limits on the hook

Under Uniswap’s documented role model, governance controls stay payment configurations, implementation upgrades, and position administration.

Changing the reference adjustments the benchmark used to categorise and cost swaps. The deployment web page directs integrators to learn stay configuration from the hook as a result of governance can change parameters.

Separate limits apply to what an improve can do. The hook’s everlasting handle permissions exclude remove-liquidity callbacks and customized accounting deltas.

According to Uniswap’s security documentation, upgrades can not use these capabilities to dam LP withdrawals or alter swap quantities to skim extra charges. The skill to withdraw doesn’t assure the market worth of the tokens acquired.

Uniswap says OpenZeppelin reviewed a non-upgradeable predecessor’s core payment mechanism from Feb. 9 to 13, 2026, and resolved the splitting subject via block caching. The later upgradeability and position mannequin had been exterior that assessment.

For LPs, StablePair adjustments the worth of supplying liquidity for rebalancing. The remaining financial determination is whether or not the property nonetheless justify the reference round which that liquidity is provided, and whether or not earned charges compensate for the stock in the end held.

The submit Three hidden flaws in Uniswap’s StablePair hook drain LP returns appeared first on CryptoSlate.

Similar Posts