Skip to main content

What Is a “Time-Lock” Mechanism and How Can It Prevent Double-Spending?

A time-lock mechanism, often implemented via Bitcoin's CheckLockTimeVerify (CLTV) or CheckSequenceVerify (CSV) opcodes, prevents the spending of a coin until a specific block height or time has passed. While not a direct defense against a 51 percent attack, it can be used in more complex smart contracts or multi-party protocols to enforce spending rules.

For example, it can lock funds for a period, making a rapid double-spend attempt less profitable or impossible within the required timeframe for an attacker to execute the chain reorg.

What Is the Significance of the Block Height in a Blockchain?
How Can a Bermuda Option Be Used to Hedge against a Specific Crypto Price Event Window?
What Is the Significance of the “Block Height” in the Context of the Longest Chain Rule?
How Can a Time-Lock Smart Contract Be Used to Prevent the Immediate Withdrawal of LP Tokens?