How a Bitcoin Transaction Works (2024)

How do Bitcoin transactions work?

A Bitcoin transaction is a transfer of a certain amount of bitcoins from one address to another address that is recorded on the blockchain.

But how does this “transfer” process actually work?

In this lesson, I’m going to show you how a Bitcoin transaction works from start to finish.

First, we’ll look at how a Bitcoin transaction works from a user’s perspective. And afterward, we’ll look at how a Bitcoin transaction works from a bird’s eye view.

This will help you remember all the new concepts you’ve learned in the previous lessons.

Are you ready?!

How a Bitcoin Transaction Works (1)

Let’s say that Ironman has 1 bitcoin that she wants to send to Batman.

How a Bitcoin Transaction Works (2)

From Ironman’s Perspective

The first thing that Ironman would do is open his Bitcoin wallet.

This could be any type of wallet but in this example, he’s using a software wallet that he’s installed on his laptop.

How a Bitcoin Transaction Works (3)

The next thing he does is ask Batman for his Bitcoin address.

This is where Batman wants to receive his bitcoin. Batman emails him a Bitcoin address and Ironman copies and pastes it.

How a Bitcoin Transaction Works (4)

Ironman then enters the amount of bitcoins he wants to send Batman.

How a Bitcoin Transaction Works (5)

Since his huge gold-titanium alloy fingers are prone to typos, he double-checks he’s entered the correct number.

And hits Send.

How a Bitcoin Transaction Works (6)

The wallet software then asks for the password to confirm the transaction.

To send bitcoin, Ironman needs to prove to the Bitcoin network that it’s actually him sending the money and that he has ownership of the bitcoin.

That’s where his private key comes in (which is stored in the wallet).

After Batman enters the correct password, the wallet software “signs” the transaction using Batman’s private key, creating a separate piece of data known as a “digital signature“. (This is all done behind the scenes.)

How a Bitcoin Transaction Works (7)

Bitcoin Transaction Behind the Scenes

From here on out, Batman’s involvement is done.

The wallet software connects to a Bitcoin node and sends the transaction message, along with the “digital signature” and public key.

The node checks to see if the transaction is valid:

  • Does the sender have enough BTC tied to their address to do the transaction?
  • Is the sender authorized to send the BTC?

For example, it checks to make sure that Batman actually has 1 BTC to send. If the transaction passes all checks, the node passes the transaction on to other nodes.

By default, nodes don’t trust each other, so they will validate the transaction again for themselves.

And only if it deems the transaction valid, will they share the transaction to nodes that they’re connected to.

How a Bitcoin Transaction Works (8)

If a transaction is deemed valid, it is then stored in a temporary storage area known as the “memory pool” or “mempool“.

At this point, a transaction is considered “unconfirmed” or “pending“.

How a Bitcoin Transaction Works (9)

Special nodes known as “miners” will package this transaction along with other valid transactions from their mempool into a “block“.

How a Bitcoin Transaction Works (10)

Miners will then compete to be the first to “mine” their block. This involves trying to find a number that begins with a specific number of zeros.

The only way to find this number is by trial and error. In other words, making as many guesses as possible.

How a Bitcoin Transaction Works (11)

The first miner to guess a correct number means it’s the first to “mine” its block.

The moment the miner guesses correctly, it shares its block along with the “winning number” to other nodes in the Bitcoin network.

How a Bitcoin Transaction Works (12)

Nodes on the Bitcoin network verify that the miner has guessed the correct number and if it is correct, it adds the winning miner’s block to their copy of the blockchain. And they also send this block to other nodes.

Since the block (that holds the transaction) has now been added to the “official” version of the blockchain, the transaction is now considered “confirmed

Once that block is created and the new transaction is verified and included in that block, the transaction is said to have “one confirmation“.

How a Bitcoin Transaction Works (13)

From Batman’s Perspective

Batman sees that the transaction has been confirmed and checks his Bitcoin wallet to see if the bitcoin has been transferred.

How a Bitcoin Transaction Works (14)

The more blocks that have been built on top of the block with Ironman’s transaction, the more “confirmed” the transaction is on the blockchain.

Basically, each block added is considered an “additional confirmation“. Waiting for six confirmations is the current standard for most transactions to be considered secure.

And three you have it!

One bitcoin has now been transferred from an address owned by Ironman to a new address that’s owned by Batman.

And unless Ironman or Batman shares their Bitcoin wallet address publicly, nobody will know two famous superheroes were involved in a Bitcoin transaction.

All anybody would see is 1 BTC being sent from one address to another, but they wouldn’t know who is behind the addresses.

As you can see, a lot of the steps in a Bitcoin transaction were done behind the scenes.

Once Batman shared his address with Ironman, and Ironman initiated the transaction using his Bitcoin wallet, the rest was handled by computers and software code.

Bird’s Eye View of a Bitcoin Transaction

Now let’s take a bird’s eye view of how a Bitcoin transaction works.

Let’s assume that Ironman has already entered Batman’s address and the amount of bitcoin to send.

How a Bitcoin Transaction Works (15)

Ironman’s wallet connects to a node that broadcasts a message to all the computers (“the Bitcoin network”) that run a copy of the up-to-date database (“Bitcoin’s blockchain”) that says, effectively, “I want to send 1 bitcoin to Batman.”

Ironman has a unique string of letters and numbers called a “private key”. With this private key, Batman’s wallet software generates a “digital signature” that ensures that the message is coming from him and not from anyone else.

Computers (“full nodes”) in the Bitcoin network can easily confirm if Ironman is the one who actually sent the message by using a different string of letters and number that Ironman provides, called a “public key” to verify this “digital signature”.

They can also easily confirm that Ironman has 1 bitcoin to send because they all have a copy of the current database.

All of the nodes are constantly updating each other with the latest information (“transactions”) that is added to the Bitcoin network.

A transaction exists as a record of the transfer of bitcoin from one address to another. Transactions are not individually recorded on the blockchain, but are first grouped into blocks.

Importantly, at this point, the transaction has only been proposed. No computer has updated its copy of the ledger (“blockchain”) yet.

Transactions are initially placed into what amounts to a waiting room (“mempool”), where they sit waiting for confirmation.

The mempool (memory pool) is a smaller database of unconfirmed (pending) transactions which every node keeps. All transactions in the mempool are pending, and should not be trusted until they are included in a block.

Because the transaction is only being proposed and not settled, the system can rapidly relay the message to ensure every participant is aware of it.

In the diagram below, Ironman and Batman are represented as purple wallets.

The gray circles represent the computers (“full nodes”) that are part of the peer-to-peer (P2P) Bitcoin network.

The black squares represent the “blockchain”, sequentially updated copies of the ledger, at the time Ironman proposes his transaction to the network.

As you can see, identical copies of the blockchain are stored on computers around the world (“full nodes”) that run the Bitcoin software. This design ensures that no single entity is in control of the ledger and makes Bitcoin resistant to being controlled (or shut down) by any government or central authority.

All nodes that maintain a complete copy of the blockchain known as “full nodes” would need to be destroyed in order to erase the ledger. As long as the entire ledger exists on at least one full node, there will be a record of all Bitcoin transactions throughout history.

How a Bitcoin Transaction Works (16)

Of course, Ironman is not the only one creating a transaction. There are other members of the Avengers sending their bitcoins to other recipients. For example, Captain America could be sending some bitcoins to the Winter Soldier.

This is where a special participant in the network enters: “miners.”

Miners are computers that are scattered around the world and form a critical part of the Bitcoin network. Their job is to bundle or group together new valid transactions, such as Ironman’s, and propose them for settlement.

These groups of transactions are called “blocks,” which is where the “block” in “blockchain” comes from.

A block is a collection of transactions. Blocks are linked together chronologically to form a “chain of blocks” or blockchain.

At any given time, thousands of these computers are competing with each other for the right to create the next block. The competition involves solving a”puzzle”, and miners can propose a new block only if they solve the current puzzle.

This “puzzle” basically boils down to trying to guess a correct number.The odds of guessing a correct number is about 1 in 6 trillion.

So the trick to being the first to find a “winning” number is to guess as many numbers as possible. This requires a lot of computing power which uses huge amounts of energy.

Whoever finds the solution first is entitled to a reward, known as the “block reward”.

The block reward was designed to incentivize nodes to participate in mining. Otherwise, there would be no miners since they would not be able to recoup the high cost of the computers and the electricity cost of running them.

The block reward is made of TWO components:

  1. Newly minted bitcoins
  2. Transactions fees (which are paid by the person initiating the transaction like Ironman)

The newly minted bitcoins “won” by the miner are known as the “block subsidy” and represent the biggest part of the reward. Currently, each new block currently comes with a reward of 6.25 newly minted bitcoins.

Each block contains multiple transactions, And all transactions include a fee, which miners collect.

In summary:

Block reward = block subsidy + transaction fees

The block reward is what incentivizes miners to perform the work necessary to verify transactions and maintain the database.

Every 210,000 blocks, or roughly every four years, the block subsidy is cut in half in an event known as the “halving”. This process will continue until the block subsidy is zero. At that point, miners will only collect transaction fees

New blocks are settled on the Bitcoin network roughly every 10 minutes, though the exact time depends on how quickly the “puzzle” is solved.

Today, most mining is done by “mining pools,” groups of miners who combine their processing power and share the block reward among themselves.

This process is shown in the diagram below.

How a Bitcoin Transaction Works (17)

The miners are now represented as orange circles.

The blue square shows the updated ledger that includes a number of new transactions, including Ironman’s

For now, only one network participant (the miner who proposed the new block of transactions) can see the fully updated ledger.

All other participants still only see the older blocks, which are depicted in black.

Because the reward is significant, many miners compete to settle each block of transactions.

By design, solving the “puzzle” is an expensive endeavor since it takes significant computing power and requires a lot of electricity. And knowing which of the thousands of miners will solve the “puzzle” first is impossible.

Once a miner does solve the “puzzle”(guess a correct number), it can post the solution and propose its block of transactions to the network.

What’s neat about this approach is that although solving the puzzle is difficult and expensive to solve, checking the result is very easy. And when a miner posts a solution and its block of transactions, other members of the network check the work.

If the transactions are valid and the solution to the “puzzle” is correct, network participants update their copy of the database to reflect the new transactions.

At that point, Ironman’s transaction is considered settled or “confirmed“. The 1 bitcoin has moved from Ironman’s address to Batman’s address and has officially been recorded on the blockchain.

This “consensus mechanism” of determining what transactions get permanently recorded and “confirmed” is the heart of Bitcoin’s blockchain design.

This process is shown below.

How a Bitcoin Transaction Works (18)

All network participants have now accepted the new block of transactions proposed (blue square). As a result, their ledgers are updated and synchronized.

Importantly, the competition to settle the next block of transactions depends on including the information from the previous block, which causes the miners to rapidly update their copy of the database and ensures that tampering with a settled block is very difficult.

This “chaining together of blocks” is why this database architecture is called a “blockchain.”

The Bitcoin blockchain contains every block since its inception, going all the way back to the first block known as the “Genesis Block.”

What if the unknown Bitcoin miner submitting a block is a bad actor and proposes an invalid block of transactions that somehow benefits it?

Or what if Ironman is malicious, and he’s trying to send the same 1 bitcoin to both Spider-Man and Wonder Woman at the same time without anyone noticing?

Network participants examine each transaction in each proposed block and reject blocks with invalid transactions. Today, more than 100,000 nodes are independently verifying every single Bitcoin transaction!

Because the work of validating transactions and ensuring that only valid transactions are settled is trivially easy for network participants but attempting to settle transactions is costly, the incentive to even try to defraud the system is minimal.

Summary

Let’s summarize all the interactions on the Bitcoin network:

  • If you want to send bitcoins to another person, you provide the recipient’s Bitcoin address, and your wallet will connect to a node to initiate a transaction.
  • The node will verify the transaction, validate it and then broadcast and relay the valid transaction to other nodes and miners. If a transaction violates one of Bitcoin’s rules, nodes will automatically reject it.
  • Miners batch these transactions into a “candidate block” (temporary block) and compete to be the one who gets to publish their block on the blockchain by being the first to guess correctly a solution to a math “puzzle”.
  • The “winning” miner gets to publish this temporary block as a permanent block to the blockchain, confirming the transaction (and other transactions in the batch).
  • Nodes receive this block and verify that the miner is following the rules of the network. (If the block violates one of Bitcoin’s rules, nodes will automatically reject it.)
  • Whenever a node receives a new block and deems it valid, it relays it to other nodes, so that all nodes (including miners) can remain in sync and maintain identical blockchains.
  • All other miners delete the temporary block they were working on and start on a new “candidate block” with a new math “puzzle”.
  • Once the node that the recipient’s wallet connects to has received the new block, the recipient’s wallet will show an updated balance with the newly received bitcoins.
How a Bitcoin Transaction Works (2024)

FAQs

How does a Bitcoin transaction actually work? ›

We define a bitcoin as a chain of digital signatures. Each owner transfers bitcoin to 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.

How do you explain how Bitcoin works? ›

Bitcoin acts as a medium of exchange, a store of value, and a unit of account and is generally accepted as payment for goods and services. It is durable, portable, easily stored, and has perceived value. According to these common definitions, it is money.

How to spot a Bitcoin scammer? ›

Here are several warning signs that will help you identify a Bitcoin scam: Spelling and grammar mistakes is a message. Free money offers and high return guarantees.

How does a transaction work? ›

The issuing bank verifies the customer's account and checks if they have sufficient funds or credit to complete the transaction. At this point, the issuing bank sends an approval or decline message back through the card networks and acquiring bank to the payment processor.

How does Bitcoin answer the 3 functions of money? ›

Money serves three functions in an economy: medium of exchange, store of value, and unit of account. To be an effective medium of exchange, money must be acceptable in exchange for goods and services. Bitcoin can be used as a medium of exchange for a limited number of goods.

How many people own 1 Bitcoin? ›

However, some estimates can be made based on blockchain data and surveys of Bitcoin holders. According to data from Bitinfocharts, as of March 2023, there are approximately 827,000 addresses that hold 1 bitcoin or more, representing around 4.5% of all addresses on the Bitcoin network.

How do I receive my money from Bitcoin? ›

A: To transfer Bitcoin to a bank account, sell your Bitcoin on a crypto exchange for fiat currency. Link your bank account to the exchange, complete identity verification, and then withdraw the fiat cash to your bank account. Withdrawal times and fees vary depending on the exchange.

How does Bitcoin make you money? ›

New blocks of transactions are added to the ledger once every 10 minutes, and the miner who validates a new block is rewarded 6.25 Bitcoins. Miners also earn transaction fees paid by users who would like to have their transactions validated faster, which can add about $4,000 to the reward for each block.

How do I use Bitcoin to receive money? ›

Your digital wallet will allow you to copy your Bitcoin Cash address to your clipboard. Then, you just need to provide the sender with that address via email, messaging app, SMS, etc. Most wallets also provide you with a QR-code version of your Bitcoin Cash address.

How does romance scammer work? ›

Romance scams start with fake online dating profiles and end up with the romance scammer disappearing after getting what they want (usually money). Romance scammers typically lurk on dating sites, but they may also be on social media like Facebook or Instagram as well.

Can you trace a Bitcoin address to a person? ›

Tracing the owner of a Bitcoin address can be a complex task that often requires a combination of technical expertise and investigative techniques. Blockchain explorers serve as an essential resource, providing visibility into the transactions and addresses on the blockchain.

Can I get my Bitcoin back from a scammer? ›

Although it doesn't assure fund recovery, it's also best to report the cryptocurrency scam to your area's designated law enforcement authorities. Typically, when you report a crypto scam, the government will track down the criminals and get your funds back for you.

How does Bitcoin get cashed out? ›

Use an exchange to sell crypto

One of the easiest ways to cash out your cryptocurrency or Bitcoin is to use a centralized exchange such as Coinbase. Coinbase has an easy-to-use “buy/sell” button and you can choose which cryptocurrency you want to sell and the amount.

How long does 1 Bitcoin transaction take? ›

Understanding Bitcoin transaction time is crucial for any trader. While Bitcoin's transaction speed can vary, it generally takes around 10-60 minutes to get completed. However, factors like network congestion, transaction fees, and many others can influence it.

Who pays for Bitcoin transactions? ›

Bitcoin transaction fees are what you as a sender pay to Bitcoin Miners in order to have your transaction included in the Bitcoin Blockchain. Unlike most transaction fees charged by banks, with Bitcoin you are free to choose your own fee which is normally represented in sats per virtual byte or “sat/vB”.

Is paying in Bitcoin traceable? ›

Every transaction made on the Bitcoin network is recorded on a public ledger called the blockchain. While individual users can remain pseudonymous, their transaction history can still be traced through analysis of the blockchain.

Top Articles
Latest Posts
Article information

Author: Sen. Ignacio Ratke

Last Updated:

Views: 5527

Rating: 4.6 / 5 (56 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Sen. Ignacio Ratke

Birthday: 1999-05-27

Address: Apt. 171 8116 Bailey Via, Roberthaven, GA 58289

Phone: +2585395768220

Job: Lead Liaison

Hobby: Lockpicking, LARPing, Lego building, Lapidary, Macrame, Book restoration, Bodybuilding

Introduction: My name is Sen. Ignacio Ratke, I am a adventurous, zealous, outstanding, agreeable, precious, excited, gifted person who loves writing and wants to share my knowledge and understanding with you.