> For the complete documentation index, see [llms.txt](https://docs.hashcloud.sh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hashcloud.sh/deterministic-compute-challenges/auto-difficulty-scaling.md).

# Auto Difficulty Scaling

### **Overview**

Auto-Difficulty Scaling (ADS) is the mechanism that keeps the HashCloud network balanced and efficient as miner hardware diversity grows. By dynamically adjusting computational difficulty in real time, the system ensures that miners of varying GPU capabilities compete on equal terms while maintaining stable block intervals and predictable network output.

This adaptive model replaces static difficulty systems common in traditional Proof-of-Work chains with an intelligent, feedback-driven algorithm. The result is a self-regulating mining environment where network performance remains consistent, and no single miner can dominate due to raw hardware advantage.

### **How It Works**

Auto-difficulty scaling continuously monitors **elapsed compute time** for each miner’s submitted proof. Using this data, the system evaluates whether the miner completed the assigned task too quickly or too slowly compared to the network’s target time threshold.

* **If computation is completed faster than expected**, it implies that the miner’s GPU is under-challenged. The system automatically **increases matrix size**, assigning larger workloads in the next challenge cycle.
* **If computation is slower than expected**, the system **reduces matrix size** to align performance with the global average.

This creates a smooth, adaptive equilibrium where GPU performance differences are normalized across all miners.

#### **Process Flow**

```
Monitor Compute Time → Compare to Target Time → Adjust Matrix Size
           ↓
    Faster GPUs → Larger Matrices
    Slower GPUs → Smaller Matrices
```

### **Benefits of Adaptive Scaling**

The Auto-Difficulty Scaling system provides multiple benefits for both miners and the overall network:

✅ **Balanced Network Performance**\
Each GPU contributes compute proportional to its capacity, preventing bottlenecks and ensuring efficient resource utilization.

✅ **Prevention of Hardware Dominance**\
High-end GPUs cannot monopolize emissions, as their tasks automatically scale in difficulty to offset raw speed advantages.

✅ **Stable and Predictable Mining Experience**\
Miners enjoy a smoother, more consistent performance curve no sudden difficulty spikes or reward volatility.

✅ **Fair Participation Across Devices**\
From gaming GPUs to professional compute cards, every miner remains relevant within the ecosystem.

{% hint style="success" %}

#### Benefits

* Ensures balanced performance across all miners.
* Prevents high-end GPUs from dominating rewards.
* Provides consistent mining experience.
  {% endhint %}

### Formula Concept

The HashCloud protocol expresses its auto-difficulty logic using a simple yet powerful mathematical model. The algorithm continuously adjusts matrix size according to each miner’s performance relative to the network’s **target compute time**.

$$
\text{newMatrixSize} = \text{previousMatrixSize} \times \text{adjustmentFactor}
$$

Where the adjustment factor is defined as:

$$
\text{adjustmentFactor} = \frac{\text{targetTime}}{\text{actualTime}}
$$

#### **Interpretation**

* If a miner computes faster than the target (actualTime < targetTime), the factor becomes >1, **increasing matrix size**.
* If a miner is slower (actualTime > targetTime), the factor becomes <1, **decreasing matrix size**.

This closed-loop feedback ensures continuous equilibrium, where computation time per challenge naturally converges toward the desired target range.

### **Network-Wide Stability Mechanism**

To prevent oscillation or over-adjustment, HashCloud introduces a dampening coefficient within the adjustment factor. This ensures that changes in matrix size occur gradually rather than abruptly, preventing destabilizing fluctuations across mining epochs. The backend aggregates telemetry from all active miners to calculate a **global adjustment curve**, preserving synchronization between individual difficulty levels and the network’s overall compute throughput.

### **Future Evolution**

As the network grows, Auto-Difficulty Scaling may evolve into a **multi-tier calibration model**, incorporating:

* Predictive difficulty adjustment using machine learning
* Regional or pool-based scaling for decentralized performance balancing
* Integration with compute leasing markets for real-time optimization

By making difficulty dynamic and intelligent, HashCloud establishes a foundation for sustained scalability and fairness across a diverse GPU ecosystem.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.hashcloud.sh/deterministic-compute-challenges/auto-difficulty-scaling.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
