SwanBitcoin445X250

CheckTemplateVerify (CTV) is a soft fork proposal for Bitcoin specified in the Bitcoin Improvement Proposal (BIP) 119[1]. It aims to enable new use cases for the network by adding a basic type of “covenant,” or smart contract, which is more than what can be achieved at the moment.

Why Covenants?

Bitcoin, as is, doesn’t possess a lot of flexibility in its programmability at the base level of transactions — and certainly not as much flexibility as it has at the level of the public and private keys used to sign transactions.

A programmer can currently control the inputs of a transaction with Bitcoin Script[2], restricting what can be done before a transaction is spent, but they can’t control what types of transaction are permitted to be signed for. In other words, in most Bitcoin smart contracts[3] today, a user can control how a coin can be unlocked by defining restrictions necessary to be satisfied. But they can’t control very well what can be done with that coin once it is unlocked.

For instance, one can define a certain amount of time before a transaction can be spent with a timelock[4], effectively locking that transaction until the specified block height is reached. In this case, restrictions are being imposed on when funds can be spent, preventing the correct key from unlocking those funds and spending them. However, after that time expires and the block height is reached on the Bitcoin blockchain, the key can unlock those funds and spend them freely. The when is restricted, but not the what or how.

Therefore, covenants have the power to unlock a new set of possibilities to the way Bitcoin can be programmed by enabling

Read more from our friends at Bitcoin Magazine