How Bitcoin Transactions Work

Cryptocurrencies
••• S3 Studio / Getty Images

Bitcoin transactions are more complex behind the scene than you might think. You rarely send an amount of bitcoin in one go; instead, your bitcoin wallet and the bitcoin network have to go through a set of steps to ensure that the right amount of electronic money gets to the recipient.

Bitcoin Explained

To begin with, it’s important to understand what a bitcoin is. It isn’t a single record of a coin, as you might find on an accounting ledger or on your bank statement.

Instead, it is basically a file (referred to as money hereafter) with a value that registers as a transaction when you initiate a payment or receipt. There are three elements involved in a bitcoin transaction: a transaction input, a transaction output, and an amount. The transaction input is the bitcoin address from which the money was sent, and the transaction output is the bitcoin address to which the money was sent. If the bitcoin is in your wallet, that will be the bitcoin address under your control.

Transactions in Bitcoins

The bitcoins that you send to someone were sent to you from someone else. When they sent them to you, the address that they sent it from was registered on the bitcoin blockchain (the encrypted and unaccessible register) as the transaction input, and your address—the address they sent it to—was registered on the bitcoin network as the transaction output.

When you send that bitcoin on to someone else, your wallet creates a transaction output, which is the address of the person you’re sending the coin to. That transaction will then be registered on the bitcoin network with your bitcoin address as the transaction input.

When that person sends those bitcoins to someone else, their address will, in turn, become the transaction input, and that other person’s bitcoin address will be the transaction output.

Using this system, people can trace bitcoin transactions all the way back to when the bitcoin was first created, understanding who sent it to who at any point in time. This creates a completely transparent system in which all transactions can be checked at any time.

Change Addresses

One problem with bitcoin is that the amount attached to these transactions with their inputs and outputs isn't divisible. So, if Alice has a bitcoin address with one bitcoin in it, and she only wants to send Bob half a bitcoin, then she would have to send Bob that entire bitcoin.

The bitcoin network would then automatically create 0.5 bitcoins in change from the bitcoin that Alice sent, and send it to the third address in Alice’s control. That third address will also be a transaction output, meaning that the address will have multiple transaction outputs.

Over time, this means that bitcoin wallets end up with lots of addresses containing varying amounts of bitcoin and change from bitcoin transactions. When you send bitcoins to someone, your wallet will try its best to piece together the necessary funds using the addresses containing the different amounts.

That leads to transactions that can have several different inputs–different addresses with different amounts used to make up the funds. It’s unlikely that these inputs will deliver exactly the right amount, so you normally end up with change.

Sending Small Amounts of Bitcoin

What if you want to send just a tiny amount of bitcoin? Luckily, you can slice bitcoins very thinly indeed. The smallest divisible part of a bitcoin is called a satoshi, and it amounts to just 100 millionth of a bitcoin. You can’t send just one satoshi over the network, though—that’s too small and would clog up the network with tiny transactions. The smallest transaction value is 5340 satoshis, which is still pretty tiny.

To complicate matters still further, many bitcoin transactions involve a transaction fee, which means that you have to add a certain amount of bitcoin on top of the amount you’re trying to send. If you don’t, then it’s likely that the bitcoin transaction will fail altogether. This is something to consider, especially when sending tiny fractions of a bitcoin.

So, when you open your bitcoin wallet after a few transactions and begin to see multiple addresses containing lots of tiny amounts, you now know what’s happening. It isn’t particularly easy to read and makes bookkeeping a bit annoying, but it does make it possible to trace bitcoin transactions through the entire network—which is important, given bitcoin’s mantra of transparency and immutability.