Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Guides

How to Architect a Federated Byzantine Agreement System

This guide explains the architecture of Federated Byzantine Agreement (FBA) networks. You will learn to define quorum slices, construct trust graphs, and implement the core logic for nodes to reach consensus without a global validator set.
Chainscore © 2026
introduction
CONSENSUS DESIGN

How to Architect a Federated Byzantine Agreement System

A practical guide to designing a fault-tolerant consensus system using the Federated Byzantine Agreement (FBA) model, as implemented by Stellar and Ripple.

Federated Byzantine Agreement (FBA) is a consensus mechanism where nodes trust a personalized subset of other nodes, called a quorum slice. Unlike traditional BFT systems requiring a fixed, global validator set, FBA allows for an open, flexible, and decentralized trust model. Each node defines its own quorum slices, and the network reaches consensus when a quorum—a set of nodes sufficient to convince a particular node of agreement—is achieved. This architecture is foundational to the Stellar Consensus Protocol (SCP), enabling fast, low-cost transactions without a central authority.

To architect an FBA system, you must first define the quorum slice configuration for each node. A quorum slice for node v is a set of nodes that v trusts to not collude maliciously. In practice, this is often a combination of validators run by trusted organizations, friends, or community-elected entities. The system's security relies on the quorum intersection property: for any two quorums in the network, they must share at least one well-behaved node. This ensures that the network cannot fork into two conflicting states, as any two agreeing groups will have at least one honest node in common to resolve discrepancies.

Implementation begins with modeling nodes and their trust links. Here's a conceptual Python structure for a node's configuration:

python
class FBANode:
    def __init__(self, node_id):
        self.node_id = node_id
        self.quorum_slices = []  # List of sets of trusted node IDs

    def add_quorum_slice(self, trusted_nodes):
        # Each slice must be a set of nodes this node depends on
        self.quorum_slices.append(set(trusted_nodes))

A node accepts a statement (e.g., a transaction) if it hears that statement from one of its quorum slices. The network reaches federated voting through a process of nomination and ballot voting phases, as defined in SCP.

A critical design step is analyzing the quorum map to ensure safety. You must verify that the configured quorum slices satisfy quorum intersection. Tools like stellar-core's quorum-validator can check this. For example, if you have four nodes (A, B, C, D) and slices where A trusts {B,C}, B trusts {C,D}, C trusts {A,D}, and D trusts {A,B}, you must ensure any two quorums (e.g., {A,B,C} and {B,C,D}) intersect. Failure to guarantee intersection can lead to forking, where two subsets of the network confirm different transactions, breaking consensus.

In production, FBA systems like Stellar use decentralized control where each participant (anchor, wallet, exchange) configures its validators. The architecture scales because nodes only need to know about and communicate with their quorum slices, not the entire network. For high throughput, implement transaction sets and slot-based voting. Performance optimization involves minimizing message complexity; SCP uses a technique where nodes only broadcast messages to their slices, and agreement propagates through overlapping trust. Monitoring health requires tracking quorum availability—if too many nodes in a slice fail, a node cannot reach consensus.

When deploying, start with a closed federation for testing, using a known set of validators with manually configured, highly overlapping slices. Gradually transition to an open model. Key metrics to monitor include time to consensus, message count per slot, and quorum intersection health. Reference implementations are available in the Stellar Core GitHub repository. The final architecture should balance decentralization (many independent slice configurations) with safety (strong quorum intersection), creating a resilient system tolerant to Byzantine failures of a subset of participants defined by each node's trust policy.

prerequisites
PREREQUISITES AND CORE CONCEPTS

How to Architect a Federated Byzantine Agreement System

This guide outlines the foundational concepts and architectural decisions required to design a Federated Byzantine Agreement (FBA) system, the consensus model powering networks like Stellar.

Federated Byzantine Agreement (FBA) is a quorum-based consensus protocol that enables decentralized agreement without a global, permissioned validator set. Unlike Proof-of-Work or Proof-of-Stake, where consensus is determined by computational power or token ownership, FBA relies on a trust graph where each node chooses its own quorum slice—a subset of other nodes it trusts to not collude. The Stellar Consensus Protocol (SCP) is the canonical implementation of FBA, designed for high throughput and low latency in financial networks. Understanding this trust-based architecture is the first prerequisite.

The core architectural component is the quorum. A quorum is a set of nodes sufficient to reach agreement. In FBA, a quorum is formed when enough overlapping quorum slices intersect. For a system with nodes {V1, V2, V3, V4}, if V1's slice is {V2, V3} and V2's slice is {V1, V4}, they can form a quorum through their shared trust in V1 and V2. The system's security relies on the quorum intersection property: any two quorums must share at least one well-behaved node. Your architecture must enforce this property through careful quorum slice configuration to prevent network forks.

When architecting your FBA system, you must define the federation model. Will it be an open membership system like Stellar, where any node can join by acquiring trust, or a permissioned federation for enterprise use? In an open model, you need mechanisms like decentralized reputation or stake-based incentives for slice selection. For a permissioned consortium, you can pre-define slices based on legal agreements. The choice impacts security assumptions, as a permissioned system can tolerate up to f Byzantine faults in a slice of n nodes where n > 3f, following Byzantine Fault Tolerance (BFT) principles.

Implementation requires designing the voting and ballot protocol. SCP uses a Federated Voting mechanism comprising PREPARE, COMMIT, and EXTERNALIZE messages to confirm statements. You'll need to implement a state machine for each node that tracks ballots (candidate values and counters) and transitions based on messages from its quorum slices. The key is ensuring liveness (progress is made) and safety (no two conflicting values are confirmed). Code must handle nomination for proposing values and balloting for agreeing on a single value, even in the presence of non-responsive or malicious nodes.

Finally, integrate FBA with your application layer. The consensus output—a finalized, ordered set of transactions—must be passed to your transaction processing engine. You must also design for network topology: nodes must discover each other and maintain persistent connections to their quorum slices. Consider using the Stellar Core software as a reference implementation or building atop a library like rs-stellar-core. Thorough testing with Byzantine fault injection in a simulated network is non-negotiable to validate your architecture's resilience before mainnet deployment.

key-concepts-text
FEDERATED BYZANTINE AGREEMENT

Core Architectural Concepts: Quorum Slices and Trust Graphs

Federated Byzantine Agreement (FBA) is the consensus mechanism powering networks like Stellar. Its security and liveness depend on a decentralized trust model defined by quorum slices.

Traditional Byzantine Fault Tolerance (BFT) systems require a fixed, globally known validator set. Federated Byzantine Agreement (FBA) introduces a decentralized alternative where each node, or validator, defines its own quorum slice—a set of other nodes it trusts to not fail simultaneously. A quorum is a set of nodes sufficient to reach agreement, formed by the intersection of individual slices. This model, formalized in the Stellar Consensus Protocol (SCP), allows for open membership and flexible trust without a central authority dictating the validator list.

The collective trust relationships between all nodes form a trust graph. In this directed graph, each node is a vertex, and a trust edge points from a node to each member of its quorum slice. Network-wide safety—the guarantee that two conflicting statements cannot be agreed upon—is ensured if the quorum intersection property holds. This means any two quorums in the network must share at least one well-behaved (non-faulty) node. Liveness—the ability to reach new agreements—depends on the network avoiding quorum stalls, where no quorum can be formed due to faulty nodes blocking progress.

Architecting a system requires carefully configuring each node's quorum slice. A slice should include nodes that are: highly available (to ensure liveness), geographically distributed (for fault tolerance), and operated by diverse entities (to reduce correlated failure). For example, a node might list 3 out of 5 trusted peers in its slice, requiring agreement from any 3 of them. The configuration is often expressed in a structured format. Tools like stellar-core use a configuration file where you define VALIDATORS and QUORUM_SET.

Consider a small network with four nodes: Alice, Bob, Charlie, and Dana. If Alice's quorum slice is {Bob, Charlie}, she trusts agreement from both. If Bob's slice is {Alice, Charlie, Dana} and he requires 2 out of 3, a quorum could be {Alice, Charlie}. The intersection of Alice's quorum ({Bob, Charlie}) and this quorum is {Charlie}, satisfying the intersection property if Charlie is honest. Analyzing the strongly connected components of the trust graph helps verify that no group of nodes is isolated, which would risk creating disjoint quorums and breaking safety.

In practice, for a production system like a Stellar validator, you must publish your node's public key and quorum slice configuration. Other nodes will then include you in their slices based on your reliability and stake. Monitoring tools track the quorum map in real-time, visualizing which nodes are part of the active quorum and detecting potential splits. A poorly configured graph, where large groups don't intersect, can lead to network forks. Therefore, architecture is an ongoing process of auditing trust links and adapting slices to network changes.

The power of FBA lies in its flexibility, but this comes with operational responsibility. There is no algorithmically determined validator set; security emerges from the conscious, decentralized choices of each participant. Successful deployment requires understanding that your node's safety is interdependent with the choices of nodes you trust and those that trust you. Resources like the Stellar Protocol Documentation and the stellar-core configuration guide are essential for implementing these concepts correctly.

how-it-works
ARCHITECTURE GUIDE

The FBA Consensus Process: Step-by-Step

A technical walkthrough of the core components and operational flow required to implement a Federated Byzantine Agreement (FBA) system, as used by Stellar.

01

1. Define the Quorum Slice

The fundamental building block is the quorum slice. Each node (or validator) defines a list of other nodes it trusts to agree on a statement. This creates a decentralized trust graph.

  • A node's slice can include multiple other nodes for redundancy.
  • The union of all slices forms the overall quorum.
  • This is configured in a node's configuration file, specifying peer public keys and weights.
02

2. Establish the Quorum

A quorum is a set of nodes sufficient to reach agreement. Formally, it's a set of nodes where each node in the set has at least one quorum slice contained within the set.

  • The system reaches consensus when a quorum agrees on a transaction set.
  • Safety is guaranteed if the quorum intersection property holds: any two quorums must share at least one well-behaved node.
  • Architects must analyze the trust graph to ensure no disjoint quorums can form.
03

3. Run the Stellar Consensus Protocol (SCP)

SCP is the concrete implementation of FBA. It operates in Federated Voting rounds with two phases: nomination and ballot.

  • Nomination: Nodes gossip candidate values, converging on a single composite candidate.
  • Ballot: Nodes vote to accept the candidate value, confirming it is safe to commit.
  • Nodes only move forward when their quorum slices agree, ensuring asynchronous safety.
05

5. Implement Failure Detection & Accountability

FBA requires mechanisms to handle Byzantine nodes. Slices should be structured for fault tolerance.

  • Include enough nodes in a slice so that agreement can proceed if some are faulty.
  • The protocol includes authenticated messages; malicious votes are cryptographically attributable.
  • In practice, networks like Stellar use decentralized exchange of signed statements to expose bad actors.
06

6. Integrate with Application Layer

The consensus output—a finalized, ordered ledger—feeds into the state machine. This involves:

  • Transaction Queue: Collecting and pre-processing transactions for nomination.
  • Ledger Close: Applying the agreed-upon transaction set to update account balances and smart contracts (Soroban on Stellar).
  • History Archive: Distributing the immutable ledger history to observers via peer-to-peer protocols.
node-implementation
TUTORIAL

Implementing a Basic FBA Node

A practical guide to building the core components of a Federated Byzantine Agreement node, from quorum slices to message handling.

Federated Byzantine Agreement (FBA) is the consensus mechanism powering networks like Stellar and Ripple. Unlike traditional BFT systems that require a fixed, known validator set, FBA allows nodes to choose whom they trust, forming a decentralized trust graph. Each node defines its own quorum slice—a set of peers it considers sufficient to reach agreement. For the network to achieve safety, these slices must intersect to form quorums. This tutorial walks through architecting a basic FBA node in Python, focusing on the essential logic for slice validation and message propagation.

The core of an FBA node is its local configuration and state. We define a Node class that holds its unique identifier, a list of other nodes it trusts (its quorum slice), and a set of received statements. A statement is a digitally signed message containing a value (like a transaction batch) and a sequence number. The node must also maintain a map of the latest statements it has accepted from every other participant in the network to track consensus progress.

Quorum slice validation is the critical security check. A function is_quorum_slice_satisfied must determine if a given set of nodes satisfies the node's own slice definition. For a basic k-of-n slice (e.g., 3 of 5 trusted nodes), the function checks if the number of nodes from the slice present in the provided set meets the threshold. More complex logic can implement hierarchical slices as used in Stellar, where slices can contain other slices, requiring a recursive check.

Message handling follows a gossip protocol. When a node receives a new, validly signed statement, it stores it and broadcasts it to its immediate peers. The FBA voting protocol involves nodes repeatedly exchanging PREPARE, COMMIT, and EXTERNALIZE messages for each slot, similar to PBFT. Our node must implement logic to determine when it has seen a quorum of PREPARE messages for a value before issuing its own COMMIT, and a quorum of COMMITS before EXTERNALIZE-ing (finalizing) the value.

Testing the node requires simulating a small network. Create 5-10 node instances, configure their quorum slices to ensure adequate overlap (a quorum intersection), and have one node propose a value. The simulation should propagate messages and demonstrate that all nodes eventually externalize the same value. Tools like NetworkX can help visualize the trust graph and analyze quorum availability. This basic implementation provides the foundation for exploring more advanced features like slashing for malicious behavior or dynamic slice reconfiguration.

quorum-discovery
FEDERATED BYZANTINE AGREEMENT

Quorum Intersection and Safety

A guide to the core safety property of the Stellar Consensus Protocol and how to design a resilient node quorum configuration.

In a Federated Byzantine Agreement (FBA) system like Stellar, network safety is not guaranteed by a single, global quorum. Instead, each node defines its own quorum slice—a set of nodes it trusts enough to agree with. A quorum is then any set of nodes containing at least one quorum slice for each of its members. The fundamental safety property, quorum intersection, states that any two quorums in the network must share at least one well-behaved node. This intersection is the critical line of defense against forks, ensuring that if one quorum agrees on statement A and another on statement B, the honest node at their intersection will detect the conflict and prevent finalization.

Architecting a safe system requires carefully configuring these quorum slices. A common pattern is a hierarchical structure with tiered trust. Core validators (e.g., the Stellar Development Foundation nodes) form a strongly connected group, each listing the others in their slices. Gateway or anchor nodes then include several core validators in their slices, creating a dependency. This creates overlapping trust paths. The key is to avoid disjoint quorums, which occur when the network graph can be partitioned into two groups with no mutual trust links between them. Tools like stellar-core's quorum-validator command can analyze a configuration for this risk.

To implement this, you define a quorum_set in your node's configuration. Here is a simplified example structuring a small network with a core tier and an organization tier:

json
{
  "threshold": 2,
  "validators": [
    "core_validator_1.pubkey",
    "core_validator_2.pubkey",
    "core_validator_3.pubkey"
  ],
  "inner_sets": [
    {
      "threshold": 1,
      "validators": ["org_gateway_a.pubkey", "org_gateway_b.pubkey"]
    }
  ]
}

This node requires agreement from at least 2 of the 3 core validators AND at least 1 of the 2 organizational gateways, ensuring its quorum intersects with others using the same core set.

Beyond basic structure, safety requires planning for Byzantine failures. The Stellar Consensus Protocol (SCP) tolerates Byzantine faults within quorum slices. If your slice has n nodes, it can tolerate f failures where n = 3f + 1. Therefore, a slice with 4 nodes can tolerate 1 Byzantine member. Your architecture must ensure that even if the maximum number of faulty nodes in every slice act maliciously, quorum intersection with honest nodes is still maintained. This often means increasing slice sizes or diversifying trust across multiple independent organizations to reduce correlated failure risk.

For ongoing safety, you must actively manage your quorum set. Monitor the health and consensus participation of nodes in your slices using tools like the Stellar Dashboard or custom metrics. Rotate validator keys periodically. Crucially, analyze the network graph holistically. Your node's safety depends on the collective configuration of all nodes. Participate in the Stellar community's discussions on quorumset.org and use the stellar-core's diagnostic commands to verify that your configuration, combined with those you depend on, does not create partitionable groups that could lead to a catastrophic fork.

CONSENSUS COMPARISON

FBA vs. Other Consensus Mechanisms

A technical comparison of Federated Byzantine Agreement (FBA) against other major consensus models, focusing on decentralization, performance, and security trade-offs.

Feature / MetricFederated Byzantine Agreement (FBA)Proof-of-Work (PoW)Proof-of-Stake (PoS)Practical Byzantine Fault Tolerance (PBFT)

Decentralization Model

Quorum-based, trust graph

Hash power competition

Stake-weighted voting

Fixed, permissioned validator set

Energy Efficiency

Finality

Probabilistic (Stellar), Instant (SCP)

Probabilistic (6+ blocks)

Probabilistic or Instant (Casper)

Instant (1-3 rounds)

Typical Throughput (TPS)

1,000 - 5,000

7 - 15 (Bitcoin)

2,000 - 100,000+

10,000 - 20,000

Fault Tolerance Threshold

Up to 20% malicious nodes in a quorum slice

Up to 49% honest hash power

Up to 33% malicious stake (common)

Up to 33% malicious nodes (f=1, n=3f+1)

Permissionless Participation

No (requires quorum slice acceptance)

Yes

Yes (with stake)

No

Primary Use Case

Global value transfer (Stellar)

Store of value, censorship resistance

Smart contract platforms (Ethereum)

Private/consortium blockchains (Hyperledger)

Time to Finality

< 5 seconds

~60 minutes (Bitcoin)

~12 seconds - 15 minutes

< 1 second

security-considerations
SECURITY CONSIDERATIONS AND ATTACK VECTORS

How to Architect a Federated Byzantine Agreement System

Designing a resilient Federated Byzantine Agreement (FBA) system requires a threat model that anticipates both technical failures and malicious actors. This guide outlines key security considerations and common attack vectors for architects.

Federated Byzantine Agreement (FBA) is the consensus mechanism underpinning networks like Stellar and Ripple. Unlike Proof-of-Work or Proof-of-Stake, FBA relies on a quorum slice model where each node selects a set of other nodes it trusts to agree on the ledger state. The primary security assumption is that the union of all honest nodes' quorum slices forms an overwhelmingly connected graph, preventing malicious nodes from forking the network. The core challenge is architecting these trust relationships to be resilient against both random failures and coordinated attacks.

A critical architectural decision is the structure of the quorum. A poorly designed quorum can lead to catastrophic failure modes. The v-blocking property is essential: no small group of nodes should be able to prevent the rest of the network from reaching consensus. Architects must analyze their node topology for quorum intersection; if two quorums can exist without overlapping honest nodes, the network can fork. Tools like Stellar's quorum explorer can visualize these relationships and identify critical failure points in a proposed configuration.

Several key attack vectors target FBA's trust-based model. A Sybil attack involves an adversary creating many malicious nodes to infiltrate the trust graphs of honest participants. Mitigation requires robust, out-of-band identity verification or stake-weighting within quorum slices. A partition attack aims to split the network by disrupting communication between geographic regions, potentially creating disjoint quorums. Defenses include ensuring geographic diversity in quorum slices and implementing fast reconnection logic. Finally, liveness attacks exploit the fact that nodes wait for votes from their slice; a malicious node can selectively withhold votes to stall consensus for specific accounts or transactions.

Node operators must be vigilant about their quorum slice configuration. A common mistake is over-reliance on a few large, well-known validators, creating centralization and a single point of failure. The recommended practice is for each node to select a diverse slice that includes - trusted friends, - several reputable organizations, and - one or two larger validators for connectivity. This balances safety and liveness. Code-wise, a node's configuration in Stellar might define slices using a structure that lists specific public keys and their weights, ensuring no single entity controls the slice's threshold.

For long-term security, architects should plan for dynamic membership. Networks need a protocol for adding new, vetted validators and safely removing compromised or inactive ones without breaking quorum intersection. This often involves decentralized amendments where the existing quorum votes on changes to the base quorum set. Monitoring is also non-negotiable; services should track metrics like - agreement latency, - quorum health, and - validator uptime to detect anomalies indicative of an ongoing attack, triggering alerts for manual intervention.

ARCHITECTURE & IMPLEMENTATION

Federated Byzantine Agreement FAQ

Answers to common developer questions on designing, implementing, and troubleshooting Federated Byzantine Agreement (FBA) systems like Stellar Consensus Protocol.

Federated Byzantine Agreement (FBA) introduces a decentralized trust model, unlike traditional BFT which relies on a fixed, permissioned validator set. In FBA, each node (called a quorum slice) defines its own unique set of other nodes it trusts. The network-wide quorum emerges organically from the overlap of these individual slices. This allows for open membership and flexible trust without a central authority. Key differences:

  • Trust Decentralization: No single entity chooses the validator set.
  • Flexible Security: Nodes can have different trust requirements based on their role.
  • Open Participation: New nodes can join by convincing existing nodes to include them in slices. Protocols like Stellar Consensus Protocol (SCP) implement FBA, enabling fast, low-cost transactions across a permissionless network.
conclusion
ARCHITECTURE REVIEW

Conclusion and Next Steps

This guide has outlined the core components for building a Federated Byzantine Agreement (FBA) system. The next steps involve implementing these concepts and exploring advanced optimizations.

You now have the architectural blueprint for a basic FBA system. The core components include a node identity and quorum slice configuration mechanism, a consensus protocol like SCP for agreement on transaction sets, and a network layer for peer-to-peer message passing using libraries like libp2p. The security model relies on the transitive trust defined in quorum slices to prevent malicious nodes from controlling the network.

For implementation, start by building the local consensus state machine. Use a language like Go or Rust for performance and safety. Your node must maintain its UNL, validate received messages against the current slot, and execute the SCP voting phases: NOMINATE, PREPARE, CONFIRM, and EXTERNALIZE. Testing is critical; simulate network partitions and Byzantine nodes using frameworks like Tendermint's tm-load-test or custom Docker environments to verify liveness and safety guarantees.

To advance your system, consider these optimizations: - Federated voting to reduce message complexity, - Slashing mechanisms for penalizing equivocation, and - Dynamic UNL management for adapting to changing network conditions. Explore integrating with existing ecosystems; for instance, you could design your FBA network to serve as a trust layer for a cross-chain bridge or a decentralized oracle.

Further reading is essential for deep understanding. Study the original Stellar Consensus Protocol paper, analyze the open-source Stellar Core implementation, and review consensus research from groups like SCP-Dev. Engaging with these resources will provide insights into production-grade concerns like catch-up protocols and fee mechanisms.

The journey from architecture to a live, decentralized network is significant. Begin with a single-node prototype, expand to a private testnet with trusted validators, and rigorously test fault tolerance before considering a public launch. Each phase will reveal nuances in gossip protocols, state synchronization, and incentive design that are crucial for a robust FBA system.

How to Architect a Federated Byzantine Agreement (FBA) System | ChainScore Guides