Previously, we discussed how UTXO solves the first type of double-spending problem. However, there is another scenario in double-spending: the post-accounting double-spending problem. That is, even if a sum of money is only spent once, what if someone copies it again through hacking a bank or counterfeiting and spends it once more? To solve this problem, blockchain introduces the concept of a timestamp.
By official definition, a timestamp is a type of data that can prove other data existed completely and verifiably before a specific time. It is usually a character sequence that uniquely identifies a moment in time.
There are two key points in this definition: First, a timestamp is also a form of data; second, a timestamp can prove that certain data existed completely at a specific point in time. In simple terms, a timestamp acts like a "production date" for data and serves a verification purpose.
In blockchain, timestamps are closely related to cryptography—they can even be considered an application of cryptography. Here’s how they work:
Step 1: A node first performs a hash encryption on the information in the block, generating a message digest (i.e., a hash value).
Step 2: After generating the hash, the node sends a timestamp request to a relevant timestamp server. The timestamp server then extracts the hash value and the time information of the data.
Step 3: The timestamp server signs the extracted hash value and time information—effectively encrypting it again—imprinting it with a time mark to generate the timestamp.
The final step is to bind the generated timestamp data with the transaction information and return it to the system.
The entire process in blockchain works like this: First, the data is encrypted, then sent elsewhere for notarization (with the secondary encryption serving as proof). After that, the notarized data is placed into the next block, packaged, and the process repeats continuously. Ultimately, this forms a decentralized, distributed system that has undergone dual encryption via hashing algorithms and timestamps.
The advantage of this is that it enhances the immutability of the blockchain. Every piece of data undergoes secondary encryption via timestamps, complete with relevant time records. Additionally, when blocks are linked, they are sorted chronologically on top of the hashing algorithm. If someone wants to tamper with the data, they would not only need to break the hashing algorithm but also alter the timestamps.
The reason timestamps can solve the second type of double-spending problem is that they serve an anti-counterfeiting function. On one hand, timestamps improve blockchain security, making it difficult for hackers to tamper with data. On the other hand, the system automatically imprints each block’s transaction information with a time mark as an identifier—recording when and how much money was spent. Any transaction without this identifier is immediately recognizable as "fake money."
In summary, timestamps play a crucial role in blockchain. They ensure that each block is nested chronologically, further strengthening the security of the blockchain. It is precisely because of their existence that the problem of "fake money" in blockchain is no longer an issue.