The spread and the fee
Once a trend is confirmed, the pool changes one thing: the price it gives to the side pushing with the trend. The curve itself never changes shape. This page shows who pays what, with numbers, and why it is done this way.
One curve, always
Poincaré prices swaps on the same curve as the original Uniswap: the two balances multiplied together stay constant (x · y = k). That holds in calm markets and in trends, for buys and for sells. What changes in a trend is a spread added on top for one side.
Calm
No trend confirmed
Price rising
Up-trend confirmed
Price falling
Down-trend confirmed
How big is the spread
It grows with the evidence from the detector: nothing below the threshold, a straight ramp above it, and a hard stop at 5%.
Source: ControlLaw.sol (opens in a new tab).
A worked example
The pool holds 3,000,000 USDC and 1,000 WETH, so its price is $3,000. You buy WETH with 30,000 USDC. The base fee is 0.10% at the time.
| Situation | You receive | Your price | Kept by LPs |
|---|---|---|---|
| Calm market | 9.8912 WETH | $3,033 | The 30 USDC fee |
| Price rising, spread at its 5% cap | 9.3966 WETH | $3,193 | The fee, plus 0.4946 WETH (about $1,484) |
| Price falling (you are against the trend) | 9.8912 WETH | $3,033 | The 30 USDC fee |
The calm price is above $3,000 because any large trade moves the price, in every pool of this kind. The trend spread is the extra on the second row, and it only appears when you are buying into a rise (or selling into a fall). The Trade screen shows this split before you confirm.
The base fee
Every swap also pays a small fee that follows volatility: half of the pool's recent average move per block, never more than 0.30%. In a quiet market it is close to zero. Like the spread, it stays in the pool for LPs.
Why not reshape the curve instead
The obvious way to lean against a trend is to make the curve steeper in one direction. We built that first, and it fails.
Two curves, one per direction (built, tested, rejected)
- Buy on the shallow curveLittle price impact on the way in.
- Sell back on the deep curveA better price on the way out.
- Pool value leavesThe trader ends with more than they started.
One curve plus a spread (what the pool does)
- Buy on the curvePays the spread if it is with the trend.
- Sell back on the same curveThe plain price, never better than the curve.
- Always ends with lessFees, spread and rounding all favour the pool.
A safe version of the two-curve idea was then built and measured against the spread on four years of real prices. It lost by about thirty to one, because a steeper curve taxes every trade, including the ordinary ones the pool wants. So the curve stays symmetric, and a test in the repository keeps that setting locked off. Source: AsymmetricCurve.sol (opens in a new tab), evidence in OPEN_ITEMS.md (E1) (opens in a new tab).
Rounding
Every amount is rounded in the pool's favour: fees up, what you receive down. Each rounding is worth less than one unit of the smallest token amount, but it means no sequence of swaps can take value out of the pool through rounding. A test of 384,000 random operations checks this.