For many years, analysis in distributed programs, particularly in Byzantine consensus and state machine replication (SMR), has centered on two fundamental targets: consistency and liveness. Consistency means all nodes agree on the identical sequence of transactions, whereas liveness ensures the system continues so as to add new ones. Nonetheless, these properties don’t cease unhealthy actors from altering the order of transactions after they’re obtained.
In public blockchains, that hole in conventional consensus ensures has grow to be a major problem. Validators, block builders or sequencers can exploit their privileged position in block ordering for monetary achieve, a apply often called maximal extractable worth (MEV). This manipulation contains worthwhile frontrunning, backrunning and sandwiching of transactions. As a result of transaction execution order determines validity or profitability in DeFi purposes, the integrity of transaction ordering is important for sustaining equity and belief.
To deal with this essential safety hole, transaction order-fairness has been proposed as a 3rd important consensus property. Truthful-ordering protocols make sure that the ultimate order of transactions is dependent upon exterior, goal components, comparable to arrival instances (or receiving order) and is proof against adversarial reordering. By limiting how a lot energy a block proposer has to reorder transactions, these protocols transfer blockchains nearer to being clear, predictable, and MEV-resistant.
The Condorcet paradox and impossibility of supreme equity
Probably the most intuitive and strongest notion of equity is Obtain-Order-Equity (ROF). Informally outlined as “first obtained, first output,” ROF dictates that if a enough variety of transactions (tx) arrive at a majority of nodes sooner than one other transaction (tx′), then the system is required to order tx earlier than tx′ for execution.
Nevertheless, attaining this universally accepted “order equity” is essentially not possible except it’s assumed that every one nodes can talk instantaneously (i.e., working straight away synchronous exterior community). This impossibility end result stems from a shocking connection to social alternative principle, particularly the Condorcet paradox.
The Condorcet paradox illustrates how, even when each particular person node maintains a transitive inside ordering of transactions, the collective choice throughout the system may end up in what are often called non-transitive cycles. For instance, it’s doable {that a} majority of nodes obtain transaction A earlier than B, a majority obtain B earlier than C, and a majority obtain C earlier than A. Therefore, the three majority preferences type a loop (A→B→C→A). Which means no single, constant ordering of the transactions A, B and C can ever fulfill all majority preferences concurrently.
This paradox demonstrates why the objective of completely attaining Obtain-Order-Equity is not possible in asynchronous networks, and even in synchronous networks that share a standard clock if exterior community delays are too lengthy. This impossibility necessitates the adoption of weaker equity definitions, comparable to batch order equity.
Hedera Hashgraph and flaw of median timestamping
Hedera, which employs the Hashgraph consensus algorithm, seeks to approximate a robust notion of receive-order equity (ROF). It does this by assigning every transaction a last timestamp computed because the median of all nodes’ native timestamps for that transaction.
Nevertheless, that is inherently vulnerable to manipulation. A single adversarial node can intentionally distort its native timestamps and invert the ultimate ordering of two transactions, even when all sincere members obtained them within the right order.
Take into account a easy instance with 5 consensus nodes (A, B, C, D and E) the place Node E acts maliciously. Two transactions, tx₁ and tx₂, are broadcast to the community. All sincere nodes obtain tx₁ earlier than tx₂, so the anticipated last order needs to be tx₁ → tx₂.
On this instance, the adversary assigns tx₁ a later timestamp (3) and tx₂ an earlier one (2) to skew the median.
When the protocol computes the medians:
For tx₁, the timestamps (1, 1, 4, 4, 3) yield a median of three.
For tx₂, the timestamps (2, 2, 5, 5, 2) yield a median of two.
As a result of the ultimate timestamp of tx₁ (3) is bigger than that of tx₂ (2), the protocol outputs tx₂ → tx₁, thus reversing the true order noticed by all sincere nodes.
This toy instance demonstrates a essential flaw: The median operate, whereas showing impartial, is paradoxically the precise explanation for unfairness as a result of it may be exploited by even a single dishonest participant to bias the ultimate transaction order.
Because of this, Hashgraph’s often-touted “honest timestamping” is a surprisingly weak notion of equity. The Hashgraph consensus fails to ensure receive-order equity and as a substitute is dependent upon a permissioned validator set relatively than on cryptographic ensures.
Reaching sensible ensures
Nevertheless, to avoid the theoretical impossibility demonstrated by Condorcet, sensible fair-ordering schemes should calm down the definition of equity in a roundabout way.
The Aequitas protocols launched the criterion of Block-Order-Equity (BOF), or batch-order-fairness. BOF dictates that if sufficiently many nodes obtain a transaction tx earlier than one other transaction tx′, then tx should be delivered in a block earlier than or concurrently tx′, which means no sincere node can ship tx′ in a block after tx. This relaxes the rule from “should be delivered earlier than” (the requirement of ROF) to “should be delivered no later than”.
Take into account three consensus nodes (A, B and C) and three transactions: tx₁, tx₂, and tx₃. A transaction is taken into account “obtained earlier” if a minimum of two of the three nodes (a majority) observe it first.
If we apply majority voting to find out a worldwide order:
tx₁ → tx₂ (agreed by A and C)
tx₂ → tx₃ (agreed by A and B)
tx₃ → tx₁ (agreed by B and C)
These preferences create a loop: tx₁ → tx₂ → tx₃ → tx₁. On this scenario, there’s no single order that may fulfill everybody’s view directly, which implies strict ROF is not possible to attain.
BOF solves this by grouping all of the conflicting transactions into the identical batch or block as a substitute of forcing one to come back earlier than one other. The protocol merely outputs:
Block B₁ = {tx₁, tx₂, tx₃}
Which means, from the protocol’s perspective, all three transactions are handled as in the event that they occurred on the identical time. Contained in the block, a deterministic tie-breaker (comparable to a hash worth) decides the precise order through which they’ll be executed. By doing this, BOF ensures equity for each pair of transactions and retains the ultimate transaction log constant for everybody. Each is processed no later than the one which precedes it.
This small however essential adjustment lets the protocol deal with conditions the place transaction orderings battle, by grouping these conflicting transactions into the identical block or batch. Importantly, this doesn’t end in a partial ordering, as each node should nonetheless agree on one single, linear sequence of transactions. The transactions inside every block are nonetheless organized in a set order for execution. In instances when no such conflicts happen, the protocol nonetheless achieves the stronger ROF property.
Whereas Aequitas efficiently achieved BOF, it confronted vital limitations, notably that it had very excessive communication complexity and will solely assure weak liveness. Weak liveness implies {that a} transaction’s supply is simply assured after all the Condorcet cycle it is part of is accomplished. This might take an arbitrarily very long time if cycles “chain collectively.”
The Themis protocol was launched to implement the identical sturdy BOF property, however with improved communication complexity. Themis achieves this utilizing three methods: Batch Unspooling, Deferred Ordering, and Stronger Intra-Batch Ensures.
In its normal type, Themis requires every participant to change messages with most different nodes within the community. The quantity of communication required will increase with the sq. of the variety of community members. Nevertheless, in its optimized model, SNARK-Themis, nodes use succinct cryptographic proofs to confirm equity without having to speak immediately with each different participant. This reduces the communication load in order that it grows solely linearly, which permits Themis to scale effectively even in massive networks.
Assume 5 nodes (A–E) taking part in consensus obtain three transactions: tx₁, tx₂, and tx₃. Resulting from community latency, their native orders differ:
As in Aequitas, these preferences create a Condorcet cycle. However as a substitute of ready for all the cycle to be resolved, Themis retains the system shifting utilizing a technique known as batch unspooling. It identifies all transactions which are a part of the cycle and teams them into one set, known as a strongly linked element (SCC). On this case, all three transactions belong to the identical SCC, which Themis outputs as a batch-in-progress, labeled Batch B₁ = {tx₁, tx₂, tx₃}.
By doing this, Themis permits the community to maintain processing new transactions even whereas the inner order of Batch B₁ remains to be being finalized. This ensures the system stays dwell and avoids stalling.
Overview:
The idea of good equity in transaction ordering could seem simple. Whoever’s transaction reaches the community first needs to be processed first. Nevertheless, because the Condorcet paradox demonstrates, this supreme can’t maintain in actual, distributed programs. Completely different nodes see transactions in several orders, and when these views battle, no protocol can construct a single, universally “right” sequence with out compromise.
Hedera’s Hashgraph tried to approximate this supreme with median timestamps, however that method depends extra on belief than on proof. A single dishonest participant can distort the median and flip transaction order, revealing that “honest timestamping” shouldn’t be really honest.
Protocols like Aequitas and Themis transfer the dialogue ahead by acknowledging what can and can’t be achieved. As an alternative of chasing the not possible, they redefine equity in a approach that also preserves order integrity underneath actual community circumstances. What emerges shouldn’t be a rejection of equity, however its evolution. This evolution attracts a transparent line between perceived equity and provable equity. It exhibits that true transaction-order integrity in decentralized programs can’t rely on repute, validator belief or permissioned management. It should come from cryptographic verification embedded within the protocol itself.
This text doesn’t comprise funding recommendation or suggestions. Each funding and buying and selling transfer includes threat, and readers ought to conduct their very own analysis when making a call.
This text is for normal info functions and isn’t supposed to be and shouldn’t be taken as authorized or funding recommendation. The views, ideas, and opinions expressed listed here are the writer’s alone and don’t essentially mirror or signify the views and opinions of Cointelegraph.
Cointelegraph doesn’t endorse the content material of this text nor any product talked about herein. Readers ought to do their very own analysis earlier than taking any motion associated to any product or firm talked about and carry full accountability for his or her choices.







