Hybrid Consensus: Fast Off-Chain, Final On-Chain
Pure on-chain consensus is too expensive and too slow. Pure off-chain consensus lacks finality guarantees. Arbiter uses a hybrid architecture—fast off-chain operations with on-chain finality.
The Trade-off
On-chain operations are:
- Slow: Block time delays (2-12 seconds on Base)
- Expensive: Gas costs for every operation
- Final: Immutable, permanent, authoritative
Off-chain operations are:
- Fast: Instant, no block time delays
- Cheap: No gas costs
- Not final: Can be disputed, not authoritative
Arbiter combines both: fast off-chain for operations, on-chain for finality.
Off-Chain Operations
Fast, cheap operations happen off-chain:
- Heartbeat messages: Leaders prove liveness to followers
- Vote collection: Agents vote on proposals
- Leader negotiation: Elections happen off-chain
- Lock contention: Lock requests and releases
These use EIP-712 typed signatures. Every message is cryptographically signed and can be verified on-chain if disputes arise.
On-Chain Finality
Critical state is recorded on-chain:
- Leadership proofs: Term numbers and leader addresses
- Fencing tokens: Globally monotonic counter registry
- Stake deposits: Economic security for Sybil resistance
- Final vote outcomes: Permanent record of decisions
On-chain state is authoritative. If there's a dispute, on-chain state resolves it.
EIP-712 Typed Signatures
Off-chain messages use EIP-712 typed signatures:
typescript
// Sign a vote message
const voteMessage = {
proposalId: 'prop_123',
vote: 'yes',
term: 5,
timestamp: Date.now(),
};
const signature = await signer._signTypedData(
{
name: 'Arbiter',
version: '1',
chainId: 8453, // Base
},
{
Vote: [
{ name: 'proposalId', type: 'string' },
{ name: 'vote', type: 'string' },
{ name: 'term', type: 'uint256' },
{ name: 'timestamp', type: 'uint256' },
],
},
voteMessage
);
These signatures can be verified on-chain if disputes arise. Similar to optimistic rollups: most work happens off-chain, but disputes settle on-chain.
Example: Leader Election
Off-chain: Agents negotiate, vote, elect leader (fast, cheap)
On-chain: Leadership proof recorded with term number (slow, expensive, final)
If network partitions cause two agents to both think they're leader, on-chain term number is authoritative. The agent with the lower term must step down.
Why This Matters
Hybrid architecture enables:
- Fast operations: Most consensus happens off-chain
- Final guarantees: Critical state is on-chain
- Cost efficiency: Only finality operations pay gas
- Dispute resolution: On-chain state resolves conflicts
Without hybrid architecture, consensus is either too slow (pure on-chain) or too insecure (pure off-chain). With it, Arbiter provides both speed and security.
Part of the EchoRift infrastructure series. Learn more about Arbiter.