We start by defining a simple constant product market, commonly used to trade tokens.
The market is composed of two reserves (R0​,R1​) of token0 and token1 respectively, and a constraint:
(R0​+x)⋅(R1​−y)=R0​⋅R1​
When x amount of token0 is inputted to the market, ytoken1 comes out, constrained by the product of the reserves.
solving for y gives us the amount out:
y=R1​−R0​+xR0​⋅R1​​
From this, we can derive the market trading function κ:(R0​,R1​,x)−>(R0​′,R1​′):
R0​′=R0​+x
R1​′=R0​+xR0​⋅R1​​
that describes market dynamics when traded.
KIRU Bonding Curve
We instantiate token0= ETH and token1= KIRU.
We introduce a scale parameter α:[0,1]
α(t)=1−(α(0)∗R1​(0)R1​(t)​)
The parameter decrease in intensity as KIRU reserves deplete to ensure gradual smoothing of the scaling effect.
We can then introduce the trading function Γ+:(R0​,R1​,α,x)−>(R0​′,R1​′) for buy orders, defined as:
Since x>0 and α≤1, the ratio is always positive, proving that over equal volume, Γ+ implies a greater price increase than the classical constant-product, scaled by α.