**3. Proposed Hybrid Approach**

In this study, we combine two consensus mechanisms for a fair mining reward for the miner and validator into a hybrid model. Assume that the behaviour of nodes is likely to be known as the most massive chain. As a result, the first block generated in this model is usually referred to as the main chain, along with the majority of the nodes in the network. In Figure 4, we present our proposed finite state automata (FSA) model for the block-forging process.

**Figure 4.** FSA for the block-forging process.

In Figure 4, the square blocks correspond to PoW, and the circles correspond to PoS. The arrows represent canonical chains. Under certain conditions, PoW and PoS blocks are mined and staked in random order, and the possibility of reaching a consensus is approximately 50% [41]. N*x* is the set of all positive integers smaller than 2*<sup>x</sup>*, and block *b* = (*fp,fsr,ftr,fd,fts,ftx*), where *fp,fsr,ftr,fd* ∈ N256, *fd* ∈ N64 and *ftx* is a linked list. Table 3 provides a description of these elements.

**Table 3.** Description of the elements of the proposed algorithm.


Miners working in a conventional PoW mining setup require a step-by-step implementation, as depicted in Algorithm 1. With the mining difficulty parameter *dw* and the 256-bit-long function *hash*(·), miners can solve complex problems within this rule, as shown in Equation (1).

$$h\dot{u}t = \text{hash}(b) \le 2256/dw\tag{1}$$

After completing mining, several rewards are provided, and their mining power is proportional to the computation power.


Figure 5 illustrates the proposed hybrid model flow, in which the mining process begins with the identification of stake parameters. These are mature balancing parameters for stakes, coinage, the synchronisation of timestamps, the weights of individual nodes and the weight of the entire network. After the initial validations and time sync prerequisite tests, we add the PoW nonce discovery loop. Next, an empty block template is created. The PoW loop then locates a valid nonce to generate a valid hash. The block contains individual transactions that cannot be arbitrarily modified. Other block records, such as timestamps and earlier hash blocks, are irreversible. Therefore, to adjust the hash and achieve a correct pattern, the nodes use the nonce arbitrary field. As part of the PoW loop, miners start with 0 and continue to increase the nonce and produce hashes whilst merging this nonce with other block data. When a correct hash that meets the requirements of the block hash is discovered, the peer achieves success in mining. A complexity factor is added for the block interval to be preserved.

**Figure 5.** Process of the proposed hybrid model with supported features.

By applying this approach, we can achieve excellent control over the generation time interval for blocks. In addition, the benefits of mining and transaction fees are evenly distributed amongs<sup>t</sup> investors. Apart from this mining method, another security measure is implemented to secure the network against the misbehaviour of nodes by preventing these nodes in a predefined period. A minimum of one hour is required to ban the simulation setting. Whenever a peer node obstructs, the peer is banned for one hour from the network. The protocol imposes an additional restriction that all nodes must be fairly validated. Both network nodes are equally weighted with regard to decision making. It involves validating a rich node and judging a weak node fairly. The two peer nodes share the same code and weight. Given that the mining process involves a degree of risk, every node can verify transactions and blocks. The frequency of the chance depends on its staking capacity.

Furthermore, our proposed method incorporates PoS and PoW into a stochastic coherence process without sacrificing availability, and a decentralised stack is essential. Considering that the systems run based on computations and stakes in the network, we define a rule-based forking mechanism to ensure that new blocks are produced between the two consensus types. By examining how much effort is made and the rewards obtained by stacker and miner devices, which should be fair, this study demonstrates its novelty. This simulation proposes a minor tweak to the difficulty adjustment, as indicated in Equation (2).

$$td\_6, c\_0 = \text{argmax} \; td\_{\text{vii}} \cdot td\_{\text{si}}; i \in \{1, \ldots, N\} \tag{2}$$

In general, the algorithm chooses the appropriate complexity to match the inside network's hash/stake power. However, this choice is sometimes gradual. Consider, for example, that stake complexity is approximately 10 times greater than miner complexity. There is a 10x increase in stake in comparison with its hash rate. Unlike PoW, each stacker processes several numbers and keys.

$$\text{seed}\_{t+1} = \text{sign}(\text{seed}\_t, \text{sk}) \tag{3}$$

When this condition is met, a stake block can be produced.

$$\ln(\text{hash(secd)}/2^{256}) \mid \cdot \cdot d\_s \le V \cdot \Delta,\tag{4}$$

where *V* is the amount of the computation unit and Δ is the time from the last block. To define the algorithm target, we should have *t* as the target time and 2*t* becomes the target time for PoS and PoW. Double-spending attacks take place when an individual has more than 51% of the peer network either as a miner or as a stacker. The dominant attacker is assumed to have power defined with *a* and *b* notations, and the ordinary nodes are defined with *c* and *d* notations. The hash (PoW) block generation rate is *λω* = *ωdω* , where (*w*) is the hash rate. During the simulation, the number of blocks were generated using random variable *X* ∼ *PoS*(*λw*), and *E*(*X*) = *λ<sup>w</sup>*. For example, assume that *Yw* is a notation of the total difficulty of the mining process; thus, *E*(*Yw*) = *E*(*X*) · *dw*.

$$E(\mathcal{Y}\_{\omega}) = \frac{w}{d\_{\omega}} \ast d\_{\omega} = w \tag{5}$$

Similarly in Algorithm 2, the PoS block generation rate is declared as *λω* = *sds* , where *s*is the amount of stake.

The notation *Ys* is the total stack difficulty.

$$E(\boldsymbol{\chi}\_s) = \frac{w}{d\_s} \ast d\_s = s \tag{6}$$

Meanwhile, the attacker's chain contains a weight within the expected period.

> (tdwc + a · t) · (tdsc + b · t) (7)

The ordinary nodes' rules are defined as follows:

$$(\text{td}\_{\text{WC}} + \text{c} \cdot \text{t}) \cdot (\text{td}\_{\text{SC}} + \text{d} \cdot \text{t}),\tag{8}$$

where *tdw* and *tds* represent the total difficulty/complexity of mining and stacking blocks, respectively. According to the prospectus of the attacker, overtaking another chain requires

the attacker to possess greater power than the normal nodes, which results in network inequality.

$$\text{td}\_{\text{sc}} \cdot (\text{a} - \text{c}) + \text{td}\_{\text{wc}} \cdot (\text{b} - \text{d}) + (\text{ab} - \text{cd}) \cdot \text{t} \ge 0. \tag{9}$$

