Qaynaq LABS · TOOLS

CRYPTO GLOSSARY

Time-Locked Transaction

A transaction that cannot be executed until a specified future time or block height is reached, adding a delay to fund transfers or smart contract executions.

Technical definition

A time-locked transaction is a cryptographically signed transaction that includes a locktime parameter, which specifies the earliest block height or Unix timestamp at which the transaction can be included in a block. In Bitcoin, this is implemented via the `nLockTime` field in transaction inputs, while Ethereum uses smart contract logic (e.g., `block.timestamp` checks) to enforce delays. Time-locks can be absolute (fixed future time) or relative (delayed from the current time), and they may also include additional conditions like sequence numbers for finer control over transaction validity.

An analogy

Imagine writing a check that cannot be cashed until a specific date in the future. Even if the recipient tries to deposit it early, the bank will reject it until the date arrives, ensuring the funds are only accessible at the agreed-upon time.

Why it matters

Time-locked transactions enhance security by preventing premature execution of transactions, enabling scheduled payments, and supporting advanced smart contract use cases like vesting schedules or delayed withdrawals. They also mitigate risks like double-spending during network reorganizations.

Where it came from

Time-locks were introduced in Bitcoin’s original protocol (2009) via the `nLockTime` field, inspired by traditional financial instruments like post-dated checks. Ethereum later expanded their use through smart contract functionality, allowing more flexible implementations.

Example in practice

A company uses a time-locked transaction to pay an employee’s salary in Bitcoin. The transaction is set to unlock and become spendable only after 30 days, ensuring the employee receives a consistent, delayed payment rather than an immediate lump sum.

Common misconceptions

  • Time-locked transactions are irreversible once set → Correction: They can be replaced or canceled before the locktime expires if the transaction hasn’t been mined, depending on the protocol rules.
  • Time-locks guarantee funds will be available at the exact time → Correction: The transaction can only be included in a block *after* the locktime, but network congestion or low fees may delay its confirmation.

Risks & limitations

  • Network delays: If the locktime is set too close to the current time, the transaction may not confirm promptly due to network congestion or low miner fees.
  • Protocol changes: Upgrades to the blockchain (e.g., hard forks) could alter how time-locks are interpreted, potentially causing unexpected behavior.
  • Smart contract vulnerabilities: In Ethereum, poorly coded time-lock logic in smart contracts may introduce reentrancy risks or other exploits.
  • Irreversible mistakes: Setting an incorrect locktime (e.g., far in the future) may make funds inaccessible for an extended period, especially if private keys are lost.

Related terms

About "Time-Locked Transaction" in crypto

Cryptocurrency vocabulary moves faster than any other technical field. New terms appear weekly, old terms quietly change meaning, and most "definitions" online were written by someone trying to sell you something. Qaynaq Labs' crypto glossary aims for the opposite: neutral, accurate, skeptical explainers that include the downside.

This entry covers the technical mechanics, a real-world analogy, where the concept came from, and what could go wrong. Pair it with the related terms to build a working mental model of how the pieces fit together.

Frequently asked

Can a time-locked transaction be canceled or replaced before the locktime expires?

In Bitcoin, a time-locked transaction can be replaced or canceled using a higher-fee transaction (Replace-by-Fee) *before* it is mined, provided the original transaction hasn’t been confirmed. In Ethereum, similar functionality depends on the smart contract’s design and may require additional mechanisms like `selfdestruct` or governance actions.

Do time-locks work across different blockchains?

No, time-locks are blockchain-specific. A Bitcoin time-locked transaction cannot enforce delays on Ethereum, and vice versa. Cross-chain time-locks (e.g., for atomic swaps) require additional protocols or smart contract logic to coordinate delays across chains.

Are time-locks secure against miners manipulating the clock?

In Bitcoin, miners cannot manipulate the locktime because it is enforced by the consensus rules based on the block height or timestamp recorded in the blockchain. In Ethereum, miners could theoretically manipulate `block.timestamp` within a small window, but this is mitigated by protocol constraints (e.g., timestamps must be within a certain range of the current time).