Proactive Market Maker
Welcome, premium subscribers! Thank you for subscribing. What will be shared today and the days ahead are alpha from our Economics Design's researchers. Please keep these mails secret and do not share them with any one because these alphas are confidential. Enjoy your reading.
TLDR below. This is not financial advice.
General Conclusion
In the summer of DeFi 2020 decentralised exchanges exploded, especially AMM, with the success of Uniswap. Since then, a series of projects have copied Uniswap’s model, but some have approached the problem in a different direction. Including DODO.
Launched in mid-August 2020, DODO is an on-chain liquidity solution that combines AMM and oracle. This is also a factor that is more advanced than other DEXs like Uniswap.
Dex Market
AMM-based DEXs have proven to be one of the highest impact DeFi innovations, allowing investors to seamlessly trade between cryptocurrencies in a completely decentralised and unattended manner, through pre-funded on-chain liquidity pools.
How: simply deposit capital into these liquidity pools (become a market maker).
Why: liquidity providers can earn a passive income on their capital through accrued trading fees, based on their contribution rate.
The DEX has had unprecedented success over the past few months. Led by Uniswap, DEX volume surged to a record high of $83 billion in May, and the total locked-in value on all DEX platforms also reached the highest value of almost $28 billion.
Source: https://duneanalytics.com/hagaetc/dex-metrics
Problems
Despite such tremendous success, AMM DEXs still face their own limitations. Some inherent problems are:
-
Impermanent loss (IL)
-
Capital efficiency
-
Slippage
-
Gas costs
-
Speed
-
Multi-token exposure
-
Front-running
-
Back-running
The most important risk is IL, which is quantified by the difference in portfolio value over time between providing liquidity to the DEX poolversusbuying and holding the underlying tokens.
IL = token in DEX — hodl token
It happens because AMM prices do not automatically adjust. When prices across the market change, arbitrageurs enter and profit at the expense of liquidity providers. So, the actual profit of LP in AMM pools is the balance between the accumulated fees from the trades and the impermanent loss caused by the arbitrage.
Source: https://pintail.medium.com/uniswap-a-good-deal-for-liquidity-providers-104c0b6816f2
During implementation, AMMs encountered capital inefficiencies, poor liquidity used, and exposure to multiple tokens. Since AMM allocates capital equally across the price range (0; +∞), only funds allocated close to the market price are effectively utilised with a significant portion of the funds available only when the valuation curve begins to fall and the head turns exponentially.
As a result, AMMs require greater amounts of liquidity to accommodate the slippage on traditional order-to-order exchanges. Furthermore, AMM often requires the LP to deposit two or more tokens to provide liquidity, forcing exposure to additional assets.
AMM is often referred to as “lazy liquidity” because of the uncontrollable price point offered to traders, unlike traditional market makers.
AMM curve vs. an Order Book
Source: https://research.parsec.finance/posts/amm-tradeoff
DEX Improvement 2.0
Understanding this problem, Bancor V2 is the first protocol to solve the problem of capital efficiency, IL and multi-token exposure. Uniswap V3 is also a leader in the selection of liquidity zones, to provide a solution to use capital more efficiently.
You can learn more about the improvements in Uniswap V3 here.
Going a step further, DODO pioneered the ability to customise AMM logic, creating an algorithm for PMM which aims to be an elegant generalisation of the order book matching system.
PMM increases capital efficiency and minimises IL.
How: by taking advantage of price errors to conform to the price curve.
Why: so that most of the liquidity is concentrated close to the market price of the asset.
As shown below, the DODO curve is significantly flatter than the Uniswap curve, indicating the possibility as mentioned.
Source: dodoex.io
What Is DODO?
DODO is a new generation on-chain liquidity provider protocol. Unlike Uniswap, DODO uses a proactive market maker (PMM) algorithm instead of an autonomous market maker (AMM) algorithm.
According to DODO, using PMM has three main advantages compared to AMM:
-
Increase the efficiency of use of assets.
-
Avoid one-sided risks.
-
Liquidity providers avoid IL.
The PMM Model
Behind most AMM designs are curves drawn from mathematical formulas which represent the interaction of tokens in the pool.
Unlike most AMMs, PMM can be considered a semi-AMM, being a combination of “mathematical formula + oracle”.
PMM takes advantage of price oracle to ensure that the price on DEX matches the market price. When price oracle changes, PMM actively moves the price curve in the same direction to ensure that the actual price does not deviate from the oracle price.
Source: dodoex.io
DODO is a decentralised protocol and permissionless. It works based on a PMM price curve:
In which:
i: the market price provided by an oracle;
R is defined according to market conditions:
k is in the range (0;1).
Model Analysis
We have three cases:
Source: dodoex.io
-
B = B0 and Q = Q0 → R = 1 → The model reaches equilibrium.
-
Q < Q0 → R < 1 → The model reaches the base token shortage state. That means users are selling more than buying which leads to an increase in base tokens and a decrease in quote tokens. PMM automatically sells the excess base tokens with quote tokens to reach equilibrium.
-
B < B0 → R > 1 → The model reaches the quote token shortage state. That means users are buying more than selling which leads to an increase in quote tokens and a decrease in base tokens. PMM automatically sells the excess quote tokens with base tokens to reach equilibrium.
How can they reach equilibrium in constantly changing the market prices?
Token price in buying (selling) is different from token price in selling (buying). We will have 2 cases, the liquidity of both base and quote token will increase or decrease. If they increase that is good, but what happens if they decrease? This makes a loss for liquidity providers.
Hence, the parameter k in the formula provides the protocol with flexibility in different market situations.
The “Liquidity Parameter” k
The parameter k gives DODO the flexibility to handle different market situations and k ∈ (0;1).
Source: dodoex.io
There are 2 cases with k
:
-
k = 0
: Equivalent to a volatile market and the price will not change, which results in a self-liquidation mechanism that will not affect the number of tokens in the pool. -
k > 0
: DODO’s price becomes more “curved”, price-to-liquidity sensitivity will increase. And when k = 1, it becomes a standard AMM curve like Uniswap.
A smaller k
provides good liquidity and increases trading volume, but increases the risk of arbitrage losses. Conversely, a larger k
will affect liquidity adversely and reduce trading volume, but reduce the risk of arbitrage loss.
Currently,
k
is set at 0.1.
TLDR:
In terms of the DEX market, protocols are increasingly developing new functions for more efficient use of funds. Examples are Bancor V2, Uniswap V3 and DODO, which we have discussed.
As for DODO, this protocol has provided a new solution with the ability to adapt to market fluctuations. However, with large fluctuations, the model is still likely to encounter the problems discussed.
DeFi continues to be a place to test innovations, and today we are still making changes to make the financial system better. However, not all initiatives are successful and we need more time to do more experiments.