Mechanics
How Spline Works

Spline builds on top of Ekubo to facilitate low slippage swaps between like-like Bitcoin assets on Starknet.
Similar to Bunni v2, depositors to Spline act as passive LPs in our Ekubo extension. The Spline extension automatically adds liquidity in multiple tick range positions to Ekubo on deposit. The aggregate liquidity profile of these range positions is set such that swapping on our Ekubo pools simulates the slippage one would expect from Curve's StableSwap, but for Bitcoin on Starknet.
Profile
Spline adds and removes liquidity from Ekubo according to a liquidity profile function, specified across the full tick range . The liquidity profile function used to facilitate like-like swaps follows a Cauchy distribution, supplemented by a constant base layer of full range liquidity
Parameter constants , describe
- Half width of liquidity profile around tick zero, acting like 1 / leverage for the AMM
- How quickly the AMM transitions from constant sum like behavior to constant product
increases or decreases as LPs add or remove liquidity to the profile, but is constant for swaps (ignoring possible compounding of fees). Liquidity is fungible with shares issued proportional to , and weightings between constant base and Cauchy determined by the location in the tick range and profile params.
Plots of price slippage given a fraction of reserves sold into the pool, , for various , combinations versus Uniswap v2 and Curve's StableSwap are shown below

Like Curve, swaps near the center of the liquidity profile resemble constant sum, with significant drop off and high slippage transition to constant product as users attempt to swap in a large fraction of the pool's reserves.
Last updated