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. Introduction
  • 2. ZK Engine Component
  • 3. Workflow
  • 5. Interaction with External Modules
  1. BULDERS
  2. Market Provider
  3. Web3 ZK Computing Market

ZK Auction Engine

PreviousWeb3 ZK Computing MarketNextSequencer

Last updated 10 months ago

1. Introduction

The ZK Computing Market is a crucial component of the Swan Chain ecosystem, serving as the primary Market Provider (MP) for Zero-Knowledge (ZK) computations. One of its sub-components, the ZK Sequencer, plays a pivotal role in processing tasks and proofs.

2. ZK Engine Component

1. Functions

  • Task Collection and Assignment: The ZK Engine collects and assigns ZK tasks to appropriate CPs based on available resources.

  • Proof Validation and Settlement: It validates proofs submitted to the Swan Chain, handling the financial settlement, including rewards and penalties.

2. ZK Sequencer

  • Proof Management: The Sequencer verifies and batches proofs into blobs, storing them in the Multi-Chain Storage (MCS) and creating unique identifiers (CIDs). This step minimizes gas costs for the network.

  • Collateral Management: It ensures CPs have sufficient collateral and handles batch settlement of tasks, including reward distribution, slashing, and gas payments.

  • Data Integrity: The Sequencer ensures the integrity of task data, checking for modifications and confirming the authenticity of proofs. It also manages the CID creation process and records it on the Swan Chain.

3. Workflow

  1. Task Assignment and Pooling:

    • The ZK Engine aggregates various ZK tasks (such as FIL-C2-512M, FIL-C2-32G, ALEO, etc.) into the ZK Tasks Pool.

  2. Proof Submission by ECPs:

    • Edge Computing Providers (ECPs) receive tasks from the ZK Tasks Pool.

    • After completing the required computations, ECPs generate proofs for the completed tasks.

    • ECPs have two options for submitting proofs:

      • Direct Submission: Proofs are submitted directly to the Swan Chain, incurring standard gas fees.

      • Submission via Sequencer: Proofs are submitted through the Sequencer, which aggregates the proofs, potentially reducing gas fees due to the more efficient batching and storage process.

  3. Proof Processing and Verification:

    • Proof Engine: Processes the submitted proofs. It verifies the proofs for correctness.

    • If proof is valid, the process moves forward to collateral checking; if invalid, it may lead to penalties.

  4. Collateral Checking:

    • The system checks whether the ECP has sufficient collateral locked.

    • This check determines the outcome for the ECP based on proof validity and collateral status.

  5. Outcome Determination:

    • Reward Distribution: If the proof is valid and the collateral is sufficient, the Reward Engine processes rewards for the ECP.

    • Slashing: If the proof is invalid or collateral is insufficient, the Slash Engine applies penalties, potentially deducting funds from the ECP's CP Account.

  6. Sequencer Operations:

    • For proofs submitted via the Sequencer, the Sequencer aggregates the proofs into blobs.

    • These blobs are stored in the Multi-Chain Storage (MCS), which optimizes gas costs and ensures data integrity.

  7. Swan Chain Integration:

    • The Sequencer or direct submission mechanisms create an AggregateTask entry on the Swan Chain, which records the aggregated proofs and associated data.

    • The Swan Chain manages collateral, GAS fees, rewards, and slashing information, maintaining transparency and accountability.

  8. Batch Settlement:

    • The ZK Engine periodically settles all submitted and verified proofs.

    • This settlement process includes distributing rewards to ECPs or imposing penalties for invalid proofs or inadequate collateral.

5. Interaction with External Modules

1. Swan Chain Contracts

  • Collateral Contract:

    • Manages CP stakes

    • Handles locking and unlocking of collateral

    • Executes slashing when necessary

  • AggregatorTask Contract:

    • Records task blob CIDs on-chain

    • Provides a transparent, immutable record of processed tasks

  • TaskRegister Contract:

    • Handles task registration and tracking

2. MCS (MultiChain.Storage)

  • Stores aggregated task data as blobs

  • Generates unique CIDs for each stored blob

  • Provides efficient retrieval of task data when needed

3. Filecoin Network

  • Acts as a backup storage solution for MCS data

  • Ensures long-term data availability and redundancy