# Computing Layer

<figure><img src="https://content.gitbook.com/content/cvUWH8GhRCqvKwuN0BGF/blobs/3WxGLahGK1RvdTfZThE9/image.png" alt=""><figcaption><p>Computing Workflow</p></figcaption></figure>

Swan's Computing Layer is a crucial component of its decentralized cloud computing ecosystem. It's designed to facilitate the execution of computing tasks across a network of providers, ensuring efficiency, reliability, and security. The Computing Layer supports diverse workloads including **AI model training**, **ZK proof generation**, and — with the introduction of [Swan 2.0](https://github.com/swanchain/docs/blob/main/core-concepts/swan-2.0-inference-cloud.md) — **real-time AI inference** through the [Inference Marketplace](https://docs.swanchain.io/core-concepts/market-provider/inference-marketplace).

{% hint style="info" %}
**Swan 2.0 Update**: The Computing Layer now supports dual token payments. Consumers can pay with **stablecoins (USDC/USDT)** for inference workloads, while providers earn both stablecoin revenue and **SWAN token** rewards based on their [Contribution Score](https://docs.swanchain.io/token/swan-provider-income#swan-2.0-market-driven-income).
{% endhint %}

Here's an introduction to the key aspects of the Swan Computing Layer:

<figure><img src="https://content.gitbook.com/content/cvUWH8GhRCqvKwuN0BGF/blobs/qSX5ReOePKdWO5w4YhJk/image.png" alt=""><figcaption></figcaption></figure>

#### 1. **Computing Providers (CPs)**

Computing Providers are entities within the Swan network that offer computational resources. They must provide collateral in Swan tokens to join the network, ensuring accountability.

#### 2. **Task Submission and Bidding**

Users can submit computing tasks to the network. CPs can bid for these tasks, and jobs are generated for each CP that joins the bid. The system may use a randomized allocation method to fairly distribute jobs among providers.

#### 3. **Execution and Rewarding**

CPs execute the tasks and are rewarded with Swan tokens upon successful completion. The reward mechanism may follow a Proof-of-Work (PoW) auction style, where CPs have a chance to win a ticket if they complete the job.

#### 4. **Collateral and Slashing**

CPs must collateralize a certain amount of Swan tokens to participate in the network. If a CP fails to complete a job as promised, a portion of their collateral is slashed. This incentivizes providers to fulfill their commitments.

#### 5. **Cross-Chain Capability and Payment**

Swan's computing layer has cross-chain capabilities, allowing payments from multiple blockchain tokens. A swap engine converts user-paid tokens to Swan tokens before paying the CPs.

#### 6. **Decentralized and Secure**

The Swan Computing Layer operates in a decentralized manner, leveraging blockchain technology to ensure transparency, security, and trust.

#### 7. **Integration with Other Swan Services**

The Computing Layer is part of a broader ecosystem that includes storage provider selection, data management, and seamless integration from IPFS to the Filecoin network.

<figure><img src="https://content.gitbook.com/content/cvUWH8GhRCqvKwuN0BGF/blobs/tuVPrr8hxo5KPFXVk5v5/image.png" alt=""><figcaption><p>Payment in Computing Network</p></figcaption></figure>

#### Conclusion

Swan's Computing Layer represents a significant advancement in decentralized cloud computing. By leveraging blockchain technology and a sophisticated system of task allocation, collateral, and rewards, it offers a scalable and reliable solution for executing computing tasks across a decentralized network. Its integration with other Swan services and its cross-chain capabilities further enhance its appeal as a comprehensive solution for decentralized storage, payment gateway integration, and computing.
