> For the complete documentation index, see [llms.txt](https://bitcoin-solaris.gitbook.io/bitcoin-solaris/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bitcoin-solaris.gitbook.io/bitcoin-solaris/blockchain-information/blockchain-architecture/hybrid-pow-dpos-consensus-mechanism.md).

# Hybrid PoW/DPoS Consensus Mechanism

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

Bitcoin Solaris implements an innovative hybrid consensus mechanism that combines Proof-of-Work (PoW) and Delegated Proof-of-Stake (DPoS) across its dual-layer architecture. This approach leverages the security and decentralization of PoW with the scalability and energy efficiency of DPoS.

### 1. Base Layer: Proof-of-Work (PoW) <a href="#id-55f82645-2f02-4705-a6eb-1599b6673eec" id="id-55f82645-2f02-4705-a6eb-1599b6673eec"></a>

The Base Layer of Bitcoin Solaris utilizes a PoW consensus mechanism similar to Bitcoin, with some modifications:

#### 1.1 Mining Algorithm <a href="#id-2e04c6e4-3a73-40ec-b215-70f313fa8ace" id="id-2e04c6e4-3a73-40ec-b215-70f313fa8ace"></a>

* **Algorithm**: SHA-256 (compatible with existing Bitcoin mining hardware)
* **Difficulty Adjustment**: Every 1008 blocks (approximately 3.5 days)
* **Block Time**: 300 seconds (5 minutes)

#### 1.2 Block Validation <a href="#fe6bcd83-0863-4d1b-8af1-1a37731ce3de" id="fe6bcd83-0863-4d1b-8af1-1a37731ce3de"></a>

1. Miners compete to solve the PoW puzzle by finding a nonce that produces a hash below the target difficulty.
2. The first miner to solve the puzzle broadcasts the block to the network.
3. Other nodes verify the block’s validity, including:
   * Correct block structure
   * Valid PoW solution
   * All transactions in the block are valid
4. Nodes add the new block to their local copy of the blockchain if valid.

#### 1.3 Fork Resolution <a href="#id-5e1f4bc2-8bdb-4b13-82ff-412fd1f4dadb" id="id-5e1f4bc2-8bdb-4b13-82ff-412fd1f4dadb"></a>

* In case of a fork, the chain with the most accumulated PoW (longest chain) is considered valid.

### 2. Solaris Layer: Delegated Proof-of-Stake (DPoS) <a href="#id-1ed8e107-4b03-406d-b784-2a0f38f94f8f" id="id-1ed8e107-4b03-406d-b784-2a0f38f94f8f"></a>

The Solaris Layer implements a DPoS consensus mechanism for faster transaction processing and smart contract execution:

#### 2.1 Validator Selection <a href="#ad62b893-b8fc-4c0b-ad68-59e30608bc1b" id="ad62b893-b8fc-4c0b-ad68-59e30608bc1b"></a>

* 21 active validators are elected by BTC-S token holders.
* Voting Power: Proportional to the amount of BTC-S staked.

#### 2.2 Block Production <a href="#id-742a0294-18ba-4e89-ba38-083d79fae74e" id="id-742a0294-18ba-4e89-ba38-083d79fae74e"></a>

* **Block Time**: 15 seconds
* **Block Size**: Dynamic, up to 32MB
* Validators take turns producing blocks in a round-robin fashion.

#### 2.3 Block Validation <a href="#f5914fac-92cb-4b92-b99e-c2699837d987" id="f5914fac-92cb-4b92-b99e-c2699837d987"></a>

1. The selected validator proposes a new block.
2. Other validators verify the block’s validity.
3. If 2/3+ of validators approve, the block is finalized and added to the chain.

#### 2.4 Validator Rotation and Penalties <a href="#id-0282a502-3639-4c55-ab45-be336c661d6c" id="id-0282a502-3639-4c55-ab45-be336c661d6c"></a>

* Validator set rotates every 24 hours to ensure decentralization.
* Validators can be penalized (slashed) for malicious behavior or poor performance.

### 3. Cross-Layer Interaction <a href="#a63f425c-6a5b-426c-ba07-739923e696c2" id="a63f425c-6a5b-426c-ba07-739923e696c2"></a>

The hybrid consensus mechanism ensures seamless interaction between the Base and Solaris layers:

#### 3.1 State Synchronization <a href="#cf2bcd5e-e363-4644-803a-914b442db994" id="cf2bcd5e-e363-4644-803a-914b442db994"></a>

* The Solaris Layer periodically commits its state to the Base Layer.
* This commitment is included in a PoW block, leveraging the security of the Base Layer.

#### 3.2 Validator Set Updates <a href="#id-34ebbb1a-7f51-40cb-8c21-e533c4244ba3" id="id-34ebbb1a-7f51-40cb-8c21-e533c4244ba3"></a>

* Changes to the validator set on the Solaris Layer are recorded on the Base Layer.
* This ensures that the validator selection process benefits from the immutability of the PoW chain.

#### 3.3 Cross-Layer Transactions <a href="#id-93e1265b-adf3-446d-b297-783ea7fc3ec9" id="id-93e1265b-adf3-446d-b297-783ea7fc3ec9"></a>

* Users can move assets between layers through a two-way peg mechanism.
* These cross-layer transactions are verified and processed by both consensus mechanisms.

### 4. Security Considerations <a href="#c675ee0f-a26c-4f14-abc7-8693103a17a8" id="c675ee0f-a26c-4f14-abc7-8693103a17a8"></a>

#### 4.1 51% Attack Resistance <a href="#b5a97888-aef4-47b4-8357-a360cfff3b9f" id="b5a97888-aef4-47b4-8357-a360cfff3b9f"></a>

* The PoW Base Layer provides strong resistance against 51% attacks.
* The DPoS Solaris Layer’s security is reinforced by periodic checkpoints on the Base Layer.

#### 4.2 Byzantine Fault Tolerance <a href="#de67d10e-3061-4b54-8e61-3f15d98e387a" id="de67d10e-3061-4b54-8e61-3f15d98e387a"></a>

* The Solaris Layer can tolerate up to 1/3 of validators being Byzantine (malicious or faulty).

#### 4.3 Long-Range Attack Mitigation <a href="#id-7409f83f-ac69-49cd-a790-57ba5620d8a5" id="id-7409f83f-ac69-49cd-a790-57ba5620d8a5"></a>

* Validator set changes recorded on the Base Layer prevent long-range attacks on the Solaris Layer.

### 5. Scalability and Performance <a href="#id-69ace1af-c7f4-4e3a-a31c-29d2af5f1a84" id="id-69ace1af-c7f4-4e3a-a31c-29d2af5f1a84"></a>

* **Base Layer**: Capable of processing up to 3,000 transactions per second (TPS).
* **Solaris Layer**: Achieves up to 100,000 TPS with near-instant finality.

This hybrid consensus mechanism allows Bitcoin Solaris to maintain a high level of security while enabling the scalability and advanced features required for a next-generation blockchain platform.
