At NearMP, we employ the Proof of Work (PoW) mechanism to guarantee the security and fairness of our system. This method is based on an algorithm that requires a computational problem to validate transactions and add new blocks to the blockchain. This approach was first proposed within the Bitcoin system, and its use ensures that only participants who perform significant computational effort can influence the process of confirming and creating blocks.
What is PoW?
Proof of Work is a distributed hashing method that generates a timestamp on a server based on a network of peer nodes. The fundamental premise of Proof of Work (PoW) is that in order to add a new block to the blockchain, a specific amount of work must be completed, which is then validated by all participants in the network.
The objective is to identify a value (referred to as a "nonce") that, when hashed using an algorithm such as SHA-256, will result in a hash that begins with a specific number of initial zero bits. The number of required zeros in the hash is dependent on the complexity of the network at the time.
In this case, the average amount of work required to find such a value is dependent on the number of zero bits required, and therefore increases exponentially. Consequently, the greater the number of required zeros, the longer it will take to find the correct nonce, and the greater the demand on time and computational resources. Nevertheless, the verification process is swift and efficient. A single hash is sufficient to confirm that the result aligns with the specified complexity.
Our network protocol incorporates the Proof of Work mechanism through the incremental updating of the nonce in a block until a value is identified that aligns with the desired number of zero bits. Once the requisite computational effort has been expended to achieve this goal, the block becomes immutable, as any change would necessitate the completion of this work anew. As subsequent blocks are linked to previous ones, modifying a block will necessitate the reworking of all subsequent blocks.
PoW’s benefits
One of the fundamental benefits of Proof of Work is its capacity to effectively address the challenge of representation in majority decision-making processes. In traditional systems based on the "one IP address - one vote" principle, there is a risk that attackers could spoof the system using multiple IP addresses. Proof of Work adheres to the principle of "one CPU - one vote." This signifies that the representation within the system is determined by the longest chain of blocks that has undergone the greatest computational effort.
If the majority of computational power is controlled by nodes with legitimate access, their chain will grow at a faster rate and outperform any competing chains. In order to modify a previously proven block, an attacker must not only re-perform the proof-of-work for that block, but also for all subsequent blocks. Furthermore, they must then catch up and surpass the work of honest nodes. As new blocks are added to the chain, the probability of a slow attacker catching up with honest nodes decreases rapidly.
To accommodate the evolving hardware capabilities and fluctuating interest in supporting nodes over time, the proof-of-work complexity is set based on a moving average centered on the average number of blocks per hour. If the rate of block production is too high, the complexity will increase, which will help to maintain a stable and secure transaction proof process within the network.
The deployment of NearMP's Proof of Work mechanism serves to safeguard the network from malicious actors, reinforce decentralization, and guarantee the integrity of transactions within the platform, while fostering a competitive environment for participants.