
We are glad to present the AMM Price Impact function on the Midas platform. The first asset to undergo this update is MIDAS token. What does it mean?
Automated market-making (AMM) algorithms are used on decentralized exchanges to calculate the price impact on an order. The algorithm provides liquidity and depth to open markets providing investors with the flexibility and ease of entering and exiting positions of almost any size.
Every trade on decentralized exchanges has a degree of price impact, causing slippage to the market. On tokens that have significant exposure on DEXes (in terms of overall market liquidity in comparison to CEXes), Midas will mirror these market conditions on our platform Swap feature. Doing so will allow Midas to reduce swap fees on 95%+ of swap trades on certain pairs.
How is price impact calculated?
At its core and in its simplified form, we utilize AMM calculations shown below:
x * y = constant product formula (k)
where x and y represent the total sum of MIDAS across LPs and the total USD value of paired assets across LPs.
The above formula allows us to consider liquidity across all available LPs to provide our users with the optimal swap conditions for their exchange and calculates for us the amount of x and y that will be held in an LP after the given trade has been made.
With the necessary information, we calculate in live time the impact a trade would make to the LP and use this data to correlate the price offered to our users based on the order value/size being processed.
(2*sqrt(k)/k + 1) – 1
where k is the percentage price difference.
Finally, the fixed routing and spread fee are deducted from this price calculation to display live and accurate price impact calculations to users.
Why does this make Midas swaps better than using DEXes?
- Combined liquidity. We consider liquidity across all LPs to provide advantageous conditions for investors wishing to trade. By combining this liquidity, users will experience less trade slippage in comparison to utilizing dexes directly.
- Easier to manage UI. Our intuitive UI allows investors to shift assets quickly and hassle-free in comparison to utilizing DEXes.
- Lower fees. Through utilization of batch processing, we are able to process trades with fewer fees and pass this cost optimization across to our investors resulting in less gas and slippage than by processing trades directly to DEXes.
As a result of these benefits, investors will optimize returns from trading and processing their investments via Midas.