Skip to content
PayableWithCrypto

Glossary

What Is a Timelock? Coins That Can't Move Until a Set Time

Editorial teamFact-checked against official sources Last updated 3 min read

Definition

Timelock: A timelock is a rule that prevents a transaction or coins from being spent until a certain block height, date or relative delay has passed, enforced by the blockchain itself.

On this page
  1. 1The four Bitcoin timelocks
  2. 2Where timelocks are used
  3. 3Timelocks on other chains
  4. 4Benefits and risks
  5. 5Timelocks and spending wallets
  6. 6Checklist before using a timelock
  7. 7Common questions

A timelock is a rule, enforced by the blockchain, that stops coins or a transaction from being spent until a particular block height, date or delay has passed. Nobody can override it early, not even the owner. Timelocks are what make Lightning channels safe, let inheritance and backup plans kick in automatically, and give smart-contract wallets a cooling-off period before risky changes.

The four Bitcoin timelocks

Mechanism Applies to Type Introduced
nLockTime A whole transaction Absolute (block or time) Original Bitcoin
nSequence (BIP-68) An individual input Relative (blocks or time since the coin confirmed) 2016
OP_CHECKLOCKTIMEVERIFY / CLTV (BIP-65) The coin’s locking script Absolute 2015
OP_CHECKSEQUENCEVERIFY / CSV (BIP-112) The coin’s locking script Relative 2016

Absolute means “not before block 1,000,000” or “not before 1 January 2030”. Relative means “not until 144 blocks (about a day) after this coin was confirmed”.

Transaction-level locks (nLockTime, nSequence) restrict a specific transaction. Script-level locks (CLTV, CSV) restrict the coins themselves, which is what makes them trustworthy for contracts.

Where timelocks are used

  1. Lightning channels. If one party broadcasts an old channel state, a CSV delay gives the other party time to submit a penalty transaction. Payments routed across hops also use time-limited contracts.
  2. Inheritance and backup paths. A wallet can be spendable now by a 2-of-3 multisig, or by a single backup key after, say, one year of inactivity. See crypto inheritance planning.
  3. Vaults. Funds can only leave after a delay, during which an emergency key can redirect them if a theft is spotted.
  4. Smart-contract wallets and DeFi. Admin upgrades or social recovery changes often wait 24-72 hours (the exact delay varies by product) so users can react.
  5. Token vesting and liquidity locks. Team tokens or pool liquidity locked until a date; a common thing to check before buying a new token (see rug pull).

Timelocks on other chains

Ethereum and other smart-contract platforms don’t use Bitcoin’s opcodes, but the idea is the same. A contract can check the current block timestamp or number and refuse actions before a set time. Governance systems often put a “timelock controller” between a vote and its execution, so users can exit before a contested change takes effect. When a DeFi app or token project says its contracts are behind a timelock, check the delay length and who can bypass it, because an admin key with emergency powers can undermine the protection.

Benefits and risks

Benefits

  • Rules can’t be bent by any single party.
  • Gives time to detect and respond to theft.
  • Allows automatic fallbacks without a trusted third party.

Risks

  • Irreversible mistakes. A wrong date or a lost key in the timelocked path can lock funds for years or permanently.
  • Fees in the future. You won’t know what network fees will be when the lock expires.
  • Software support. Restoring a timelocked wallet needs software that understands the script (descriptor support helps).
  • Delays cut both ways. A vault delay protects you, but also slows urgent spending.

Timelocks and spending wallets

For daily spending, such as topping up a card or paying merchants, timelocks rarely touch you directly. They matter for the savings wallet behind your spending wallet. A common design keeps a small hot wallet for payments and a timelocked multisig vault for savings; see hot vs cold wallets for spending.

Checklist before using a timelock

  • Use established wallet software, not hand-written scripts
  • Back up the wallet descriptor or configuration, not just the seeds
  • Choose delays you could live with in an emergency
  • Test the full flow with a small amount, including the timelocked path if possible
  • Write instructions so heirs know when and how the backup path becomes usable
  • Keep a fee budget in mind for when the lock expires

Frequently asked questions

Can a timelock be cancelled early?
Not if it's enforced by script. A coin locked with OP_CHECKLOCKTIMEVERIFY can't be spent before the set time by anyone, including you. Some wallet designs combine a timelock with another spending path, such as an immediate multisig path, so funds remain usable while the timelocked path serves as a backup.
Are timelocks used in everyday crypto?
Yes, mostly behind the scenes. Lightning channels depend on relative timelocks to settle disputes, and many smart-contract wallets add delays before guardian or admin changes take effect.
Can I lock my own bitcoin to stop myself selling?
Technically yes, but it's risky: a mistake in the script or a lost key can make funds inaccessible permanently, and you can't unlock early in an emergency. Only use audited wallet software that supports timelocks rather than building scripts by hand.
What is the difference between nLockTime and CLTV?
nLockTime is a field on a transaction that stops that particular transaction from being mined before a time. The person holding the keys could still sign a different transaction. CLTV is a script rule on the coins themselves, so no valid spend exists before the time.

Sources

Facts were checked against these pages on the date shown above. Terms change; confirm on the official page before acting. General information, not financial, tax or legal advice. See our methodology.

Related terms

Compare cards Find a store