ReOrders
Last updated
Last updated
The core mechanism of TiTi Protocol is to always use a specific price, assumed to be $1 in this case, as the benchmark to provide the market with fully symmetrical bilateral TiUSD bid & ask orders. The mechanism regularly reshapes the order book via established rules, keeping the price peg to $1. We call the process of restoring the form of the order book the ReOrders mechanism.
As can be seen from the figure, TiTi Protocol provides bilateral orders to the market at the price of $1 in the initial state. After bunches of market transactions, if more users buy TiUSD, a price gap > $1 will be created in the orderbook. Hence, TiTi Protocol predicts that users have increased demand for TiUSD and will mint more TiUSD tokens to fill the gap in the previous order book. At the same time, TiTi Protocol will receive more USDC due to previous purchases. This part of the USDC obtained will be fully used in the buy order as the protocol reserve. Therefore, the market depth of the TiUSD-USDC TiTi-AMM will increase, which can optimize the user's slippage experience when trading.
In contrast, if more users sell TiUSD, there will be a price under $1 in the order book. Hence, TiTi Protocol predicts that the user's demand for TiUSD is reducing, more TiUSD will be buyback through the Protocol and then burned to reduce TiUSD market circulation. Thanks to Uniswap for bringing in an automatic market maker mechanism based on the constant function for the DEFI ecosystem, the CFMM. It dramatically reduces the cost of cognition and the use of the market maker mechanism for cryptocurrency users. Therefore, in engineering implementation, TiUSD learn from and modify Uniswap's AMM mechanism to implement the ReOrders function in TiTi Protocol.
Assuming that there are 10,000 TiUSDs and 10,000 USDCs in the TiUSD-USDC TiTi-AMMs in the initial state. When Alice buys TiUSDs with 10 USDCs, she will get:
Alice can get about 9.99 TiUSD; the average purchase price is:
After the trade, there are 9990.01 TiUSD and 10010 USDC left in the TiTi-AMM. TiTi Protocol judges that there are more purchase demands and adjusts the number of TiUSD in the pool to ensure that the number of TiUSD in the pool and the number of USDCs remain 1:1. Likewise, the protocol mints 19.99 (10010-9990.01) TiUSD into the pool. After this round of ReOrders, the balance of tokens in the pool is 10010 TiUSD and 10010 USDC. The price immediately returned to 1 USDC/TiUSD.
When Alice sells 10 TiUSD, she can get:
Alice can get 9.99 USDC, then the average price is:
Now, 9990.01 USDC and 10010 TiUSD left in TiTi-AMM. TiTi Protocol judges that there are more selling demand and adjusts the number of TiUSD in the pool to ensure that the number of TiUSDs and USDCs in the pool remains 1:1. Therefore, the protocol burns 19.99 (10010-9990.01) TiUSD in the pool. After this round of ReOrders, the balance of tokens in the pool is 9990.01 TiUSD and 9990.01 USDC. The price immediately returns to 1 USDC/TiUSD.
According to the above analysis, the most straightforward ReOrders mechanism can be illustrated as follows:
Assuming that {Xn, Yn} is the number of USDC and TiUSD in the TiTi-AMM before the n round ReOrders. {Xn', Yn'} is the number of USDC and TiUSD in the TiTi-AMM after n round ReOrders. After a round of ReOrders, the change in TiUSD, ΔYn, in TiTi-AMM is:
If ΔYn < 0, it means that in this round of ReOrders, users are more willing to buy TiUSD, and the Protocol needs to provide more TiUSD to the market;
If ΔYn = 0, it means that in this round of ReOrders, TiUSD meets the demand of users;
If ΔYn > 0, it means that users are more willing to sell TiUSD during this round of ReOrders, and the Protocol needs to repurchase TiUSD to reduce market circulation;
In the n round ReOrders, the amount of TiUSD adjusted in the TiTi-AMM is ΔYn' as:
If ΔYn' < 0, it means that in this round of ReOrders, the Protocol needs to mint TiUSD, and mint quantity is |ΔYn' |
If ΔYn' = 0, it means that during this round of ReOrders, the Protocol will keep the status;
If ΔYn' > 0, it means that in this round of ReOrders, the Protocol needs to burn TiUSD, and the amount is |ΔYn' |.
Therefore, with ReOrders mechanism, the issuance and redemption of TiUSD is achieved by adjusting TiUSD's orderbook depth and bid & ask orders provided by market makers. It ensures that TiUSD's inflation and deflation will not affect the value of TiUSD in circulation.