The Stellar Consensus Protocol (SCP) stands as the backbone of the Stellar network, ensuring secure and efficient operations. It’s a revolutionary approach to achieving consensus in a decentralized financial network. The SCP is based on the concept of Federated Byzantine Agreement (FBA), which focuses on the idea of decentralized control where nodes voluntarily select which other participants they trust for reliable information. If you want to learn more about The Byzantine Problems: What Is The Byzantine Generals Problem
An extract of our article: “The Byzantine Generals Problem, also known as the Two Generals’ Problem, was proposed in Leslie Lambert’s paper on the fault tolerance of distributed peer-to-peer network communication in 1982. In the communication of the distributed system, some local problems may cause the computer to send error messages and destroy the system’s consistency. Therefore, the Byzantine Generals Problem is essentially a problem of consensus in point-to-point communication.”
SCP diverges significantly from the Proof of Work (PoW) and Proof of Stake (PoS) mechanisms. PoW, used by networks like Bitcoin, demands extensive computational efforts to solve complex mathematical problems for validating transactions and creating new blocks. In contrast, PoS, employed by networks such as Ethereum 2.0, requires validators to hold and sometimes lock up a certain amount of cryptocurrency to participate in the process.
SCP eliminates the need for energy-intensive mining by allowing nodes to reach consensus through a process of selecting trustworthy partners—quorum slices—and does not require validators to lock up capital as a stake. This shift not only reduces the environmental impact but also democratizes participation in the network’s security.
The benefits of SCP are evident in its speed and reliability. Transactions on the Stellar network are confirmed in a matter of seconds, a stark contrast to the minutes or even hours it can take on PoW or PoS systems. Moreover, SCP’s design inherently protects against double-spend attacks and ensures that the network can continue operating smoothly even if some nodes fail or act maliciously.
SCP prioritizes two out of three fundamental properties in consensus mechanisms: fault tolerance and safety. It’s designed to maintain operation despite some nodes’ failures and ensures that the network’s nodes agree on transaction outcomes to avoid conflicting states. While this can sometimes delay consensus when nodes struggle to reach agreement, it greatly reduces the chances of systemic failures.
Source: https://developers.stellar.org/docs/fundamentals-and-concepts/stellar-stack
The Stellar network architecture is comprised of various layers that work in harmony to provide a comprehensive financial infrastructure. These layers are designed to ensure the network remains resilient to failures, open to everyone, and operates swiftly and cost-effectively, addressing real-world financial scenarios.
The design of Stellar’s network layers, and the interaction between them, provides a resilient and flexible foundation upon which a diverse array of financial services can be built and operated, from everyday payments to complex DeFi applications. This layered architecture not only ensures operational efficiency and reliability but also supports innovation, allowing developers to focus on creating solutions that cater to their specific use cases.
Operations in Stellar represent specific actions that can alter the state of the ledger. Each operation is a command that dictates a change, and these are submitted to the network in groups called transactions. These transactions are atomic; they either all succeed or all fail. Operations can range from creating accounts to managing offers in the Stellar Decentralized Exchange (SDEX).
Transactions in Stellar are built by bundling one or more operations with additional information, such as the source account and sequence number. They are signed with the source account’s secret key to ensure authenticity and then submitted to the Stellar network for processing. If all operations within a transaction are valid and the account has enough balance to cover the fees and the operations themselves, the transaction is confirmed and applied to the ledger.
This operation is used to create and fund a new Stellar account. It requires a starting balance and creates a new entry in the ledger for the account.
The payment operation allows accounts to send an amount of a specific asset to a destination account. It’s a fundamental part of transferring value on the Stellar network.
Path payment operations allow for payments to be made using different assets; the network finds the best path between the asset sent and the asset received. There are strict send and strict receive versions of path payments, which guarantee either the amount sent or the amount received, respectively.
These operations are used to create, update, or delete offers in the Stellar Decentralized Exchange. There are separate operations for managing buy and sell offers, as well as creating passive offers that do not immediately take a matching offer.
This operation is utilized to configure various settings for an account, such as setting the inflation destination, managing signers, or setting flags that can alter the account’s permissions.
This operation creates, updates, or deletes a trustline, which is Stellar’s way of allowing an account to hold and transact with assets issued by other accounts.
The account merge operation transfers the balance of one account to another and removes the source account from the ledger.
Accounts can attach data entries to themselves, which are essentially key-value pairs. The manage data operation sets, modifies, or deletes these data entries.
A ledger in Stellar is the equivalent of a block in other blockchain technologies and captures the state of the network at a given point in time. It contains all the balances, orders, and other data like smart contract information. Ledgers are linked chronologically and each new ledger version is the result of applying a set of transactions to the prior version. The ledger header is a summary of the ledger, holding metadata such as the ledger version, the previous ledger hash, and the transaction set result hash.
Accounts are the primary data structure in Stellar, representing users of the system. An account is created through a “Create Account” operation and must have a minimum balance of XLM, which is determined by the base reserve requirement multiplied by the number of subentries the account has. An account has various properties like a unique identifier (Account ID), balances for different assets, signers, and thresholds for low, medium, and high security.
Assets on the Stellar network can represent fiat currencies, cryptocurrencies, or any other form of value. Each asset is identified by an asset code and the issuer’s account. Issuing an asset is done through a payment operation from the issuer to another account. Assets are controlled by the issuing accounts, which can set authorization flags and link to metadata about the asset. Assets issued on Stellar can also be used within smart contracts via the Stellar Asset Contract.
Operations are the individual instructions that can be included in a transaction. They range from payments to managing offers on the decentralized exchange to account configuration changes. Transactions bundle these operations and submit them to the network to be applied to the ledger. Transactions are atomic; if any operation within a transaction fails, the entire transaction fails.
Stellar introduced smart contracts through the Soroban platform. Smart contracts on Stellar are pieces of code that can execute operations on the blockchain. They are composed of Wasm bytecode and stored in CONTRACT_DATA ledger entries. Smart contracts can have their own storage entries on the ledger, which can be temporary or persistent, and have different costs and lifetimes associated with them.
Each of these data structures and components plays a critical role in Stellar’s ability to provide a scalable and flexible financial infrastructure. The network’s design around these elements allows for a wide range of financial operations, from simple payments to complex financial instruments and smart contracts.
Here’s a summary of the Stellar transaction lifecycle:
SEPs are proposals for improvements or features that enhance the interoperability and functionality of the Stellar network. They serve as standardized protocols that developers and organizations can implement to ensure compatibility and smooth interactions within the Stellar ecosystem.
SEPs cover various aspects of the Stellar network’s operations, from basic transaction protocols to more complex features like cross-border payments and account recovery. They are discussed, created, and updated in a collaborative manner, often with input from the wider Stellar community.
Notable SEPs include:
The Stellar Consensus Protocol (SCP) stands as the backbone of the Stellar network, ensuring secure and efficient operations. It’s a revolutionary approach to achieving consensus in a decentralized financial network. The SCP is based on the concept of Federated Byzantine Agreement (FBA), which focuses on the idea of decentralized control where nodes voluntarily select which other participants they trust for reliable information. If you want to learn more about The Byzantine Problems: What Is The Byzantine Generals Problem
An extract of our article: “The Byzantine Generals Problem, also known as the Two Generals’ Problem, was proposed in Leslie Lambert’s paper on the fault tolerance of distributed peer-to-peer network communication in 1982. In the communication of the distributed system, some local problems may cause the computer to send error messages and destroy the system’s consistency. Therefore, the Byzantine Generals Problem is essentially a problem of consensus in point-to-point communication.”
SCP diverges significantly from the Proof of Work (PoW) and Proof of Stake (PoS) mechanisms. PoW, used by networks like Bitcoin, demands extensive computational efforts to solve complex mathematical problems for validating transactions and creating new blocks. In contrast, PoS, employed by networks such as Ethereum 2.0, requires validators to hold and sometimes lock up a certain amount of cryptocurrency to participate in the process.
SCP eliminates the need for energy-intensive mining by allowing nodes to reach consensus through a process of selecting trustworthy partners—quorum slices—and does not require validators to lock up capital as a stake. This shift not only reduces the environmental impact but also democratizes participation in the network’s security.
The benefits of SCP are evident in its speed and reliability. Transactions on the Stellar network are confirmed in a matter of seconds, a stark contrast to the minutes or even hours it can take on PoW or PoS systems. Moreover, SCP’s design inherently protects against double-spend attacks and ensures that the network can continue operating smoothly even if some nodes fail or act maliciously.
SCP prioritizes two out of three fundamental properties in consensus mechanisms: fault tolerance and safety. It’s designed to maintain operation despite some nodes’ failures and ensures that the network’s nodes agree on transaction outcomes to avoid conflicting states. While this can sometimes delay consensus when nodes struggle to reach agreement, it greatly reduces the chances of systemic failures.
Source: https://developers.stellar.org/docs/fundamentals-and-concepts/stellar-stack
The Stellar network architecture is comprised of various layers that work in harmony to provide a comprehensive financial infrastructure. These layers are designed to ensure the network remains resilient to failures, open to everyone, and operates swiftly and cost-effectively, addressing real-world financial scenarios.
The design of Stellar’s network layers, and the interaction between them, provides a resilient and flexible foundation upon which a diverse array of financial services can be built and operated, from everyday payments to complex DeFi applications. This layered architecture not only ensures operational efficiency and reliability but also supports innovation, allowing developers to focus on creating solutions that cater to their specific use cases.
Operations in Stellar represent specific actions that can alter the state of the ledger. Each operation is a command that dictates a change, and these are submitted to the network in groups called transactions. These transactions are atomic; they either all succeed or all fail. Operations can range from creating accounts to managing offers in the Stellar Decentralized Exchange (SDEX).
Transactions in Stellar are built by bundling one or more operations with additional information, such as the source account and sequence number. They are signed with the source account’s secret key to ensure authenticity and then submitted to the Stellar network for processing. If all operations within a transaction are valid and the account has enough balance to cover the fees and the operations themselves, the transaction is confirmed and applied to the ledger.
This operation is used to create and fund a new Stellar account. It requires a starting balance and creates a new entry in the ledger for the account.
The payment operation allows accounts to send an amount of a specific asset to a destination account. It’s a fundamental part of transferring value on the Stellar network.
Path payment operations allow for payments to be made using different assets; the network finds the best path between the asset sent and the asset received. There are strict send and strict receive versions of path payments, which guarantee either the amount sent or the amount received, respectively.
These operations are used to create, update, or delete offers in the Stellar Decentralized Exchange. There are separate operations for managing buy and sell offers, as well as creating passive offers that do not immediately take a matching offer.
This operation is utilized to configure various settings for an account, such as setting the inflation destination, managing signers, or setting flags that can alter the account’s permissions.
This operation creates, updates, or deletes a trustline, which is Stellar’s way of allowing an account to hold and transact with assets issued by other accounts.
The account merge operation transfers the balance of one account to another and removes the source account from the ledger.
Accounts can attach data entries to themselves, which are essentially key-value pairs. The manage data operation sets, modifies, or deletes these data entries.
A ledger in Stellar is the equivalent of a block in other blockchain technologies and captures the state of the network at a given point in time. It contains all the balances, orders, and other data like smart contract information. Ledgers are linked chronologically and each new ledger version is the result of applying a set of transactions to the prior version. The ledger header is a summary of the ledger, holding metadata such as the ledger version, the previous ledger hash, and the transaction set result hash.
Accounts are the primary data structure in Stellar, representing users of the system. An account is created through a “Create Account” operation and must have a minimum balance of XLM, which is determined by the base reserve requirement multiplied by the number of subentries the account has. An account has various properties like a unique identifier (Account ID), balances for different assets, signers, and thresholds for low, medium, and high security.
Assets on the Stellar network can represent fiat currencies, cryptocurrencies, or any other form of value. Each asset is identified by an asset code and the issuer’s account. Issuing an asset is done through a payment operation from the issuer to another account. Assets are controlled by the issuing accounts, which can set authorization flags and link to metadata about the asset. Assets issued on Stellar can also be used within smart contracts via the Stellar Asset Contract.
Operations are the individual instructions that can be included in a transaction. They range from payments to managing offers on the decentralized exchange to account configuration changes. Transactions bundle these operations and submit them to the network to be applied to the ledger. Transactions are atomic; if any operation within a transaction fails, the entire transaction fails.
Stellar introduced smart contracts through the Soroban platform. Smart contracts on Stellar are pieces of code that can execute operations on the blockchain. They are composed of Wasm bytecode and stored in CONTRACT_DATA ledger entries. Smart contracts can have their own storage entries on the ledger, which can be temporary or persistent, and have different costs and lifetimes associated with them.
Each of these data structures and components plays a critical role in Stellar’s ability to provide a scalable and flexible financial infrastructure. The network’s design around these elements allows for a wide range of financial operations, from simple payments to complex financial instruments and smart contracts.
Here’s a summary of the Stellar transaction lifecycle:
SEPs are proposals for improvements or features that enhance the interoperability and functionality of the Stellar network. They serve as standardized protocols that developers and organizations can implement to ensure compatibility and smooth interactions within the Stellar ecosystem.
SEPs cover various aspects of the Stellar network’s operations, from basic transaction protocols to more complex features like cross-border payments and account recovery. They are discussed, created, and updated in a collaborative manner, often with input from the wider Stellar community.
Notable SEPs include: