How bitcoin transactions work | How Do Bitcoin and Crypto Work? | Get Started with Bitcoin.com (2024)

Bitcoins exist as records of Bitcoin transactions

We define abitcoin as a chain of digital signatures. Each owner transfers bitcointo the next by digitally signing a hash of the previous transaction and the public key of the next owner and adding these to the end of the coin. A payee can verify the signatures to verify the chain of ownership.

— Satoshi Nakamoto, Bitcoin Whitepaper

Bitcoins do not "exist" per se. There are no physical bitcoins, nor do Bitcoin owners have an "account." Instead, there's a 'blockchain,' which you can think of as a ledger, or a record, of all the transactions that have ever taken place between Bitcoin addresses. These transaction records are updated by the Bitcoin network participants (nodes) and shared across each of its nodes as balances increase and decrease. You can use a 'block explorer'if you want to see the history, as well as current balance, of any given Bitcoin address.

Public and private keys

To send Bitcoin, you must have access to the public and private keys associated with the amount of bitcoin you want to send. When we talk of someone "owning" bitcoins, what it actually means is that person has access to a 'key pair' comprised of:

  • a public key (an address) to which some amount bitcoin was previously sent
  • the corresponding unique private key (a password) which authorizes the bitcoin previously sent to the above public key (address) to be sent elsewhere.

Public keys, also called bitcoin addresses, arerandomly generated sequences of letters and numbers that function similarly to an email address or a social-media site username. As the name implies, they are public, so you are safe sharing them with others. In fact, you must give your Bitcoin addressto others when you want them to send you bitcoin. The private key is another sequence of letters and numbers, also generated randomly. However, private keys, like passwords to email or other accounts, are to be kept secret. Never share your private key with anyonethat you do not 100% trust to not steal from you.

Read more: Make sure your digital assets are safe with these simple tips.

You can think of your Bitcoin address as a transparent safe. Others can see what's inside, but only those with the private key can unlock the safe to access the funds within.

Transaction inputs and outputs

Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer. To allow value to be split and combined, transactions contain multiple inputs and outputs. Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most twooutputs: one for the payment, and one returning the change, if any, back to the sender

—Satoshi Nakamoto, Bitcoin white paper

Let's break down that section of the Bitcoin white paper by looking at a sample transaction in practice:

Mark wants to send 1 BTC to Jessica. To do this, he uses his private key to 'sign' a message with the transaction-specific details. This message, which must be broadcast to the network, will contain the following:

  • Inputs. This contains information about the bitcoin previously sent to Mark's address. For example, imagine Mark previously received 0.6 BTC from Alice and 0.6 BTC from Bob. Now, in order to send 1 BTC to Jessica, there might be two inputs: one input of 0.6 BTC previously from Alice and one input of 0.6 BTC previously from Bob.
  • Amount.In this case, the amount Mark wants to send is 1 BTC.
  • Outputs. There are two outputs. The first is 1 BTC to Jessica’s address. The second is 0.2 BTC returned as 'change' to Mark. This second output is calculated as the total of the inputs [0.6 + 0.6 = 1.2], minus the amount Mark wants to send [1 BTC].

This might seem confusing, but it's done this way to improve efficiency - andthe good news is that knowing the behind-the-scenes details of Bitcoin transactions is not required to send or receive bitcoin. Your Bitcoin Wallet takes care of that!

Broadcasting and confirmations

In the above example, Mark (via his wallet software) will broadcast his proposed transaction to the Bitcoin network. A special group of participants in the network known as 'miners' verify that Mark's keys are able to access the inputs (i.e. the address(s) from where he previously received the bitcoin he claims to control. Miners also gather together a list of other transactions that were broadcast to the network around the same time as Mark's and form them into a block. Any miner who has completed the 'Proof of Work' is permitted to propose a new block that will be added or 'attached' to the chain and by referencing the last block. That new block is then broadcast to the network. If other network participants (nodes) agree it's a valid block (ie. the transactions it contains follows all the rules of the protocol and it properly references the previous block), they will pass it along. Eventually, another miner will build on top of it by referencing it as the previous block when proposing the next block. Any transactions that were in the previous block will now have been 'confirmed' by the next miner. As blocks are added to the chain, the number of confirmations of Mark's transaction increases.

Why do some bitcoin transaction confirmations take so long?

Each block can only contain a certain number of transactions, and that number is determined largely by the space available in each block, or the 'block size,' which is 1MB. The limited space gives rise to the fee market, where miners, who collect fees, choose to include in the next block only those transactions which have included a high enough fee. Thus higher fees act as incentive for miners to prioritize your transactions.

Note that the block size is an arbitrary limit, but the Bitcoin community has chosen to keep the block size as small as possible in order to make it easier for people to operate Bitcoin nodes. Bitcoin Cash, which is a fork of Bitcoin, has a larger block size and therefore requires (much) lower fees for transactions.

Read more: Understand how the Bitcoin network decides on critical issues like the block size.

How much are bitcoin transaction fees?

Fees for sending bitcoin could be anywhere from a few cents all the way up to $100. The reason for the big variation is that Bitcoin fees depend on both supply and demand (ie. how congested the network is at a given time) and the "size" of your transaction. Size is affected primarily by inputs, so if your transaction has many inputs, it will take up more block space, and demand a higher fee. For example, if you want to send 10 BTC, there's a good chance your transaction will require more inputs than if you want to send 1 BTC. The 10 BTC transaction might consist of 5+2+1+1+1 (so a total of 5 inputs) while the 1 BTC transaction might be just two inputs as in our Mark/Jessica example above.

Manywallets, including the Bitcoin.com Wallet, allow users to manuallyset transaction fees. This helps you to avoid overpaying. For example, if you're not in a rush, you can set the fee the lower such that it will be picked up by a miner when the network is less congested. You can also ensure your transactions are processed immediately by increasing your fee.

Read more: .

How bitcoin transactions work | How Do Bitcoin and Crypto Work? | Get Started with Bitcoin.com (2024)
Top Articles
Latest Posts
Article information

Author: Stevie Stamm

Last Updated:

Views: 5610

Rating: 5 / 5 (80 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Stevie Stamm

Birthday: 1996-06-22

Address: Apt. 419 4200 Sipes Estate, East Delmerview, WY 05617

Phone: +342332224300

Job: Future Advertising Analyst

Hobby: Leather crafting, Puzzles, Leather crafting, scrapbook, Urban exploration, Cabaret, Skateboarding

Introduction: My name is Stevie Stamm, I am a colorful, sparkling, splendid, vast, open, hilarious, tender person who loves writing and wants to share my knowledge and understanding with you.