Skip to content

Commit

Permalink
Add halving under mining (#348)
Browse files Browse the repository at this point in the history
* add halving under mining

* fix image link
  • Loading branch information
yfeng2824 committed May 21, 2024
1 parent 23d9f97 commit 4b5f0a4
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 0 deletions.
5 changes: 5 additions & 0 deletions website/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ yarn.lock

# Ignore specific files
*.log
*.png
*.jpg
*.jpeg
*.gif
*.webp
68 changes: 68 additions & 0 deletions website/docs/mining/halving.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
id: halving
title: Halving
---

# Halving

Nervos CKB will have a halving event every 4 years according to its mechanism, at which time the base issuance rewards will be halved. [View countdown](https://explorer.nervos.org/halving)

## What is Halving?

In the Nervos ecosystem, mining is used to secure the network and distribute tokens in the form of block rewards. A total of 33.6 billion CKB tokens will be created through primary issuance over approximately 84 years to incentivize the miners that secure the network.

Every epoch, a period of approximately 4 hours, a fixed amount of 1,917,808 CKB is introduced. Every 8,760 epochs, a period of approximately 4 years, this amount is cut in half. This event is called a halving, and it is the point where the mining rewards from primary issuance are permanently reduced by 50%. This halving process will continue every 4 years until the year 2103, after which point all block rewards from primary issuance will cease completely.

## How Does Halving Work?

In order to make the halving plan work as expected, a concept of time called an epoch was introduced.

> An epoch is a period of time for a set of blocks. In Nervos, the PoW difficulty changes with each new epoch. All the blocks in the same epoch share the same difficulty target. The difficulty adjustment algorithm aims to stabilize the orphan block rate at 2.5% and the epoch duration at 4 hours.
:::tip
Epochs per halving is **4 _ 365 _ (24 / 4) = 8760**, and the Nth halving of CKBytes occurs at epoch: **8760 \* N**.
:::

## Why is Halving Significant?

Each time a halving occurs, it causes a sharp decrease in the rewards generated per block. The supply of new CKB entering circulation is lowered, dramatically reducing the rate of inflation. This is important because it creates a shift in the underlying market equilibrium and forces a reevaluation of what is considered fair market value.

Halving events occur on a predetermined issuance schedule that cannot be changed, postponed, or delayed. Investors and community members often look forward to a halving event as something to celebrate since it marks an important milestone in the history of the project.

## When Will CKByte Be Halved?

The following table details the schedule for several upcoming CKB halvings and their corresponding **base issuance rewards**:

| Event | Date | Epoch # | Epoch reward | Block reward | Daily reward | Total new CKB between events |
| ------------------- | ---------------------- | --------------- | ----------------- | ------------- | ------------------ | ---------------------------- |
| **Nervos launches** | **16 Nov 2019** | **0 (genesis)** | **1,917,808 CKB** | **1,065 CKB** | **11,506,849 CKB** | **16,800,000,000 CKB** |
| **1st halving** | **19 Nov 2023** | **8,760** | **958,904 CKB** | **533 CKB** | **5,753,424 CKB** | **8,400,000,000 CKB** |
| 2nd halving | Expected November 2027 | 17,520 | 479,452 CKB | 266 CKB | 2,876,712 CKB | 4,200,000,000 CKB |
| 3rd halving | Expected November 2031 | 26,280 | 239,726 CKB | 133 CKB | 1,438,356 CKB | 2,100,000,000 CKB |
| 4th halving | Expected November 2035 | 35,040 | 119,863 CKB | 67 CKB | 719,178 CKB | 1,050,000,000 CKB |
| 5th halving | Expected November 2039 | 43,800 | 59,932 CKB | 33.5 CKB | 359,589 CKB | 525,000,000 CKB |
| 6th halving | Expected November 2043 | 52,560 | 29,966 CKB | 16.75 CKB | 179,794.5 CKB | 262,500,000 CKB |
| 7th halving | Expected November 2047 | 61,320 | 14,983 CKB | 8.375 CKB | 89,897.25 CKB | 131,250,000 CKB |
| 8th halving | Expected November 2051 | 70,080 | 7,491 CKB | 4.1875 CKB | 44,948.625 CKB | 65,625,000 CKB |
| 9th halving | Expected November 2055 | 78,840 | 3,746 CKB | 2.09375 CKB | 22,474.3125 CKB | 32,812,500 CKB |
| 10th halving | Expected November 2059 | 87,600 | 1,873 CKB | 1.046875 CKB | 11,237.15625 CKB | 16,406,250 CKB |

:::note
CKB block rewards include the [Base (issuance) reward](/docs/mining/rewards#base-reward), [Secondary (issuance) reward](/docs/mining/rewards#secondary-reward), [Commit reward](/docs/mining/rewards#proposal-reward-and-commit-reward), and [Proposal reward](/docs/mining/rewards#proposal-reward-and-commit-reward):

<img
src="/img/mining/mining-block-reward.png"
width="668"
height="190"
alt="CKB block rewards include the base reward, secondary reward, commit reward and proposal reward"
/>
However, when discussing CKB halving, it only relates to **base issuance rewards**.
Therefore, the block rewards listed in the table only include the portion of rewards
from base issuance to help with understanding. :::

<img
src="/img/mining/mining-halving.png"
width="700"
height="414"
alt="Cumulative base issuance amount of CKB"
/>
1 change: 1 addition & 0 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export default {
items: [
"mining/algorithm-difficulty",
"mining/rewards",
"mining/halving",
"mining/cost-and-profit",
"mining/risks",
"mining/hardware",
Expand Down
Binary file added website/static/img/mining/mining-block-reward.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/static/img/mining/mining-halving.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4b5f0a4

Please sign in to comment.