> For the complete documentation index, see [llms.txt](https://docs.ierc20.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ierc20.com/new-features/ierc-pow/phase-ii-pow-advanced.md).

# Phase II: PoW - Advanced

### Output Model

The output is completely determined by the CPU computing power. The miner can customize the appropriate strategy according to its own computing power. We describe the mining difficulty as m4-m64. For example, m4 represents the mint hash value starting with "O×0000" as a valid, m6 represents the mint hash value starting with "0×000000" as a valid value. The miner can do it by itself before deciding on mint.

### DPoS points & Computational Power

In the IERC protocol, the mining output of PoW (Proof of Work) is entirely dependent on the computational power of the miners. Miners can customize their mining difficulty by evaluating their own computational power and choosing an appropriate strategy. The levels of effective mining difficulty range from m4 to m64, where the m4 level signifies that the effective Mint hash value starts with "0x0000," while the m6 level indicates that the hash value starts with "0x000000."

When miners decide on the desired mining difficulty and successfully find a hash value that meets the criteria, they need to pay a certain amount of gas fees to have the Mint transaction added to the blockchain. The mined block reward is calculated using the following formula:

1. **The formula for calculating the weight of PoW is as follows:**

   $$Weight=10^{m−4}$$

* $$Weight$$ represents the proportion of rewards allocated to the miner in that block, and **m** represents the selected mining difficulty level.

2. **The formula for calculating the PoW reward is as follows:**

$$Rewards=\frac{Weight}{Weight\_T}×(BlockRewards×Ratio\_{PoW}×(1+LastEmptyCount))$$

* $$Rewards$$ represent the mining rewards that a miner can obtain in the current block.
* $$Weight\_T$$ represents the total sum of the weights of all valid mining activities in the current block.
* &#x20;$$BlockRewards×Ratio\_{PoW}$$ represents the PoW output reward for each block. For example, in the first two years, the block reward is 50% of the base reward, which is 50% of 1000 inscriptions. Afterwards, the block reward is halved every two years.&#x20;
* $$LastEmptyCount$$ represents the number of consecutive blocks without valid PoW transactions in the previous block or blocks. This value will increase the reward for subsequent blocks until a valid transaction is generated.

This reward mechanism ensures that as the mining difficulty increases, miners have the potential for higher profits. It also encourages continuous network participation and provides cumulative rewards for blocks without transactions, thus providing strong motivation for miners to continue contributing their computational power even during periods of lower participation.

<figure><img src="/files/rH8sWdFKcbEb6KojSQDv" alt=""><figcaption></figcaption></figure>

1. In the first scenario, at BlockNumber X,&#x20;

There are four miners participating in mining: A, B, C, and D. A and B choose mining difficulty level m4, C choose m5, and D choose m6. According to the PoW weight calculation formula, The weights of A and B are $$10^{4−4}=10^{0}=1$$, the weight of C is $$10^{5-4}=10^1=10$$ , the weight of D is $$10^{6-4}=10^2=100$$. If the block reward is 1000 ticks and the PoW output ratio is 50%, then each of miners A and B will receive $$\frac{1}{112}\*500=4.46$$ Ticks, miner C will receive $$\frac{10}{112}\*500=44.64$$ Ticks, and miner D will receive $$\frac{100}{112}\*500=446.42$$ Ticks.

2. In the second scenario, at BlockNumber X+1,

No miner successfully mines the block, meaning that the block is empty. According to the IERC protocol, the reward for this block will not disappear but will accumulate and be carried over to the next block. This means that the reward for the next block will increase as a result.

3. In the third scenario, at BlockNumber X+2,

&#x20;After the previous empty block, miners E, F, and G successfully mine new blocks. Suppose miner F chooses the difficulty level m5, while miners E and G both choose the difficulty level m6. According to the previous weight calculation, the weight of F is $$10^{5-4}=10^1=10$$, and the weights of E and G are $$10^{6-4}=10^2=100$$. Since the previous block was empty, according to the reward calculation formula, the $$LastEmptyCount$$ is 1, which will increase their rewards. If we assume that the base block reward is still 1000 ticks, then the reward that miner F will receive are  $$\frac{10}{210}*(500+500)=47.61$$ Ticks, and the rewards that miners E and G will receive are $$\frac{100}{210}*(500+500)=476.19$$ Ticks.

<figure><img src="https://d5cuifdrq9i.sg.larksuite.com/space/api/box/stream/download/asynccode/?code=Y2FhOGZmOTc2NDljMzM4YjdjMzE0NDY5ZTVlMjM5OTZfYzVMTUNudGVzbTlaemF0NXN5ZWw5d2FGYm92b1Y5MFJfVG9rZW46Q00zdGJRYlFXb3pESER4aVdZTmx0d01HZ1pjXzE3MDM4NTIxNjM6MTcwMzg1NTc2M19WNA" alt=""><figcaption></figcaption></figure>


---

# 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.ierc20.com/new-features/ierc-pow/phase-ii-pow-advanced.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.
