> For the complete documentation index, see [llms.txt](https://doc.cryptostone.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.cryptostone.org/mining-system/23_adjustment_of_pool_difficulty.md).

# 23 Pool Difficulty Adjustment

If the number of participants increases and total Mining Power grows, gemstones may be mined too quickly. To prevent this, each pool adjusts difficulty based on total Mining Power.

If the total Mining Power of STONX pool (j) is (P\_j), the Target Pool Power is (P\_j^\*), and pool difficulty is (D\_j), then it is calculated as follows:

$$
D\_j = \max(1, P\_j \div P\_j^\*)
$$

The reference value of CryptoStone is as follows:

$$
P\_j^\* = 40,000,000 \text{ Power}
$$

Examples are as follows.

| Target Pool Power | Total Pool Mining Power | Calculation                                 | Pool Difficulty |
| ----------------- | ----------------------: | ------------------------------------------- | --------------: |
| 40,000,000        |              20,000,000 | 20,000,000 ÷ 40,000,000 = 0.5 → max(1, 0.5) |            1.0x |
| 40,000,000        |              40,000,000 | 40,000,000 ÷ 40,000,000 = 1.0               |            1.0x |
| 40,000,000        |              80,000,000 | 80,000,000 ÷ 40,000,000 = 2.0               |            2.0x |
| 40,000,000        |             200,000,000 | 200,000,000 ÷ 40,000,000 = 5.0              |            5.0x |

The reason for applying the `max(1, ·)` structure is to prevent difficulty from falling below 1.0x even when total Mining Power is lower than the Target Pool Power. In other words, it prevents mining speed from becoming excessively faster than the reference speed even in early stages when participation is low.

Conversely, when total Mining Power exceeds the Target Pool Power, Pool Difficulty increases proportionally. For example, if the total Mining Power of a specific pool increases to 80,000,000 Power, Pool Difficulty becomes 2.0x. In this case, the time required for the same user to mine one NFT also approximately doubles.

In smart contract implementation, BPS can be used to avoid decimal operations.

$$
D\_{j,\mathrm{BPS}} = \max(10,000, P\_j \times 10,000 \div P\_j^\*)
$$

Here, 10,000 BPS = 1.0x.

This structure allows overall mining speed to adjust naturally as participation increases, and prevents the supply of each STONX from being depleted too quickly.


---

# 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://doc.cryptostone.org/mining-system/23_adjustment_of_pool_difficulty.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.
