Market Interpretation

Inspired by Uniswap, Timeswap uses a unique 3 variable constant product equation:
X×Y×Z=KX\times Y\times Z=K
Where
XX
= Principal Pool, Y = Interest rate Pool,
ZZ
= Collateral factor Pool
The market interpretation for variables
X,Y,ZX , Y, Z
is as follows:
XX
= Principal Pool, where lenders & liquidity providers deposit their assets
YY
= Interest Rate Pool such that ratio
YX\frac{Y}{X}
is equal to the maximum interest rate per second of a pool for a particular token pair at the time of the transaction for the remaining duration of the pool
ZZ
= Collateral factor Pool such that ratio
ZX\frac{Z}{X}
is equal to the minimum CDP of a pool for a particular token pair at the time of the transaction for the remaining duration of the pool
Let's deep dive into how to use market interpretation with an example:
Alice wants to initialize a DAI-ETH pool with a maturity time of 6 months. She wants to lock 10,000 DAI and expects an annual return of 15% and a CDP of 167% for the given pair and duration.
X=10000X=10000
DAI
YX=0.1531556926\frac{Y}{X}=\frac{0.15}{31556926}
(annual interest rate expectation of 15% & number of seconds in a year = 31556926s) This means
Y=0.1531556926×10000=0.0000475Y=\frac{0.15}{31556926}\times10000=0.0000475
ZX=1.67\frac{Z}{X}=1.67
(CDP of 167%), such that the value of
ZZ
is ETH equivalent in DAI Assuming the price of ETH at the time of pool creation by Alice was 4000DAI, this means the value of
Z=100001.674000Z=\frac{10000*1.67}{4000}
= 4.175 ETH
So Alice can do pool initialization for the DAI-ETH pool with a duration of 6 months, such that variables
X=10,000,Y=0.0000475,Z=4.175,K=1.98X=10,000,Y=0.0000475,Z=4.175,K=1.98