Timestamps in Blockchain: Verifying Order of Transactions

Timestamp is a form of identification of the moment when a certain operation took place.

What is timestamp?

Timestamps are intended to eradicate the threat of double counting. Timestamps are a must for miners who receive a reward for mining each block. This is due to the fact that in the absence of timestamps it would be difficult for new nodes to prove difficulty or lack of difficulty and how long it took to mine a block.

Blockchain stamps rather than real time are used to ensure an accurate calculation of complexity. Two timestamps are usually used when generating a BTC block. The first is the block header, which is assigned by the miner. The second is the actual moment when the block is created.

Although in theory both timestamps should match, there remains a small risk that miners will enter the wrong time or lie about the time. Bitcoin has two ways to prevent this risk. The first is the Median Time Stamp. According to the MPT rule, the time stamp must be higher than the median value of the last 11 blocks. At the same time, the maximum allowed difference between the time specified by the node and the local time system cannot exceed 90 minutes. The purpose of the first rule is to ensure that the blockchain moves forward in time, while the second rule aims to prevent the blockchain from moving forward too much. The goal of both rules is to protect the integrity of cryptocurrency timestamps.

Related terms