How Bitcoin Transactions Work

How Bitcoin Transactions work

Bitcoin transactions are digitally signed for security and are transferred electronically through bitcoin wallets. The history of the transaction can be traced back to point of production with every individual on the bitcoin network aware of every transaction.

Speculators hold onto the bitcoin with the expectation of prices going up but ultimately, the intention is to spend it and one must understand how these transactions work.
Bitcoins don’t exist anywhere, even on a hard drive and it is not possible to point to a physical bitcoin being held at the bitcoin address and it cannot be compared to holding the dollars or cents in a bank account. There exists however, just a record of transactions between different addresses and balances that either increase or decrease. All the transactions are stored in a blockchain which is a massive public ledger. The balance of any bitcoin address can be deciphered by reconstructing the blockchain as the information isn’t held at the address.

What a transaction looks like

Assuming person X sends some bitcoin to person Y, the transaction would possess three important piece of information:
1. An input – the record showing the bitcoin address person X received the bitcoin from in the first instance.
2. The amount – the quantity of bitcoin X intends to transfer to Y.
3. An output – Person Y’s bitcoin address.

How it is sent

Sending bitcoins require a bitcoin address (generated randomly by a simple sequence of numbers and letters) and a private key (another sequence of numbers and letters kept secretly). The bitcoin address can be thought of as a glass deposit box with everyone able to see its content but only the private key can either put things in it or take them out.

Person X uses his/her private key to sign a message containing the input (the source transaction of the coins), the amount and the output (person Y’s address) from the bitcoin wallet to the wider bitcoin network, which the miners verify, put in a transaction block and subsequently solve the transaction.

Why must I sometimes wait for my transaction to clear?

Each block is by default set by the bitcoin protocol to take approximately 10 minutes to mine and because the transactions must be verified by miners, you might have to be patient until they conclude mining. While some merchants may require you to be patient enough for the transaction block to be confirmed, some might confirm the transaction hoping that you wouldn’t try to spend the same bitcoin on something else before the transaction block is confirmed. This usually happens for low value transaction with little fraud potential.

What if the input and output don’t match?

Perhaps person A, B and C sent person X one, two and three bitcoins at different times and different transactions respectively; they simply sit in person X’s wallet not as a combined six bitcoin but as different transaction records. So when X wants to send to Y, his/her wallet uses different transaction records that add up to the amount to be transferred. If X wants to send 1.5 bitcoins for instance, none of the transactions in the bitcoin address add up to that amount. And as you can only spend the whole output of a transaction rather than splitting them into smaller amounts, the wallet automatically creates two outputs by sending one of the incoming transactions (2 BTC) in this format - 1.5 BTC to Y’s address and 0.5 BTC to a new address to hold the change which will be returned.
Are there transaction fees?

There could be transaction fees sometimes but not every time.

Any portion of a transaction that doesn’t go to the recipient or isn’t returned as changed is considered as a fee which goes to the miner as an extra incentive for solving the transaction block. Some wallets allow you set the transaction fees manually. Most miners solve transaction blocks for free but as the incentive for bitcoin decrease over time, this will become less likely. One complicating factor about the transaction fee historically is that the calculations are very complex. It has been developed organically as a result of several updates to the blockchain protocol. Any update to the core software handling bitcoin transactions automatically changes the way it takes care of transaction fees, instead it estimates the lowest acceptable fee.

Can one get a receipt?

It is expected that with the version 0.9, changes would be made to enable a more user-friendly and mature payment meaning even though the bitcoin wasn’t typically designed for having receipts. Some processors like BitPay provides users with advanced features like a webpage confirmation of order or the generation of receipts which one wouldn’t normally get from native bitcoin transactions.

Can one send a part of a bitcoin?

Yes. Bitcoins are divisible and it is possible to send 5430 satoshis – one hundred millionth of a bitcoin, on the bitcoin network.