-
Notifications
You must be signed in to change notification settings - Fork 37
Description
In the PMM explanation here[https://dodoex.github.io/docs/docs/pmm] there is a statement that if k=1, the PMM curve actually becomes the same as AMM curve. This seems wrong.
It would be correct if the exponent of (B0/B) equaled one. It is not correct if the exponent is 2 as in your final formula.
Proof:
The AMM formula looks like this (with zero fees): dy = dx*Y / (X+dx). Here, X and Y are amounts of liquidity present in the pool for assets X and Y, dx is the amount of asset x sold, and dy is the amount received.
If we translate this to Dodo nomenclature with k=1, P = dx/dy, and P also equals X/Y * (Y/(Y-dy)).
Indeed, dx/dy equals the actual price (P), X/Y is the initial price i, and Y/(Y-dy) is essentially B0/B.
After algebraic simplification, we bring the expression dx/dy=X/Y*(Y/(Y-dy)) to the exact AMM formula: dy = dx*Y/(X+dx)
Of course, if the exponent of Y/(Y-dy) was 2, we would not get to this result.