the bonding curve
PerpLand prices PERP via a constant-product bonding curve with virtual reserves. This is the same shape as a Uniswap v2 pair, just realized as 300 stacked v4 LP positions instead of a single full-range one.
the formula
The invariant is:
realPERP × (V + E) = K where V = 10 ETH (virtual reserve) K = 10,000,000 (constant)At any cumulative pool-ETH level E, the price of PERP in ETH is:
P(E) = (V + E)² / KAnd the real PERP remaining in the pool is:
realPERP(E) = K / (V + E)numbers
| level (E) | price | tokens remaining |
|---|---|---|
| 0 | 0.00001 | 1,000,000 |
| 30 | 0.00016 | 250,000 |
| 100 | 0.00121 | 90,909 |
| 500 | 0.0260 | 19,608 |
| 1500 (max) | 0.2280 | 6,623 |
why bands
The smooth curve is sliced into 300 LP positions ("bands"), each covering a 5-ETH-wide slice of the curve. Band i covers cumulative ETH [5·i, 5·(i+1)) and is seeded with exactly the PERP allocation needed for the curve to sell across that slice.
The bands serve three jobs at once:
- Pricing — combined, they implement the bonding-curve shape with v4's native swap math.
- Leverage source — once a band has been fully traversed, its single-sided ETH liquidity can be borrowed (up to 40% of band capacity per band) to leverage opens.
- Liquidity for closes — when a position closes, the tokens sold push the curve back through bands, recovering ETH.
directionality on v4
Currency0 = native ETH, currency1 = PERP. By Uniswap v4 convention, sqrtPrice represents sqrt(token1 / token0) — so the initial tick is at the high end (PERP cheap, many PERP per ETH) and trading buys-of-PERP push tick down.
Bands are seeded so the lowest-ID band sits at the highest ticks (initial state, holds pure PERP). As trading progresses, tick drops and bands transition from token1-only → mixed (active) → token0-only (passed). Passed bands hold pure ETH and are the source of leverage borrows.