Trying to act like I know about DEX @orca_so @MMTFinance - What is Slippage Part 2?
In the previous post, we looked at the price discrepancies arising from the structure of the AMM model, and this time we will also address the price discrepancies caused by external factors. I'm worried that the content is getting a bit difficultㅠㅠ
First, a review! Slippage is the difference between the price I wanted to trade at and the actual price of the trade. So, what are the external factors that can affect token prices?
First, there are price fluctuations due to time delays. To trade on a DEX, you need to submit a transaction to the blockchain, which takes some time. It takes a while for the transaction to be submitted, included in a block, and for that block to be finalized.
And during that time, other people can also trade, causing the token price to change, right? These factors can also affect the price I intended.
And one extreme way to exploit this is through methods like MEV and sandwich trading... This happens due to people (bots, validators, etc.) who can see transactions in blocks that have not yet been finalized.
Looking at the diagram above, you can understand it to some extent! Purely, I submitted a transaction because I wanted to swap x for y. But those sneaky guys(?) buy x before and after my transaction and insert their own transactions in between.
What happens then? First, the attacker buys x first, so I end up buying x at a relatively higher price. Then, after I purchase x (i.e., after the price has gone up), the attacker sells x to gain a profit from the price difference.
These days, there are ongoing efforts to elegantly solve such MEV issues with schemes like PBS (Ethereum) and Jito (Solana), but it is an act that harms DEX users. To protect against such attacks, it is very important to set a maximum slippage value!


The conclusion is that the right to create blocks (?) is power...
2.43K
22
The content on this page is provided by third parties. Unless otherwise stated, OKX is not the author of the cited article(s) and does not claim any copyright in the materials. The content is provided for informational purposes only and does not represent the views of OKX. It is not intended to be an endorsement of any kind and should not be considered investment advice or a solicitation to buy or sell digital assets. To the extent generative AI is utilized to provide summaries or other information, such AI generated content may be inaccurate or inconsistent. Please read the linked article for more details and information. OKX is not responsible for content hosted on third party sites. Digital asset holdings, including stablecoins and NFTs, involve a high degree of risk and can fluctuate greatly. You should carefully consider whether trading or holding digital assets is suitable for you in light of your financial condition.