# PowerPerp > A pool with a weight, so a liquidity provider chooses how much of the move they want instead of always getting the square root of it. A production Uniswap v4 hook. Source: https://github.com/nirholas/power-perp. Part of the HookForge catalogue: https://hookforge.pages.dev ## How it works Providing to a constant-product pool is a position, and almost nobody picks it deliberately. Holding `x*y = k` against a price move gives a payoff proportional to the square root of the price, always, with no way to ask for more or less. A provider who is bullish and wants most of the upside, and a provider who wants to sit closer to stable, are handed the identical exposure and told it is a fee opportunity. The generalisation has been known since Balancer: hold the weighted geometric mean constant, x^w * y^(1-w) = k and the position's value moves with `price^(1-w)`. At `w = 0.5` that is the square root every constant-product pool gives. At `w = 0.8` the pool holds mostly currency0 and the provider keeps most of its move. At `w = 0.2` the pool is mostly currency1 and the provider is nearly flat to currency0. One parameter, and the provider's exposure is something they chose. The swap maths follows from the invariant. Selling `dx` of currency0 into the pool leaves dy = y * (1 - (x / (x + dx))^(w / (1 - w))) which is computed here in 60.18 fixed point. The exponent is a real number, not an integer, so this needs genuine `pow`; it uses PRB Math rather than an approximation, because a curve that is subtly wrong in the tail is a curve that pays somebody to find the tail. The reason this is worth having on v4 specifically: v4 pools are concentrated-liquidity pools, and concentration and weighting are different tools. Concentration says where you are willing to quote. Weighting says what exposure you want while you quote. Nothing in v4 offers the second, and a hook that replaces the curve is the only place it can live. ## Prior art Weighted geometric-mean pools are Balancer's, and have been since 2020. The Squared and power-perpetual submissions for v4 build leveraged products on top of a pool rather than changing the pool's own curve. Bringing the weighted invariant to v4 as a custom curve, so a provider can pick their exposure to the pair they are quoting, is the contribution here; the maths is deliberately the well-understood one rather than something new. ## Where it does not help A weighted pool is more exposed to one side by construction, so a provider who picks a high weight and is wrong about direction loses more than a constant-product provider would. That is the point of the parameter, not a defect, but it does mean the weight is a directional view and should be chosen as one. Gas is also higher than a constant-product pool: every quote evaluates a real-exponent `pow`, which costs a few thousand gas more than a multiply. ## Facts Slug: power-perp Contract: PowerPerpHook Callbacks: beforeSwapReturnsDelta, beforeSwap, beforeRemoveLiquidity, beforeAddLiquidity, beforeInitialize Parameters: none Dynamic fee required: no ## Caveats - Unaudited. - A deployment with status "deterministic" is a mined CREATE2 address with no code at it yet. Never present one as live.