Adversarial Systems in AI: Lessons from Crypto
Lessons from Mechanism Design
in Adversarial Conditions
dmarz Flashbots
New Collectives × Variant · NYC · 2026.11.09
Before we start
Disclaimer
- This talk spans engineering, mechanism design, distributed systems, and product.
- My insights come from slinging bits in the wild west. I may use terms loosely.
- I assume basic familiarity with blockchains.
The talk prompt
“As a product manager, research engineer, and R&D coordinator who has launched
multiple products at the intersection of incentive design, distributed systems, and privacy in “permissionless markets”,
please create a succinct representation of your key lessons in the form of a slide deck.”
Before we start
Some terms and the setting
- “Crypto” = Ethereum mainnet + a few L2s. Specifically: block building.
- “Permissionless markets” = anyone can join + real incentives = max adversarial.
- Permissionless + anonymous identity = sybils, aka false-name manipulation.
Example 1.1
PoW Ethereum
- Miners ran one main Ethereum client, geth.
- One of its APIs, txpool_content, returned every pending transaction.
- Anyone could read other users' intents and bids, then act first.
Lesson 01
If your system has value, assume your APIs are an attack surface.
Example 1.2
Public mempool
- API patched. The p2p layer was the next target.
- Nodes gossip transactions in plaintext, and anyone can run a node.
- Attack: spin up a node and observe every transaction before it executes.
Lesson 02
Whatever you do for decentralization is at odds with privacy, efficiency, or both and maybe even more.
Example 1.3
Priority Gas Auctions (PGAs)
- Blockspace is scarce. Allocation rule: highest gas price first. Payment rule: pay your bid.
- Bids are public, so bots outbid each other. Dozens of re-bids; latency wins.
- Losers still pay gas on reverts (all-pay). Users eat the congestion.
Lesson 03
Your allocation rule is a spec for bot behavior. Reward speed and re-bidding, and you get latency races and spam.
Daian et al., “Flash Boys 2.0”, 2019
Double click
MEV
- Control over transaction inclusion and ordering creates extractable value.
- Maximal Extractable Value (Daian et al.): the “potential energy” of all extractable value.
- Computing it is hard, so extraction is a search competition.
Lesson 04
MEV. Whoever orders the transactions can extract value, and someone will.
Double click
The MEV trilemma
- Spam war: bid with volume. Whoever floods the most transactions wins.
- Latency race: bid with speed. Whoever arrives first wins.
- Explicit auction: bid with money. Whoever pays the most wins.
Example 1.4
MEV-geth
- Two components: a new bid type and a new ordering rule.
- Searchers (aka arbitrageurs) submit bundles: ordered lists of transactions, executed atomically.
- Miners run a modified client, mev-geth. It receives public mempool transactions plus bundles sent privately by searchers.
Lesson 05
Pseudo-protocolizing the bad thing (front-running) is better than ignoring it.
Example 1.4
MEV-geth: the ordering rule
- mev-geth builds blocks by ordering transactions and bundles by value to the miner: gas fees + MEV payment.
- Nuance: the real rule divides that value by gas used, approximating “work”.
- Bundles are sealed bids: private, so rivals cannot see them and outbid.
- Winner-pays: losing bundles never land and cost nothing.
- Nuance: costs us compute.
Lesson 06
Ordering rules in a distributed system are very hard to enforce.
Double click
Seeing like a protocol
- From the POV of a distributed system, you must make assumptions about how online the network is, message latency, and agreement protocols before the protocol can have a view on something (“Seeing like a protocol”, Barnabé Monnot).
- To say an ordering is correct with regard to some property, you first need agreement on the thing you are analyzing.
- For Ethereum: consensus on all the contents of the mempool before consensus on the block.
- Narwhal + Tusk were a very cool innovation here. They split the protocol: first an availability round, then an ordering round.
Example 1.4
MEV-geth: the outcome
- PGA wars ended within months. 90%+ of hashrate adopted it, with no protocol change.
- Individually rational to adopt: it paid miners more.
- Just as rational to profit-switch to anything more profitable (Eden).
- Miners could see and steal bundles. Only reputation and the threat of being cut off stopped them.
Lesson 07
Trust-based guarantees can and should be used as a crutch to make progress.
Example 1.5
The bundle relay
- Losing bids were free, so searchers spammed. Flashbots built the bundle relay.
- IP rate limiting: gamed. Account rate limiting: gamed. New identities cost cents.
- Token bucket, leaky bucket, sliding window: all gamed the same way.
Lesson 08
Web2 rate limiting is both futile and table stakes when you cannot tell who the user is.
Example 1.5
The bundle relay: reputation
- A reputation priority mechanism scaled the best.
- Searchers built reputation across many accounts, then exploited it when valuable.
- Reputation is a hidden boost to your bid. The system gets hard to analyze.
Lesson 09
Incentivizing good is generally more successful than punishing bad.
Example 1.5
The bundle relay: aftermath
- 99.9% of spam attacks resolved.
- A year later we quietly scaled the infra down. Still no attacks.
- Then the same attacks showed up on L2s.
Lesson 10
Always assume cat and mouse. No reprieve from anonymous strangers chasing $$$.
Example 2
“Low Carb Crusader”
- A searcher registered validators and waited for a block to propose.
- They baited sandwich bots with easy-looking transactions in the public mempool.
- They took the builder's block, unbundled it, and sandwiched all the sandwiches.
Lesson 11
Incentives rule everything around me. And I'm generally skeptical that anything involving slashing is a good deterrent.
Example 2
“Low Carb Crusader”: the payoff
- About $20M, from a single block.
- Most blocks carry little MEV. A few carry a fortune.
- The original MEV paper called this out as a consensus instability risk.
Lesson 12
MEV is incredibly spiky.
Flashbots post-mortem, April 2023
Example 2
“Low Carb Crusader”: the bond
- Staking is sybil resistance: every validator posts a bond.
- The attacker was slashed. A rounding error next to the take.
- A bond only deters while the prize is smaller than the bond.
Lesson 13
Even sybil resistance techniques like staking are not perfect.
Example 3
An impossibility result for sybil-proofness
- Result from Christoph (Flashbots) and Akaki (Arbitrum): only the second-price auction is both sybil-proof and incentive compatible.
- In plain English: with free identities, the good has to go to the highest bidder. Lotteries and pro-rata splits get gamed.
- The setting is limited: one good, private values, symmetric, always allocates.
Lesson 14
The only sybil-proof, incentive compatible mechanism is the second-price auction.
Pan, Mamageishvili, Schlegel, “On Sybil-proof Mechanisms”, 2024
Example 4
MEV and the limits of scaling
- No ordering auction, so searchers bid by spamming speculative arbitrage.
- Spam bots: 50%+ of gas, <10% of fees. ~350 failed transactions per successful arb.
- The trilemma again. Fix: an explicit auction plus programmable privacy.
Lesson 15
If you don't design an explicit auction, you will get an implicit one: a latency race or a spam war.
Robert Miller, “MEV and the Limits of Scaling”, Flashbots, June 2025
Example 5
“Fair ordering”
- I've seen multiple people claim to have solved MEV, write the paper, raise millions, and deploy it. Then get attacked, or fail to get users.
- Threshold encryption: liveness constraints, and the committee can still collude.
- Encrypted state: DEX UX is already rough. Now you are making it dark.
Lesson 16
Permissionless markets are the true test, not your formal proof.
Example 5
“Fair ordering”: fair to whom?
- “Seeing like a protocol” again: how do you know every transaction that was sent in?
- You need consensus on the set of transactions before you can order it.
- Every node sees a different arrival order. There is no neutral way to merge them.
Lesson 17
Fair is subjective. Arrow told us, but you have to learn it the hard way.
TL;DR
Three things to take home
- There is no perfect protocol.Models behind formal proofs lag the frontier of attacks. Auction and distributed systems theory almost all assume you know the participants, or that the system is permissioned.
- Security is always cat and mouse.Ship a strong imperfect solution you can triage and iterate on fast.
- There are always tradeoffs.If there isn't one, you're missing something.
Bonus
Teaser: Swarm Safety
- Swarm experiment: I put 200 agents into a simulated economy to maximize profit.
- Rules: an agent can start a business. Regulators penalize anyone over 35% market share.
- (Anti-monopoly rules are a type of swarm safety ;) )
- In 90% of simulations, agents started creating new identities and splitting their business across them to avoid regulators.
- I basically put them in a trap, so it's not surprising.
What's next
Lots of interesting directions around defining safety properties across a swarm.
