DeFi · 58 / 86
MEV
MEV is value taken by whoever can reorder, insert, or censor transactions. Your swap can be pushed behind someone else's, so you get a worse price.
In front of you
You submit a trade. A searcher sees it, buys first, lets your trade push the price, and sells. You paid the slippage. They took the difference. This is often called a sandwich. You do not need the method. You need to know the price can be worsened on purpose.
What you can actually do
Keep slippage tight so a bad fill fails instead of draining you. Avoid announcing a huge trade in a public pool with a loose limit.
The chain's public waiting room is not a private conversation.
Check yourself
Is the quoted swap price safe because you clicked quickly?
No. Someone who sees the public transaction can still get in front of it.
After this you can set a tight minimum on a swap so a worsened price fails instead of filling.
Previous: Liquid staking and restaking · Next: On-chain derivatives
