Library · Crypto, word by word · Inside Bitcoin
What is a timelock?
A timelock is a rule that stops bitcoin from being spent, or a transaction from being confirmed, before a set block height or time. It can be absolute (not before a given date or block) or relative (not until a number of blocks or a span of time after the coin was received).
What it means for you
Timelocks make escrow refunds, frozen savings and Lightning channels possible, but they cut both ways: coins locked until a future date cannot be moved before it by anyone, including you, however urgently you need them.
How it works
Every transaction has a 4-byte nLockTime field giving the earliest block height or timestamp at which it can be added to the chain. BIP-65 added OP_CHECKLOCKTIMEVERIFY, letting an output's script require such a lock so the coins stay unspendable until then. BIP-68 made input sequence numbers express a relative lock: a minimum number of blocks, or of 512-second units, since the output being spent confirmed. BIP-112's OP_CHECKSEQUENCEVERIFY enforces that inside scripts, which payment channels and hashed timelock contracts rely on.
Sources: Bitcoin Developer Guide: Transactions (locktime and sequence), BIP-65: OP_CHECKLOCKTIMEVERIFY, BIP-68: Relative lock-time using consensus-enforced sequence numbers · checked 4 October 2026
Related words
Educational content, not financial advice. Written by hand and checked against the source named above. Something wrong? Tell us and we reply within two business days.