Glossary
What Is a Timelock? Coins That Can't Move Until a Set Time
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
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
- 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.
- 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.
- Vaults. Funds can only leave after a delay, during which an emergency key can redirect them if a theft is spotted.
- 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.
- 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?
Are timelocks used in everyday crypto?
Can I lock my own bitcoin to stop myself selling?
What is the difference between nLockTime and CLTV?
Sources
- BIP-65: OP_CHECKLOCKTIMEVERIFY
- BIP-68: Relative lock-time using sequence numbers
- BIP-112: CHECKSEQUENCEVERIFY
- Bitcoin Wiki: Timelock
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.