Crypto glossary

Timelock

Definition

A timelock is a condition that prevents funds or actions from being executed until a specific block height, date or delay has passed.

Bitcoin supports several kinds. A transaction-level lock time makes a transaction invalid until a given block or time. The CheckLockTimeVerify opcode (BIP-65) locks an output until an absolute date or height, and CheckSequenceVerify (BIP-112) locks it for a relative period after the output was confirmed. Ethereum contracts implement timelocks in code by checking the block timestamp.

Timelocks make many designs possible: Lightning channels give each party a delay to dispute a cheating close, HTLCs refund senders after a deadline, inheritance and vault setups let a backup key spend only after months of inactivity, and vesting contracts release tokens gradually. In DeFi governance, timelock contracts delay approved changes for days, giving users time to react or exit.

A timelock cannot be undone once set: locked funds stay locked even if the owner urgently needs them. Mistakes in the chosen height or timestamp format can lock funds far longer than intended. Governance timelocks only protect users if the delay is long enough to notice and react, and emergency powers that bypass them weaken the guarantee.

Example

A user creates a Bitcoin inheritance wallet where their own key can spend at any time, but a relative's key can only spend after 52,560 blocks, about one year, without activity.

Related terms