369 words
2 minutes
Multi-asset YieldSpace

[ToC]

Definition#

underlying: base asset of a interest-bearing token interest-bearing token: IOU like cDAI, eUSDC xx: Underlying reserve in Pool yy: Zero-coupon bond reserve in Pool

Previous Work#

Constant reserve: Vrsv(x,y)=x+yV_{rsv}(x, y) = x + y , the sum value function. Constant product: Vprod(x,y)=xyV_{prod}(x, y) = \sqrt{xy}, the product value function.

2-asset#

before and after the swap, the following is invariant.

x1t+y1t=k(1)x^{1-t}+y^{1-t} = k \tag{1}

Marginal price and Impliedt rate (IR)#

In general, IR can be expressed:

r=(1/p)1/t1r = (1/p)^{1/t} -1

rr: IR pp: Bond price in underlying.

p=(xy)tp = \left(\frac{x}{y}\right)^t r=y/x1r = y/x -1

Value Function#

V(x,y,t)=(x1t+y1t)1/(1t)(2)V(x,y,t) = (x^{1-t}+y^{1-t})^{1/(1-t)} \tag{2}

Lemma#

If    t0,  then    V(x,y,1)VrsvIf \;\; t \to 0,\; then\;\; V(x,y,1) \to V_{rsv}: mStable If    t1,  then    V(x,y,1)VprodIf \;\; t \to 1,\; then\;\; V(x,y,1) \to V_{prod}: Balancer 2-asset

3-asset#

x1t+y1t+z1t=k(3)x^{1-t}+y^{1-t} + z^{1-t} = k \tag{3} V(x,y,z,t)=(x1t+y1t+z1t)1/(1t)(4)V(x,y,z,t) = (x^{1-t}+y^{1-t}+z^{1-t})^{1/(1-t)} \tag{4}

If    t0,  then    V(x,y,1)x+y+zIf \;\; t \to 0,\; then\;\; V(x,y,1) \to x+y+zになるはず。 If    t1,  then    V(x,y,z,1)(xyz)1/3If \;\; t \to 1,\; then\;\; V(x,y,z,1) \to (xyz)^{1/3} 3-asset BalancerのValue Funcになるはず。

Proof.Proof.

limt1(x1t+y1t+z1t)1/(1t)=expln  limt1(x1t+y1t+z1t)1/(1t)=explimt1ln(x1t+y1t+z1t)1t\lim_{t \to 1}{(x^{1-t}+y^{1-t}+z^{1-t})^{1/(1-t)}}\\ = \exp{\ln \; \lim_{t\to 1}{(x^{1-t}+y^{1-t}+z^{1-t})^{1/(1-t)}}} \\ =\exp{\lim_{t\to 1}{ \ln(x^{1-t}+y^{1-t}+z^{1-t})\over {1-t}}} \\

Here, we can apply L’Hopital’s rule. so,

limt1ln(x1t+y1t+z1t)1t=limt1ln(x1t+y1t+z1t)t(1t)t=ln(xyz)31=ln(xyz)3\lim_{t\to 1}{ \ln(x^{1-t}+y^{1-t}+z^{1-t})\over {1-t}}\\ = \lim_{t\to 1}{ \frac{ \frac{\partial \ln(x^{1-t}+y^{1-t}+z^{1-t})}{\partial t} }{ \frac{\partial (1-t)}{\partial t} } }\\ = \frac{\frac{-\ln(xyz)}{3}}{-1}\\ = {\ln(xyz) \over 3}

as a reference,

Therefore,

limt1V(x,y,z,t)=expln(xyz)3=(xyz)1/3\lim_{t\to 1 }V(x,y,z,t) = \exp{\ln(xyz) \over 3} = (xyz)^{1/3}

This is exactly same Value Function of Balancer 3-asset with all weights 1/3.

n-asset#

Let BiB_i denote balance of asset ii in a pool and B\mathbf{B} be vector of balances [B1,B2...Bn][B_1, B_2...B_n].

Trading Function ff:

f(B)=Bi1t(5)f(\mathbf{B}) = \sum{B_i^{1-t}} \tag{5}

Value Function VV:

V(B,t)=(Bi1t)1/(1t)(6)V(\mathbf{B},t) =(\sum{B_i^{1-t}} )^{1/(1-t)} \tag{6}

Marginal Price pip_i:

pi=(BiBo)t(7)p_i = \left({B_i \over B_o}\right)^t \tag{7}

Proof#

Let BoB_o denote balance of token oo bought by a trader and BiB_i denote balance of token oo sold by the trader.

By denition, pip_i is minus the partial derivative of BiB_i in function of BoB_o:

pi=BiBo(8)p_i = - \frac{\partial B_i}{\partial B_o} \tag{8}

From the value function denition we can isolate BiB_i:

Bi={V1tkiBk1tBo1t}1/(1t)(9)B_i = \left \{ V^{1-t} - \sum_{k\ne i}B_k^{1-t} - B_o^{1-t} \right\}^{1/(1-t)} \tag{9}

Now Eq8 becomes:

pi=BiBo=Bo{V1tkiBk1tBo1t}1/(1t)=(V1tkiBk1tBo1t)1/(1t)1Bot=(Bi1t)1/(1t)1Bot=(BiBo)tp_i = - \frac{\partial B_i}{\partial B_o} \\ = - \frac{\partial}{\partial B_o} \left \{ V^{1-t} - \sum_{k\ne i}B_k^{1-t} - B_o^{1-t} \right\}^{1/(1-t)} \\ = \left (V^{1-t} - \sum_{k\ne i}B_k^{1-t} - B_o^{1-t} \right)^{1/(1-t)-1} B_o^{-t} \\ = (B_i^{1-t})^{1/(1-t)-1} B_o^{-t} \\ = \left({B_i \over B_o}\right)^t \\

References#

Constant Power Root Market Makers

Balancer Whitepaper

Multi-asset YieldSpace
https://arawn.live/posts/YieldSpace/
Author
Arawn
Published at
2025-03-17