BS3:2-How to use coin control 🪙

People don’t talk about coin control very much. In fact, you might never have heard the term. Coin control is paying attention to the individual UTXOs in your wallet and following best practices in how you spend them.

If that made no sense to you, fear not! We’ll take it slow, and explain everything.

What is a UTXO?

As we touched on in BS1:2-How to use a bitcoin wallet 👛, it’s easiest to think of UTXOs like paper money you keep in your pocket. When you receive bitcoin into your wallet, it is like putting a new paper bill in your pocket. The bill has a denomination, and if you want to use it in a transaction that isn’t exactly that denomination, you have to make change.

Let’s pretend you created a new wallet and went to a bitcoin ATM. You put in some cash and you bought 0.002BTC. What actually happened is that your wallet generated a receiving address that was tied to your private keys. This address then received a 0.002BTC output from the transaction. Until you spend that 0.002BTC, it is called an unspent transaction output (UTXO).

Like paper money in your pocket, each UTXO has a certain denomination. Unlike paper money, a UTXO can be worth any amount (a UTXO can be worth 1000BTC or 0.001 BTC, or 98.097258BTC). When you send bitcoin to someone, your wallet uses the UTXOs in your wallet to construct a transaction.

Now let’s imagine you’ve visited the bitcoin ATM again and you have a total of 0.005BTC in your wallet, and it’s made up of two UTXOs, the first one that is worth 0.002BTC and a second that is worth 0.003BTC. If you want to buy something that costs 0.004BTC, your wallet will construct a transaction that includes both your UTXOs and that sends 0.004BTC to the merchant, some small amount to the miners for a fee, and the rest back to your wallet.

UTXOs, vbytes, and miner fees

Bitcoin miners receive fees for constructing new blocks on the blockchain. People who want their transaction included in the blockchain pay these fees to the miners. The fees are charged as a rate, sats/vbyte.

Sats are satoshis. There are 100,000,000 satoshis in a bitcoin. So in our pretend example from above, you had a 200,000 satoshi (0.002BTC) UTXO and a 300,000 satoshi (0.003BTC) UTXO.

To a nontechnical person like myself, vbytes are pretty much just bytes, or a measure of an amount of information it takes to record all the details about a transaction.

Now, once again like paper money in your pocket, the actual value of the UTXOs is not necessarily connected to the size of the UTXO in vbytes. You might have a five dollar bill in your pocket or a hundred dollar bill—they’ll take up the same space in your pocket. A 10BTC UTXO might be the same size as a .001BTC UTXO.

But having more inputs in a transaction will lead to the transaction having a larger size in vbytes (just like a stack of twenty one dollar bills is thicker than a single hundred dollar bill). This means you’ll end up paying more in miner fees. In our example above, you will pay more in miner fees than if you only had one 0.005BTC UTXO in your wallet.

Because of this, many people try to combine their UTXOs so that they have smaller size (in terms of vbytes) transactions and pay less in fees.

The common input ownership heuristic

A thing with a name like the common input ownership heuristic sounds like it might be kinda horrible, and it is. Remember that the blockchain is a public ledger. Everyone can see every transaction. Well, people figured out that when a transaction combines some UTXOs to send an amount somewhere, it’s pretty likely that the same person owns all the combined UTXOs.

This means that if personal identifying information is attached to any one of those UTXOs, people who know that information can attach it to all the UTXOs.

Imagine you are a freelance designer and you do a job for someone who pays you in bitcoin. You have heard about miner fees and so you’ve always tried to keep your bitcoin consolidated in a single UTXO. If you merge the payment UTXO with your stash UTXO, whoever paid you will know how much bitcoin you have.

Here’s another example: maybe you bought most of your bitcoin on Bisq and your identifying information is not attached to those UTXOs, but you also bought some from Kraken, where you had to provide all your identifying information. If you use a UTXO you received from Kraken with UTXOs you received from Bisq, Kraken (and anyone who gets their hands on Kraken’s info about you) will know that you also own those other UTXOs. All the effort you put into keeping your identity away from that bitcoin is wasted.

This is why you need coin control.

Coin control basics

Not every wallet lets you use coin control. Some wallets will simply show you a total, and use their own algorithm to determine which UTXOs to include in any given spend. You should try to use a wallet that lets you use coin control.

Wallets that support coin control are:

  • BitcoinCore Wallet (Linux, OSX, Windows)
  • Blue Wallet (Android, IOS)
  • Muun Wallet (Android, IOS)
  • Samourai Wallet (Android only)
  • Sparrow Wallet (Linux, OSX, Windows)

At it’s most basic, coin control is the practice of labeling every UTXO you receive. These labels are private and no one else can see them. The point of the labels is to help you remember where you got the UTXO from so that you don’t combine them in a way that exposes more of your personal information.

Wallets that let you use coin control, allow you to select which UTXOs you want to use in any given transaction. This is enormously helpful in maintaining your privacy on the blockchain.

For instance, if you have some UTXOs from Bisq, and you have some from Kraken, you should try to spend the Kraken ones together (when you need to combine them to make a spend), rather than spending the Kraken ones with the Bisq ones.

Now the question arises: what do you do if spending your Bisq UTXOs and your Kraken UTXOs together is the only way you have enough to make the spend?

The answer is coin mixing, and is covered in BS3:3-How to use CoinJoin and coin mixing 🌀