A POC on Proving that a user's behavior such as Swap was potentially harmed by an MEV bot
-
Extraction of Reserve Values:
- extraction of reserve values of specific tokens before and after the suspected transactions from Sync function.
-
Price Calculation:
- Prices were computed based on the token reserves.
-
Comparison and MEV Detection:
- A significant price difference between pre- and post-transaction states was used as an indicator of MEV.
-
Threshold Application:
- We set a threshold to distinguish normal fluctuations from potential MEV activities.
Using zkGraphs, we have demonstrated a robust method to detect and prove MEV in blockchain transactions. This approach enhances transparency and security in blockchain networks by identifying potentially exploitative behaviors.