Research & Papers

Andrea Canidio's Unanimity Override gives blockchain apps transaction ordering rights

Blockchain applications can finally enforce their preferred transaction order without breaking system composability.

Deep Dive

Blockchain applications often need transactions to execute in a specific order — an AMM may require an oracle update before a swap, an exchange might need cancellations ahead of market orders, or an auction must process bids from highest to lowest. But the underlying blockchain picks the default transaction order, which can conflict with these requirements. Andrea Canidio's paper introduces the 'unanimity override' algorithm to solve this without breaking composability (the ability to combine multiple applications). The basic rule: when all applications agree on an order for two transactions, that order is enforced; otherwise, the block's default order stands. However, application unanimity can form cycles (A before B, B before C, C before A), which the algorithm must break. This cycle-breaking step is also the main vulnerability, as attackers can insert transactions to manufacture cycles.

Despite that, Canidio proves two strong guarantees hold against any attacker who sets the default order, deploys applications, and inserts transactions. First, all transactions that interact with a single application that expressed preferences are ordered exactly according to those preferences, even if they also touch other apps that didn't express preferences. Second, 'gated' transactions — those that cannot be outranked in the unanimity order by any attacker-crafted transaction — will always execute as the applications unanimously prefer, even when they span many applications. These guarantees inform applications and senders in advance which transactions will execute in the intended order. The work offers a practical path for DeFi and other protocols to enforce ordering constraints without sacrificing blockchain composability or security.

Key Points
  • Unanimity override lets blockchain apps enforce transaction order preferences using a unanimous agreement rule with a default fallback, solving composability conflicts.
  • The algorithm breaks cycles that form from unanimous preferences; attackers can inject transactions to create cycles, but gated transactions remain protected.
  • Two guarantees: single-app transactions honor that app's order; gated transactions execute as intended against any attacker, providing predictable ordering for DeFi applications.

Why It Matters

Enables complex DeFi operations (auctions, swaps, cancellations) to run reliably without breaking blockchain composability.

📬 Get the top 10 AI stories daily