Three cool bitcoin functions you may not know about

With Bitcoin gaining mainstream acceptance, many now know about its basic features. Most know that Bitcoin is a government-less currency capable of instantly sending value anywhere in the world. Most know that anyone with an internet connection can create a Bitcoin wallet out of thin air without the need for a central authority to accept them. Most know you can hold the same Bitcoin on multiple devices. While these features are widely known, many don’t know about some of Bitcoin’s more advanced functions that increase its usefulness.

One interesting feature of Bitcoin is the “m-of-n” Multisig system. The definition of m-of-n Multisig is:

“A pubkey script that provides n number of pubkeys and requires the corresponding signature script provide m minimum number signatures corresponding to the provided pubkeys.”

In layman’s terms, this means that you can specify “n” number of trusted entities and require “m”  of them to provide signatures in order to send Bitcoin from a Multisig address. A Multisig Bitcoin address begins with a “3” instead of a “1.” One use case for Multisig is as follows: Say you want to set up a trust fund for your child with 100 bitcoins in it, but you don’t want them to spend it frivolously, so you decide set up a Multisig address to hold the 100 coins. You decide to make “n” equal to 5 public keys, with each of the following entities possessing exactly 1 key: You, your spouse, your attorney, a close friend, and your child. You decide to make “m” equal to 2, meaning your child will need their key plus 1 of the other 4 keys in order to create a valid transaction. This system would make it so that your child can’t spend anything without the consent of either yourself, your spouse, your attorney, or your close friend. Your child plus any one of those listed can make a valid sending transaction. One drawback to the above example is that any 2 of those trusted key holders can conspire with each other to move the coins. Should your spouse and your close friend strike up a romance, they could then drain the trust fund. Setting “m” equal to 3 would now require the attorney to be in on it too. Multisig systems are useful for bitcoin companies that wish to require multiple director signatures in order to move company funds. Multisig works as both an anti-fraud and anti-hacker mechanism in this case, as a hacker would need to compromise more than one address.

Another interesting and little-known feature of Bitcoin is nLockTime. When broadcasting a Bitcoin transaction there exists the option to specify nLockTime, or the earliest block that it can be added to the blockchain. This is useful in the above trust fund example. Suppose you want to leave 100 bitcoins to your child, but don’t want them to access them until they are of a certain age. After estimating what the block height will be when your child is of that magical age where they will value money properly, you can broadcast a transaction that won’t be spendable by the receiver until the block height is greater than the nLockTime height you specified. Imagine pairing this with a multisig address, and you have a cryptographically brilliant trust fund system for your child. There are some limitations to nLockTime, as the transaction does not stay in the mempool (the current pool of unconfirmed transactions); thus, you will need to broadcast the transaction after the block height meets your nLockTime requirement. A good cryptographer-parent would give their child a raw transaction to broadcast when the time was right.

Ever heard of OP_RETURN? Don’t worry, most Bitcoin users haven’t either, and it’s very rarely used. The Bitcoin protocol has the ability to embed 40 characters into a transaction via the OP_RETURN function. The use of OP_RETURN to add characters that will forever live in the blockchain comes at a price: the transaction is unspendable, meaning the bitcoins are “burned,” or lost forever when this function is used. The OP_RETURN function can be used to digitally carve your initials into the tree that is the blockchain. It can also be used to underpin an entire altcoin. Counterparty is a separate cryptocurrency that uses the OP_RETURN function of the Bitcoin blockchain to store digital assets. The Counterparty currency utilizes the OP_RETURN function to make irrevocable notations in the Bitcoin blockchain that determine who owns which Counterparty assets. Given the small cost to embed some text in the blockchain, some interesting things now live on forever inside of Bitcoin. A transaction with “charley loves heidi” can be found here, and no blockchain is complete without a Rickroll.

New to blockchain? Check out CoinGeek’s Blockchain for Beginners section, the ultimate resource guide to learn more about blockchain technology.