Sina Vafadar

Breaking Fair Ordering with a Minority

Jun 1, 2023 · 6 min · paper

Fair-ordering protocols try to take sequencing power away from any single operator by putting it to a vote. If most nodes saw tx₁ before tx₂, tx₁ goes first. The result in this paper is that aggregating those local orderings inherits a problem Condorcet described in 1785: pairwise majorities can cycle, and where they cycle, the protocol stops promising anything.

Every protocol in this family knows about the cycles. All of them treat the cycles as accidents of timing, a handful of transactions that arrived at roughly the same moment, swept into a batch, ordered inside the batch by whatever is cheap. This paper builds them on purpose.

The claim

Two valid transactions from an ordinary client are enough to pull unrelated transactions into a Condorcet cycle, where fair ordering guarantees nothing. Every node in the committee can be honest and it still works.

Themis, the strongest of these protocols, tolerates up to f < (2γ − 1) n / 4 faulty nodes. The attack needs none of them. It needs one client, two transactions that look like anyone else’s, and control of nothing but its own send order.

A majority can fail to have an opinion

Three nodes, three transactions, each node reporting a rotation of the same list. Take any pair and there is a clear two-to-one winner. Take all three and the winners point in a circle.

N₁ xyz

N₂ yzx

N₃ zxy

Three transactions in a majority cycle Two of the three nodes report x before y, two report y before z, and two report z before x. The majorities form a loop, so no ordering can satisfy all of them. 2/3 2/3 2/3 x y z

x before y 2 of 3 y before z 2 of 3 z before x 2 of 3

figure 1. each pair has a two-to-one winner. the three winners point in a circle, so no schedule respects them.

No ordering satisfies all three majorities, and no protocol can invent one; the impossibility is older than the systems it now blocks. So every fair-ordering protocol carves out the same exception. Transactions caught in a cycle go into a batch, and unfairness inside a batch is not counted against the protocol. Aequitas orders a batch alphabetically. Quick-Fairness says nothing about it at all.

That exception is the whole target. A cycle is not an accident to be waited out. It is a hole in the guarantee, and it can be dug where you want it.

Forging the cycle on purpose

Split the committee into three parts. Send A then B to the first part, B alone to the second, nothing to the third. Then wait. Ordinary traffic arrives during the wait, and every node sees it in the same order, because the transactions are seconds apart. Finish by sending A to the second part and A then B to the third.

The three phases of the Condorcet attack The client sends A then B to the first part and B to the second, waits while three honest transactions reach every part in the same order, then sends A to the second part and A then B to the third. Each part ends up reporting a different rotation. inject pause inject tx₁ tx₂ tx₃ P₁ P₂ P₃ A B B A A B

what the leader receives

P₁ ABtx₁tx₂tx₃

P₂ Btx₁tx₂tx₃A

P₃ tx₁tx₂tx₃AB

figure 2. the pause does the work. the same two transactions, delivered on either side of it, leave every part reporting a different rotation, and no node has misreported anything.

Read the three reports at the bottom of the figure. Each is an honest account of what that part saw. Together they put A, B and every transaction from the pause into one cycle. The honest transactions did not arrive close together and their senders had no relationship to each other. They were bracketed.

The pause length sets the haul, bounded only by the length of one consensus round.

pause of τ = 10

9 of 10

90% of the honest traffic sent during the pause

pause of τ = 50

49 of 50

98% of the honest traffic sent during the pause

figure 3. the longer the wait, the bigger the haul. every node in the system is honest in both runs.

Two details from the simulations are worth keeping. The runs sit below an external network ratio of one, meaning transactions arrive further apart than the network’s own latency, the regime where cycles do not form on their own, so every cycle measured is one the attack built. And an adversary that instead controls a quarter of the committee including the leader, and simply reverses its reported orderings, achieves close to nothing in that same regime. Sending from outside is what gives the attack its reach.

The one fragile part is the network. The injected transactions have to arrive in the order they were sent, and packet reordering breaks individual attempts. The fix is cloning: interleave several copies of the attack. Four transactions across four parts with a single clone is close to immune.

What the batch costs

A batch is a cycle and a cycle has no first element, so it cannot be a schedule. Themis turns one into a schedule by building a Hamiltonian cycle through the batch and cutting the lightest edge.

The five transactions in one cycle, and the five ways to break it A and B and the three honest transactions form a single cycle. Removing any one edge turns it into a schedule; the two edges inside the honest run are the ones that reorder honest transactions. 2/3 2/3 3/3 3/3 2/3 A B tx₁ tx₂ tx₃
  1. drop A → B 2/3 lightest

    Btx₁tx₂tx₃A

    honest order intact

  2. drop B → tx₁ 2/3 lightest

    tx₁tx₂tx₃AB

    honest order intact

  3. drop tx₁ → tx₂ 3/3

    tx₂tx₃ABtx₁

    2 of 3 honest pairs inverted

  4. drop tx₂ → tx₃ 3/3

    tx₃ABtx₁tx₂

    2 of 3 honest pairs inverted

  5. drop tx₃ → A 2/3 lightest

    ABtx₁tx₂tx₃

    honest order intact

figure 4. three of the five cuts spare the honest run. the two that scramble it are the heaviest edges here, which is precisely what the paper's example 5 sets out to change.

In this five-transaction version the rule holds: the light edges are the adversary’s own, so cutting one leaves tx₁, tx₂, tx₃ in the order they were sent. That is luck, not protection. The paper gives a five-node construction where every edge in the cycle carries identical weight, and then the choice of cut is arbitrary. Scale the batch from three honest transactions to twenty and arbitrary is what it looks like in practice.

What actually helps

Honest pairs left in the wrong order, by batch-ordering scheme Alphabetical ordering leaves half of all honest pairs wrong, which is what ordering by coin flip would do. Cutting the weakest link leaves up to a quarter wrong. Ranked pairs leaves about one in a hundred. chance alphabetical Aequitas 50% weakest-link cut Themis up to 25% ranked pairs this paper about 1%
figure 5. 50% is what ordering a batch by coin flip achieves, so alphabetical ordering is worth exactly as much as no scheme at all.

Three mitigations, none complete, none in conflict:

The honest summary is that all three together raise the cost, and an adversary with both an outside client and a foothold inside the committee still gets somewhere.

Open threads

The full construction, the proofs and the simulation details are in the paper.

← all research