Bitcoin Timestamp — Definition and the Median-of-Eleven Rule
A Bitcoin block timestamp is the miner-supplied time embedded in a block header. Network rules constrain it to a tight window, making forgery impractical.
- Each Bitcoin block header contains a 4-byte Unix timestamp set by the miner who produced the block.
- Network consensus rejects timestamps earlier than the median of the previous 11 blocks or more than ~2 hours in the future.
- Once a block is buried under several confirmations, its timestamp is effectively fixed and serves as a trusted external clock.
Definition
A Bitcoin timestamp is the 32-bit Unix time value embedded in the header of every Bitcoin block. It records, with one-second resolution, when the block was produced. Because every block also commits to the cumulative work of every block before it, the timestamp of a deeply confirmed block cannot be revised without redoing all the work that came after it.
The median-of-eleven rule
Bitcoin's consensus rules constrain block timestamps in two directions. Going backwards, a block's timestamp must be strictly greater than the median of the timestamps of the previous 11 blocks (the Median Past Time, MPT). Going forwards, a block's timestamp must not exceed the network-adjusted current time by more than 7,200 seconds (roughly two hours). Together these rules confine each new timestamp to a narrow window. A miner cannot pre-date a block by more than the MPT permits, and cannot post-date it by more than ~2 hours.
Why this is hard to forge
To convincingly back-date data, an attacker would need to produce a chain of blocks whose timestamps satisfy the MPT rule, accumulate enough cumulative proof-of-work to overtake the honest chain, and have the network accept the rewrite. With Bitcoin's hash rate this is economically infeasible. The result is that, after roughly six confirmations, a block timestamp is treated as a globally agreed-upon point in time. NakedPnL relies on this property as the external clock for its daily Merkle root.
How NakedPnL uses it
Once per day, NakedPnL builds a Merkle tree from every trader's chain head and submits the root through OpenTimestamps. OTS calendar servers commit the root to a Bitcoin transaction. After the transaction confirms, the .ots proof is upgraded with the block header path, and the relevant block timestamp becomes the attested time of existence. NakedPnL stamps `btcBlockHeight` on the upgraded proof and exposes it via `GET /api/verify/[date]`. A verifier never has to trust NakedPnL or the OTS calendar; they only have to trust that the Bitcoin block timestamp is honest, which Bitcoin's consensus rules enforce for them.
Worked example
# Inspect a Bitcoin block header (using a Bitcoin Core node)
bitcoin-cli getblockheader 829431
# {
# "height": 829431,
# "time": 1714867694, # Unix timestamp set by the miner
# "mediantime": 1714865712, # Median Past Time of previous 11 blocks
# "nonce": ...,
# "bits": "...",
# "previousblockhash": "...",
# "merkleroot": "..."
# }
# A NakedPnL OTS proof upgraded into block 829,431 attests
# existence as of time = 1714867694, constrained by:
# mediantime <= time <= network_time + 7200Limits of Bitcoin timestamps as clocks
Bitcoin timestamps are accurate to within a few hours rather than to the second. They prove that data existed no later than the timestamp of the first confirming block, but they do not prove it existed at any earlier time. NakedPnL's daily anchoring cadence, combined with the per-trader hash chain, gives same-day attestation precision: a chain head must have existed before the daily Merkle root that committed it, and the Merkle root must have existed before the Bitcoin block that committed it.
Related terms
- OpenTimestamps — the protocol that produces a Bitcoin-anchored proof from any digest.
- Merkle tree — the daily structure NakedPnL anchors to a Bitcoin block.
- Hash chain — the per-trader history committed via the Merkle root.
- Median Past Time (MPT) — the consensus rule that bounds block timestamps from below.