📢 New Demo Dataset: “DeFi-Behavior 0728” – real on-chain trading episodes, already labeled

Hi everyone!
We’re releasing a bite-size, MEV-annotated DeFi dataset that you can treat as a human financial-behavior corpus for LLM and ML experiments. If “MEV” sounds exotic, don’t worry—think of it as the blockchain version of high-frequency traders jumping the queue. We’ve pre-tagged the patterns so you can jump straight to modeling without being a crypto wizard.


Why this matters to ML folk

  • Authentic sequences of human (and bot) actions. Each JSON file is one Ethereum transaction with every token movement and gas payment spelled out—perfect for sequence modeling or graph learning.
  • Rich labels you don’t have to create yourself. We mark each episode as an Arbitrage (a quick, multi-venue flip for profit) or the Sandwich (a HFT attack strategy causing someone to pay more because an attacker trades before & after them).
  • Role tags for every wallet. Addresses come pre-tagged as Arbitrageur, Miner, SandwichVictim, etc., giving your model ground truth for entity behavior.
  • Numerical fields ready for tensors. Volumes, USD values, gas costs, and P&L are in clean numeric columns—no scraping required.
  • Compact but insightful. Examples range from a tiny +$0.10 arbitrage to sandwiches resulting in thousands of dollars of losses—great for testing detection or explanation tasks before scaling up.

What’s inside

Field What it captures
txMeta block, timestamp, gas metrics
tokenFlows[] net asset change per address (token, amount, USD)
tags[] behavioral roles (e.g., Arbitrageur, Victim)
summary types label, revenue, cost, profit

ML ideas to try

Task What you could build
LLM “explain my trade” Prompt-engineer GPT-style models to turn raw JSON into plain-English trade recaps.
Behavior classifier Fine-tune a transformer to identify arbitrage vs. victim from the token flow table.
Anomaly detection Use time-series models to flag abnormal gas-cost-to-profit ratios.
Agent simulation seeds Feed sequences into reinforcement-learning agents as realistic environment traces.

License & next steps

  • License: CC-BY-SA 4.0.
  • Road-map: more MEV types (liquidations, flash-loans) and multi-day spans coming soon.
  • We need your feedback! Tell us what broke, what you built, or which labels you’d like next.

Drop your thoughts, notebooks, or questions below. Let’s turn raw DeFi traces into useful behavioral benchmarks together!

You can download the demo data and its dictionary here: Demo Data for Hugging Face - Google Drive

— EigenPhi Data Team

I ended up using the DeFi-Behavior 0728 labels for an experiment in Topological Data Analysis (TDA) for MEV/sandwich detection.

The interesting result was that the public mempool turned out to have a surprisingly hard visibility ceiling: across TDA, address-graph features, and conventional transaction features, pre-block detection was only ~0.55 ROC-AUC. Looking at the labeled events, ~82% of the sandwich blocks had no trace of the attacker’s transaction anywhere in my mempool capture, which seems consistent with private order flow.

I then switched to the canonical block itself and applied persistent homology to the transaction topology. There the signal was much stronger: TDA alone reached 0.942 ROC-AUC, and TDA + structural/tabular features reached 0.963 on an out-of-time validation.

The most interesting result was incremental detection: using only the first 10% of transactions in the eventual block gave 0.884 ROC-AUC, rising to 0.939 at 50% and 0.972 for the complete block.

So the result isn’t really “you can predict sandwiches from the public mempool.” It’s more that the MEV structural signature appears to emerge very early during block construction — potentially interesting from a builder/relay perspective.

I’ve put the full investigation, notebooks, validation, and the leakage issue I encountered and fixed here:

Thanks for releasing the dataset — it was particularly useful because having the labeled events made it possible to investigate the visibility question rather than just train another classifier.