Single-Sided Deposits and Withdrawals

DODO introduced a single-sided deposit and withdrawal function in V1. This feature allows liquidity providers to provide liquidity without changing their existing exposure (in simple terms, they can deposit whatever they have without leverage), greatly facilitating liquidity provision.
However, this feature has come at a cost of additional complexity for the system. This section will focus on the special design for single-sided deposit and withdrawal scenarios. If you are using a product without this feature, not using a single-sided deposit and withdrawal product, you can ignore this section.
According to the PMM formula, the price depends on the deviation of the short-side asset from its equilibrium price, and any single-sided deposit and withdrawal of the short side asset will change the market price. Let's take the example of when

Deposit Rewards

Recall the PMM pricing formula:
P=i(1k+k(B0B)2)P = i(1-k + k(\frac{B_0}{B})^2)
increase by the same amount,
decreases and the price returns to the oracle price
According to the fixed-parameter rule mentioned on the previous page, this means that the amount of an asset bought back after spending all the long positions is greater, and the liquidity providers make a profit.
A more intuitive understanding: this deposit makes the inventory closer to the equilibrium state and plays the role of a system maintainer, so it gets a certain reward. The source of the reward is the slippage paid by traders who make the system deviate from the equilibrium state.

Withdrawal Fees

Similarly, if liquidity providers withdraw an asset that is already in short supply, it will make the system deviate even more from the equilibrium state.
In this case, the withdrawer needs to pay a fee. This fee is equal to the sum of the losses in the system caused by this withdrawal. The fee will be distributed to the rest of the providers who remain in the liquidity pool.
Considering the deposit reward mentioned above, if the market maker withdraws immediately after depositing, the withdrawal fee will be greater than the deposit reward, thereby eliminating risk-free arbitrage.
It is worth noting that the market makers in a PMM pool only incur significant deposit or withdrawal fees when the system is significantly out of balance and the volume of deposits or withdrawals is very large. In general, traders do not need to pay attention to these situations.
That said, traders are more than welcome to deposit and earn rewards when the system is out of balance, and then withdraw coins after the system is balanced to avoid being charged fees.
Note: deposit rewards and withdrawal fees are only applied to DODO V1