# Block Creation

Three values are key to determining which account is eligible to generate a block, which account earns the right to generate a block, and which block is taken to be the authoritative one in times of conflict: base target value, target value and cumulative difficulty.

**Base Target Value**

In order to win the right to forge (generate) a block, all active IEP accounts ‘compete’ by attempting to generate a hash value that is lower than a given base target value. This base target value varies from block to block, and is derived from the previous block’s base target value.

**Target Value**
Each account calculates its own target value, based on its current effective stake. This value is: T = Tb × S × Be where:

- T is the new target value
- Tb is the base target value
- S is the time since the last block, in seconds
- Be is the effective balance of the account

As can be seen from the formula, the target value grows with each second that passes since the timestamp of the previous block. The maximum target value is 0.17080318 x 10e17 and the minimum target value is one half of the previous block’s base target value. This target value and the base target value are the same for all accounts attempting to forge on top of a specific block. The only accountspecific parameter is the effective balance parameter.

*Cumulative Difficulty*
The cumulative difficulty value is derived from the base target value, using the formula: Dcb = Dpb + 264 / Tb where:

Dcb is the difficulty of the current block Dpb is the difficulty of the previous block Tb is the base target value for the current block

**The Forging Algorithm**

Each block on the chain has a generation signature parameter. To participate in the block forging process, an active account cryptographically signs the generation signature of the previous block with its own public key. This creates a 64-byte signature, which is then hashed using SHA256. The first 8 bytes of the resulting hash gives a number, referred to as the account’s hit.

The hit is compared to the current target value. If the computed hit is lower than the target, then the next block can be generated. As noted in the target value formula, the target value increases with each passing second. Even if there are only a few active accounts on the network, one of them will eventually generate a block because the target value will become very large. The corollary of this is that you can estimate the time that will be required for any account to forge a block by comparing that account’s hit value to the target value.

When an active account wins the right to generate a block, it bundles up to 255 available, unconfirmed transactions into a new block, and populates the block with all of its required parameters. This block is then broadcast to the network as a candidate for the blockchain. The payload value, generating account, and all of the signatures on each block can be verified by all network nodes who receive it. In a situation where multiple blocks are generated, nodes will select the block with the highest cumulative difficulty value as the authoritative block. As block data is shared between peers, forks (non-authoritative chain fragments) are detected and dismantled by examining the chains’ cumulative difficulty values stored in each fork.