Swan Chain
  • BULDERS
    • Getting Started
    • DApp Developer
      • Deploying Your First Smart Contract with Remix
      • Interacting with Smart Contract on Swan Chain Using Go
    • App Developer
      • Building Docker Images and Deployment file with LDL
        • Lagrange Definition Language(LDL)
      • Deploying with Swan SDK
      • Store and Retrieve a File with Swan Storage
        • 1. Set up the python-MCS-SDK
        • 2.Create and Manage Buckets
        • 3.Upload Files and Folders
        • 4.Retrieve and Download Files
        • 5.Delete Files and Buckets
    • Node Operator
      • Swan Node Snapshots
    • Market Provider
      • Storage Market
      • AI/ML Orchestrator
        • Decentralized AI Marketplace
        • Connect to Orchestrator
      • Web3 ZK Computing Market
        • ZK Auction Engine
        • Sequencer
        • Contribute zk-UBI-task
          • How to Contribute
        • Example
      • Customized Market Provider
    • Computing Provider
      • Fog Computing Provider(FCP)
        • FCP Setup
        • Migrating FCP to Swan Mainnet
        • FCP Funding Operations Guide
        • FCP FAQ
      • Edge Computing Provider (ECP)
        • ECP Setup
        • ECP Funding Operations Guide
        • ECP FAQ
      • FAQ
    • Storage Provider
      • Storage Auction System
    • Developer Tools
      • Swan SDK
        • Python Swan SDK
          • Special Case: Create ssh login instance
          • SWAN Orchestrator SDK - Function and Parameter Reference
        • Go Swan SDK
          • A Sample Tutorial
      • Swan Console
        • Getting Started
        • Blockchain GPU Task Example
        • Custom Blockchain GPU Task Pools
      • Lagrange
      • Swan IPFS Storage
      • Nebula Block Cloud
      • Ecosystem Projects
    • Mission 3.0
      • Get Started
        • For Users
        • For Space Holders
  • NETWORK REFERENCE
    • Network Info
      • Set Up Your Wallet
      • Bridge Token
    • Contract Addresses
    • Fees
  • Core Concepts
    • Introduction to Swan Chain
    • Consensus Layer
    • Peer-to-peer (P2P) Network
    • Payment Channels
    • Service Discovery
    • Market Provider
      • Storage Market
      • AI Computing Marketplace
        • Orchestrator
        • Auction Engine
        • Bidding Task State Machine
      • ZK Proof Marketplace
        • ZK Task
        • ZK Pool
    • Storage Layer
    • Computing Layer
      • Computing Provider Protocol
      • Computing Provider Account
      • Layer3 Computing Protocol
      • Reputation System
      • Dynamic Pricing
    • CDN Layer
    • Tokenomics
      • UBI Allocation Curve
      • Computing Provider Income
      • Computing Provider Collateral
        • Collateral Requirement and Computing Unit
        • DePIN Oracle
      • Governance
        • Treasure DAO
    • Glossary
  • Swan Chain Campaign
    • Swan CP UBI
    • Swan Chain Mainnet
      • Network Information
      • Swan Token
      • Swan Chain Mission
        • Social Mission
        • Onchain Mission
        • Mission: Celestial Bloom
      • Swan Provider Campaign
        • Fog Computing Provider (FCP)
        • Edge Computing Provider (ECP)
        • Market Provider (MP)
      • GALXE Campaign
      • Free Tier and Special Credit Programs
    • Atom Accelerator Race
      • Before You Get Started
        • Set Up MetaMask
        • Claim SepoliaETH
        • Claim testSWAN
      • CP Acceleration Program
      • Builder Acceleration Program
      • On-chain Interaction Race
      • Community Engagement Challenge
      • FAQ
    • Swan Saturn Testnet
      • Before You Get Started
        • Set Up MetaMask
        • Claim Faucet Tokens
        • Bridge Tokens
      • Transaction Drive Program
      • Community and Educational Events
      • Partnership and Integration Program
      • KOL Program
      • Computing Provider Program
        • FAQ
      • Developer Grant Program
      • FAQ
    • Swan Jupiter Testnet
      • How to Participate
      • Before You Get Started
      • Network Early Adopter
      • FAQ
  • RESOURCE
    • Links
    • Brand Kit
Powered by GitBook
On this page
  1. Core Concepts

Consensus Layer

Smart contract execution and payment settlement


Overview of the Consensus Layer

The Consensus Layer is responsible for maintaining the integrity and security of the Swan Chain network by validating transactions, securing data, and ensuring consistency across the network. Swan Chain operates on a layered architecture that uses Ethereum Layer 1 as the foundation for security and finality, while Layer 2 (OP Stack) handles scalability and off-chain processing.

Key Components:

  1. Layer 1 (L1) – Ethereum: Ethereum serves as the base consensus layer that provides security, data availability, and settlement. Swan Chain inherits Ethereum’s robust Proof-of-Stake (PoS) consensus mechanism, which ensures that all transactions and data processed on Layer 2 are secure and immutable.

  2. Layer 2 (L2) – Optimism OP Stack: The OP Stack is a modular Layer 2 framework that powers Swan Chain by enabling fast and low-cost transactions while leveraging Ethereum’s security for final settlement. It provides scalability through Rollups, which batch multiple transactions into a single one and post it on Ethereum, significantly reducing gas costs and improving throughput.

  3. Layer 3 (L3) – Application-Specific Chains (Optional): Layer 3 can be introduced to handle more specialized functionalities, such as privacy, AI-specific workloads, or cross-chain interoperability. This layer builds on top of Layer 2, allowing developers to optimize and customize their applications without compromising security.

Here's a block table that outlines the different layers of Swan Chain's architecture, showing the role and functionality of each layer:

Layer

Name

Functionality

Key Features

Layer 1

Ethereum (Base Layer)

Provides the foundational security, data availability, and finality for the entire Swan Chain network.

- Security and Finality via Proof-of-Stake (PoS) consensus. - Data Immutability on Ethereum's blockchain. - Fraud-proof validation.

Layer 2

Optimism OP Stack (Scaling)

Scales Swan Chain by handling off-chain computations, reducing gas fees, and increasing transaction speed.

- Scalability through Rollups. - Fast Transactions with low latency. - Low Gas Fees by batching transactions.

Layer 3

Application-Specific Layer

Provides custom solutions for specific use cases such as AI tasks, enhanced privacy, and cross-chain interoperability.

- AI Optimization for task processing. - Privacy Enhancements (e.g., Zero-Knowledge Proofs). - Interoperability across blockchains.


How Swan Chain Consensus Works:

  1. Transaction Processing on Layer 2:

    • Swan Chain’s computational tasks and transactions are processed on Layer 2 (OP Stack), where they are batched and compressed using Rollup technology. This reduces computational costs and network congestion while increasing transaction speed.

    • The Rollups aggregate multiple transactions and submit them to Ethereum’s Layer 1 for finality and security.

  2. Security and Finality on Layer 1:

    • After processing on Layer 2, transaction data is submitted to Ethereum Layer 1, where it is verified and stored for immutability.

    • Ethereum’s Proof-of-Stake (PoS) consensus mechanism ensures that Swan Chain transactions are cryptographically secure, tamper-proof, and finalized with strong guarantees of validity.

  3. Consensus Validation:

    • Validators in the Layer 1 network are responsible for verifying the blocks and ensuring the security of the Swan Chain ecosystem. They confirm the validity of the transactions processed on Layer 2 and store them on Ethereum’s blockchain for long-term record-keeping.

  4. Multi-Layer Security:

    • Layer 2 Fraud Proofs: To ensure the integrity of transactions processed on Layer 2, fraud proofs are implemented. If a malicious actor tries to submit an invalid transaction, other validators can challenge it, maintaining the security and reliability of the network.

    • Data Availability Guarantees: By leveraging Ethereum’s L1, Swan Chain benefits from Ethereum’s extensive network of validators and its inherent data availability, ensuring the network can scale without compromising data integrity.


Benefits of the Swan Chain Consensus Layer:

  1. Scalability:

    • By utilizing Optimism’s OP Stack, Swan Chain achieves high throughput and low latency, making it suitable for AI/ML workloads and large-scale decentralized applications. The L2 Rollup mechanism significantly reduces gas costs while improving transaction speed.

  2. Security and Immutability:

    • Transactions on Swan Chain are protected by Ethereum’s PoS consensus, ensuring that once a transaction is finalized, it is immutable and secure. This provides a strong security foundation for all decentralized applications running on Swan Chain.

  3. Cost Efficiency:

    • Layer 2 Rollups allow multiple transactions to be bundled and posted on Layer 1, minimizing gas fees and making Swan Chain an affordable option for intensive AI computing tasks, model training, and decentralized applications.

  4. Flexibility with Layer 3:

    • The option to introduce Layer 3 chains allows developers to create application-specific chains that optimize performance and security for their unique use cases, such as enhanced privacy, interoperability, or specialized AI processing.



PreviousIntroduction to Swan ChainNextPeer-to-peer (P2P) Network

Last updated 8 months ago