# System Architecture

### **Overview**

The HashCloud **System Architecture** is designed around a **hybrid computation model**, combining high-efficiency off-chain GPU processing with secure on-chain validation and reward settlement. This model allows the network to scale compute performance linearly while retaining full transparency, traceability, and verifiability of miner contributions.

Through modular layering, HashCloud achieves both **operational speed** and **decentralized trust**, allowing the network to manage thousands of active GPU nodes without burdening the blockchain with raw computational data.

### **Core Components**

The architecture is composed of four interlinked components, each responsible for a critical stage of the compute lifecycle:

1. **Miner CLI:**
   * Handles GPU-based matrix computations locally on the miner’s hardware.
   * Receives deterministic challenge data from the Backend API.
   * Generates cryptographic proofs of computation integrity before submission.
2. **Backend API:**
   * Acts as the network’s coordination layer.
   * Issues computation challenges, collects proofs, and performs off-chain verification.
   * Ensures fairness by matching tasks to GPU profiles and monitoring network-wide performance balance.
3. **Performance Database:**
   * Stores validated performance metrics, miner history, and ranking data.
   * Functions as the source of truth for reward calculation and transparency.
   * Includes safeguards against spoofing or duplicate proof submissions.
4. **Reward Engine:**

   * Calculates daily HCLD distributions proportionally to verified compute output.
   * Applies VIP multipliers, normalization coefficients, and difficulty scaling.
   * Communicates with the on-chain contract for final settlement.

   Together, these components ensure a seamless loop of **Compute → Verification → Reward**, forming the computational backbone of the HashCloud ecosystem.

### Architecture Summary

#### **Process Flow**

```
1. Local Compute  →  2. Proof Submission  →  3. Backend Verification  →  
4. Reward Calculation  →  5. On-Chain Settlement
```

{% stepper %}
{% step %}

### Miners compute locally

Miners run the **AmplifyMiner CLI**, which performs deterministic matrix multiplications and hashing operations.

This off-chain process maximizes computational efficiency and leverages the full potential of the GPU.
{% endstep %}

{% step %}

### Submit proofs

Upon completing a task, miners generate a cryptographic proof and submit it via the **Backend API**.\
Each proof includes hash outputs, timestamps, and device metadata for verification.
{% endstep %}

{% step %}

### Backend verifies

The **Backend API** verifies proofs by cross-checking computation results and validating timing integrity.\
Invalid or tampered proofs are automatically rejected to preserve network reliability.
{% endstep %}

{% step %}

### Rewards calculated

Verified performance data is recorded in the **Performance Database**, where the **Reward Engine** determines each miner’s proportional share of daily emissions using the established reward formula.
{% endstep %}

{% step %}

### On-chain settlement

The on-chain contract finalizes payouts, ensuring transparent, traceable reward distribution.\
This hybrid approach minimizes blockchain congestion while maintaining full auditability of all token flows,
{% endstep %}
{% endstepper %}

### **Security and Integrity Mechanisms**

To protect against manipulation and false submissions, HashCloud integrates multiple integrity layers:

* **Cryptographic Proof Validation:** Each result is derived deterministically, ensuring verifiable reproducibility.
* **Hardware Fingerprinting:** GPU UUIDs and performance profiles are recorded to prevent hardware spoofing.
* **Rate Limiting:** The backend enforces proof submission limits to block spam or fraudulent activity.
* **Consensus Integrity:** Final reward settlements are validated through the on-chain governance contract, ensuring no centralized alteration.

This security framework guarantees that only *authentic compute work* performed by verified GPUs translates into HCLD rewards.

### **Architectural Advantages**

* **Scalable Efficiency:** Off-chain GPU processing eliminates the computational limits of traditional blockchain mining.
* **Transparent Verification:** On-chain settlement ensures full accountability and immutable recordkeeping.
* **Energy Optimization:** Tasks produce useful computational output rather than arbitrary hashing.
* **Fair Competition:** Integrated VIP and difficulty systems maintain balance across varied GPU tiers.

The result is a next-generation hybrid architecture blending the *speed of off-chain computation* with the *trust of blockchain validation.*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hashcloud.sh/architecture-overview/system-architecture.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
