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
  • Introduction
  • Account Overview
  • Table of Content:
  • 1. Initial Setup
  • 2. Account Setup
  • 3. Configuring Sequencer (Recommended)
  • 4. Task Execution and Rewards
  • 5. Exit Procedure
  1. BULDERS
  2. Computing Provider
  3. Edge Computing Provider (ECP)

ECP Funding Operations Guide

PreviousECP SetupNextECP FAQ

Last updated 4 months ago

Introduction

ECP (Edge Computing Provider) is a crucial component in the Swan Chain ecosystem and is responsible for executing Zero-Knowledge (ZK) computation tasks. The Sequencer is an optimization component aggregating proofs submitted by multiple ECPs, processing them in batches to reduce gas fees and improve overall efficiency.

Account Overview

  • CP Account (Computing Provider Account): An independent on-chain contract account for CP operations and fund management. FCP and ECP have the same account structure.

    • Owner Address: Hold the highest authority to manage the CP account.

    • Beneficiary Address: Receives rewards for ZK tasks.

    • Worker Address: Used for submitting proofs.

  • Collateral Account: ECP's collateral account in the collateral contract (SwanC).

    • Escrow Account: A account for storing ECP's collateral in collateral contarct, ensuring that ECP can receive ZK tasks.

  • Sequencer Account: ECP's account in the sequencer contract, used to pay for gas fees required when submitting ZK proofs.

Table of Content:

1. Initial Setup

1.1 Obtaining ETH for Gas Fees

ETH is required for transaction gas fees. Follow these steps:

  1. Cross-chain your ETH to Swan Chain to obtain ETH

  2. Prepare sufficient ETH to account for potential fluctuations in network gas fees

1.2 Obtaining SWAN for Collateral

ECP requires SWAN as collateral. You can purchase SWAN from centralized exchanges (CEXs).

Contract Address: 0xBb4eC1b56cB624863298740Fd264ef2f910d5564

1.3 Collateral Requirements

  • Collateral amounts dynamically adjust based on network computing power.

  • Maintain sufficient collateral to ensure continuous task eligibility

2. Account Setup

Depositing SWANU to the Collateral Account: Use the following command:

computing-provider collateral add --ecp --from <WALLET_ADDRESS> --account <CP_ACCOUNT> <Amount>

3. Configuring Sequencer (Recommended)

3.1 Enabling Sequencer Functionality

In the ECP configuration file, set EnableSequencer = true and autoChainProof = true

When autoChainProof is true, ECP will prioritize submitting proofs via the sequencer. If the sequencer lacks sufficient gas, it will automatically submit proofs on-chain. If set to false, ECP won't submit tasks when the sequencer lacks gas.

Note: ECPs can submit proofs in two ways:

  • Directly to Swan Chain as a contract (higher gas consumption per transaction)

  • To the zk-sequencer for batch aggregation (lower gas consumption, recommended)

3.2 Funding the Sequencer Account

computing-provider sequencer add --from <WALLET_ADDRESS> --account <CP_ACCOUNT> <Amount>

Note: The sequencer periodically processes tasks and deducts from the sequencer account. If the balance is insufficient during settlement, it may become negative. ECPs need to refund to receive new tasks.

4. Task Execution and Rewards

4.1 Reward Distribution

Read Computing Provider Income to learn more.

4.2 Viewing UBI tasks

Alternatively, you can use the CP command to view UBI tasks:

computing-provider ubi list

The result will look like this:

TASK ID  TASK CONTRACT                               TASK TYPE  ZK TYPE      STATUS    REWARD  SEQUENCER  CREATE TIME         
1081868  0x23AC299fA44aa7Df2ddDFE09cDB0331DD1945043  GPU        fil-c2-32G   verified  0.00    YES        2024-11-03 10:40:31  
1081072  0x23AC299fA44aa7Df2ddDFE09cDB0331DD1945043  GPU        fil-c2-32G   verified  0.00    YES        2024-11-03 11:10:30  
1081749  0x23AC299fA44aa7Df2ddDFE09cDB0331DD1945043  GPU        fil-c2-32G   verified  0.00    YES        2024-11-03 11:40:33  
1081904  0x23AC299fA44aa7Df2ddDFE09cDB0331DD1945043  GPU        fil-c2-32G   verified  0.00    YES        2024-11-03 12:10:34  
1081748  0x23AC299fA44aa7Df2ddDFE09cDB0331DD1945043  GPU        fil-c2-32G   verified  0.00    YES        2024-11-03 13:10:26  
1081562  0x23AC299fA44aa7Df2ddDFE09cDB0331DD1945043  GPU        fil-c2-32G   verified  0.00    YES        2024-11-03 13:40:29  
1081980  0x008E2334B34737D42128d13Ee50A78322663d7a7  GPU        fil-c2-32G   verified  0.00    YES        2024-11-03 14:10:31  
1081861  0x008E2334B34737D42128d13Ee50A78322663d7a7  GPU        fil-c2-32G   received  0.00    YES        2024-11-03 14:40:27  

4.3 Slash Mechanism

To maintain network performance and accountability, CPs are subject to a precise slashing mechanism that penalizes inefficient or unreliable computing services. For each failed task, CPs face graduated penalties:

  • Edge Computing Providers (ECP) lose 0.025% of their current full collateral amount per failed task (approximately 0.88 SWAN for a 3080 GPU), with around 48 tasks processed daily.

If a CP's collateral amount falls below the required threshold, they become ineligible to receive Universal Basic Income (UBI) tasks. To mitigate the risk of unexpected task exclusion, CPs are advised to maintain a buffer in their collateral amount.

5. Exit Procedure

5.1 Stop Receiving New Tasks

computing-provider account changeTaskTypes --ownerAddress=<OWNER_ADDRESS> 0

5.2 Data Backup

Backup the CP_PATH directory (default: ~/.swan/computing)

5.3 Withdrawal Process

a) Withdraw from collateral account:

computing-provider collateral withdraw --ecp --owner=<OWNER_ADDRESS> <AMOUNT>

b) Withdraw from sequencer account:

computing-provider sequencer withdraw --owner=<OWNER_ADDRESS> <AMOUNT>

c) Withdraw from escrow account:

  • Initiate withdrawal request:

computing-provider collateral withdraw-request --owner=<OWNER_ADDRESS> --account=<CP_ACCOUNT> --ecp <AMOUNT>
  • Confirm withdrawal after 7 days:

computing-provider collateral withdraw-confirm --owner=<OWNER_ADDRESS> --account=<CP_ACCOUNT> --ecp

Note: Escrow account balance may fluctuate due to periodic settlements. It's advisable to wait 24 hours after changing taskTypes before requesting the withdrawal. Confirmation can only be made 7 days after the initial request. Funds will be withdrawn to the CP's ownerAddress upon confirmation.

Visit Swan Chain's official bridge website:

SWAN is currently listed on , , and .

Review our for detailed information

Monitor the for computing units and base collateral trends(upcoming feature)

When using the sequencer, pre-fund the CP's sequencer account with ETH on Swan Chain. Currently, the gas is decided by the . For more detailed information, see .

Rewards are distributed during the next settlement cycle after 24 hours following the event rules, typically within 48 hours of task proof submission, to the beneficiary account.

Check the transaction list of the beneficiary account on the blockchain explorer: .

More details about Slash Collateral, check here:

https://bridge.swanchain.io
Gate.io
MEXC
LBank
comprehensive collateral documentation
Swan dashboard
Dynamic Pricing Strategy
here
CP UBI-0
https://swanscan.io
https://docs.swanchain.io/core-concepts/token/computing-provider-collateral#slashing-mechanism
Initial Setup
Obtaining ETH for Gas Fees
Obtaining SwanC for Collateral
Account Setup
Configuring Sequencer (Recommended)
Enabling Sequencer Functionality
Funding the Sequencer Account
Task Execution and Rewards
Reward Distribution
Viewing UBI tasks
Slash Mechanism
Exit Procedure
Stop Receiving New Tasks
Data Backup
Withdrawal Process