The cumulative difficulty algorithm of EON blockchain

Reliability of a blockchain is based on its architecture, including the algorithm of block generation that has to be protected from being reproduced by malicious parties. The algorithm must be unique and stable enough to exclude any possibility of external interference or manipulation.

This article is dedicated to explaining key features of EON blockchain algorithm.

Context

In EON, the network peers create a new block every 3 minutes. This process is based on random numbers generation, while the sequence of these numbers forms a cumulative difficulty, which defines the entire blockchain difficulty including the last block that is being created.

A random number created by a particular peer can easily be reproduced by every other peer in the network, hence validated by other participants. When a peer creates a new block, the block gets confirmed as the most perfect, therefore accepted by other participants. A peer that has the most perfect number according to the algorithm below would be a block creator.

The cumulative difficulty algorithm

  1. A digital signature of a field is taken. Such a signature is essentially a HEX-like bytes array of the previously created block. Such an array is of string type. The algorithm considers only the blocks created within the last 24 hours and ignores any others.
  2. The algorithm then takes the first 8 bytes obtained during the step 1 and converts them into a number, which, in its turn, is divided by the value of EONs on the user deposit account;
  3. Then, the maximum unsigned 8-bytes integer + 1 number (which is 0x10000000000000000 = 0xFFFFFFFFFFFFFFFF + 1) is divided by the value obtained in step 2;
  4. The cumulative difficulty of the previously created block is then taken and added to the value obtained in step 3.

This way, a peer creates and adds a block to the existing blockchain, which essentially means that it creates a new cumulative difficulty that would be used later, when creating the next block, and so forth.

The higher the cumulative difficulty, the better the blockchain is perceived by other peers. Therefore, it is this (the strongest one) cumulative difficulty that would be further used by other peers when their own cumulative difficulty is lower.