← Back to Glossary

Timelock

A timelock is a condition that prevents bitcoin from being spent until a specified time or block height. The protocol supports several forms: the transaction-level nLockTime field, the opcode OP_CHECKLOCKTIMEVERIFY for absolute locks (BIP65, activated 2015), and OP_CHECKSEQUENCEVERIFY for relative locks measured from a coin's confirmation (BIP112, activated 2016).

How it works

Absolute timelocks say this cannot be spent before block 900,000 or before a given date, while relative timelocks say this output must age a set number of blocks after confirming. The rules are enforced by every node, so no court or custodian is involved. Timelocks underpin much of bitcoin's advanced functionality: Lightning channels rely on them to give a wronged party time to contest an outdated channel state, hashed time locked contracts use them as the refund path, inheritance and vault designs use them to create recovery windows, and the protocol itself forbids miners from spending newly created coins for 100 blocks. Wallets such as those used for estate planning can pre-sign transactions that only become valid years in the future.

In the gold vs bitcoin debate

A timelock is a contract that enforces itself, something physical assets cannot offer. Locking gold until a child turns 25 requires a trustee, a vault, and the legal system, with fees and discretion at every step; locking bitcoin for the same purpose requires a few lines of script that the network executes indifferently. Programmable time is one of the clearest capabilities separating digital sound money from metal.

Ready to convert your gold to Bitcoin?

Get Your Free Kit →