Bitcoin and Blockchain: Everything you wanted to know but never asked

Michael Verdi
Coinmonks
24 min readJan 24, 2019

--

Bitcoin is a digital currency that is built on a blockchain. Bitcoin, and others, are often referred to as cryptocurrencies because they take advantage of cryptographic algorithms to ensure the integrity of their transactions.

Cryptographic digital currencies represent the next evolution of money because they are easy to store, receive and send while being more secure and less vulnerable to manipulation than modern fiat currencies.

In this article, I’ll explain what Bitcoin is and how it utilizes both cryptography and the blockchain to work. This article will include an overview of various technical details, which can at times be confusing to the uninitiated. I’ll do my best to assume you know nothing. If you find this content interesting but want to learn more, I highly recommend the Bitcoin and Cryptocurrency Bootcamp found on Udemy, taught by Colt Steele and Kevin Katz.

Let’s begin our discussion with answering: What the heck is a Bitcoin!?

A Quick History of Money

Before I can answer the above question, I need to walk through a quick history of money to show how we arrived at the idea of entertaining a decentralized, digital only currency.

A long time ago in a continent far far away, humans lived in small, neighboring communities. In this time there was no money for people to exchange as the idea of money had not yet been conceived. Instead, humans produced things that other humans wanted. This was the age of barter. If you were a farmer and you needed a new pair of shoes, you traded some of your surplus food to the local cobbler.

The barter system worked well in small, tight-nit communities, however quickly created roadblocks as villages started to grow in size. What if the cobbler had a gluten allergy and the farmer only had wheat for trade? And, come to think of it, how does one value a pair of shoes versus a sack of wheat versus the services of a doctor? Calculating what is fair becomes overwhelming once an economy grows past subsistence.

People realized quickly they needed a way to value disparate goods and services in a uniform manner. But, what could people trade in lieu of the actual goods and services that others would accept and agree were valuable? The answer was to use stuff that people already found valuable. Things like seashells, gold, silver, bird feathers, spices, tea and more have all at one time or another served as money because all the parties involved agreed these items were valuable.

Aside from being valuable, money needed to be easily divisible, transportable and keep its value over time.

Shells used as money

Through years of trial and error, gold became the preferred choice for money because it met all the requirements of a good money. Gold is a soft metal, which makes it a poor candidate for industrial uses, however, its malleability is great for minting new coins. And, because it is a metal, it maintains its value over time versus frail or perishable items like seashells, tea or spices.

So, gold became the gold standard. But, it’s important to realize that money is not gold. Money is an idea. A way to exchange value between all the goods and services in an economy. It just so happens to be the case that gold fit the necessary requirements of a good money at that time in history.

People continued to exchange gold directly for goods and services for hundreds of years but as the economy of the world grew, people eventually realized that having to carry around sacks of metal was both cumbersome and not safe.

Banks formed and one of their primary services was storing people’s gold for them. Receipts were issued that proved individual ownership of gold and that it was safely stored. Gradually, people had enough faith in the receipts that they no longer bothered to redeem the gold in the vaults, instead they just traded the pieces of paper back and forth.

As countries and economies grew, people started conducting business transactions in further and further destinations with businesses and people they had never met before. Furthermore, each region had its own currency which made it difficult to determine the exchange rates between them. Countries formed central banks which created a uniform currency which could be trusted and exchanged at any regional bank.

Eventually, governments realized that having a money pegged to a specific commodity restrained the elasticity of the money supply. The only way to get more money into the system was to dig more and more gold out of the ground. Politicians don’t like being told there is no money for their wars or new social policies and, as a result, the gold standard was dropped.

This led to our modern fiat currency system. A fiat money is one in which the money itself has no intrinsic value. Dollar bills are just pieces of paper. The only reason they are valuable is because we all agree that they are valuable. This is why central banks and governments do everything in their power to instill confidence in their country’s money.

In modern times, two driving forces led to the increased adoption of digital currencies. The first is the fact we live in a digital age. For the last thirty years, the vast majority of our money supply existed in digital form. The chart below shows the M1 vs M2 money supply in the US. M1 is all the physical money that is in circulation, whereas M2 is money stored in digital form.

M1 vs M2 money supply

Although this is a chart of the US money supply, the same principle holds true for all countries around the world — digital representations of money far outstrip physical money in circulation.

This makes sense when we start to think about how we interact with our money today.

Receive your paycheck from work in the form of a direct deposit? Venmo a friend for dinner? Wire an amount to another bank? Pay your phone bill online? For all of these actions and a million more, banks and companies are simply moving digits from one account to another — physical money is not changing hands.

It’s important to note that this is not a bad thing. Remember, the mark of a good money is one which is easily stored, divisible and transportable while being stable and trustworthy.

It is these last two items, stability and trustworthiness, which currently plague modern fiat currencies. Remember, politicians don’t like being told they don’t have the budget to fund their policies and citizens don’t like paying higher and higher taxes. The result is governments around the world are constantly tampering with their money supplies. The result of this manipulation is a constant stream of boom and bust cycles in the economy as the ease of credit rises and falls.

The graph below shows major US recessions since 1975. The federal funds rate is the interest rate of money. As the cost to borrow new money is made cheaper , more and more loans are made. This is how the vast majority of new money enters the economy.

With the most recent crash in 2008/09, people became very unhappy with the current banking system and looked for a different avenue. It is through this turmoil that Bitcoin was born. The promise of Bitcoin is that by decentralizing the management of money, we can create economies that are more stable and inherently more trustworthy.

Why is this the case?

Because Bitcoin is not controlled by any one government or central bank. Every Bitcoin transaction is made public which creates transparency and accountability. Bitcoin doesn’t rely on the goodwill of people. Instead, it makes use of cryptography which builds trust intrinsically into the system. Finally, new Bitcoins are added to circulation in a predetermined, consistent manner, which avoids the ability of Bitcoins being arbitrarily inflated or deflated.

So, to answer the question at the beginning of this section, what is a Bitcoin?

A Bitcoin is just a digital representation of money. It is easily transferable, storable and safe — all the characteristics of a good money. As we now know, money doesn’t have to be a physical thing, money is an idea — a way to uniformly value all the goods and services in an economy.

How Bitcoin is able to build trust into a system where there are no governments or central banks is the topic of the next section.

Creating Trust in a Trustless System

From its inception, the creator(s) of Bitcoin knew that for a decentralized, digital currency to be successful, people needed to trust it. The currency needed to be bulletproof against hackers and fraudsters who would intentionally try to game the system. In this way, Bitcoin needed a way to secure each individual transaction as well as a way to secure the history of all transactions.

Let’s begin by discussing how Bitcoin ensures that a transaction sent to you is only accessible to you.

To gain access to Bitcoin, you need a wallet. A wallet allows you to send, receive and access your stored Bitcoins. A quick search on the Bitcoin foundation website shows over thirty wallets! How do you choose a wallet and why are there so many?

Well, wallets are a lot like email clients. They all implement the Bitcoin protocol but differ slightly in look and functionality based on the decisions made by each company that created them. For this article, all you need to know is that wallets give you access to Bitcoins, which you can receive in one of three ways.

  1. You can purchase Bitcoins from an exchange
  2. You can receive Bitcoins as payment for goods or services rendered
  3. You can participate in the Bitcoin mining network, which rewards people who use their computers to run the Bitcoin software with new Bitcoins.

For most of us, we usually receive new money by getting paid from our jobs. We don’t dig gold out of the earth and sell it for US dollars and most of us don’t buy and sell currencies on the Foreign Exchange.

So, for our purposes, let’s assume you started working for a new employer and they offer the option to receive payment in Bitcoin. For a successful transaction to occur where your employer sends you Bitcoin, you need to understand how a wallet functions.

A new Bitcoin transaction has the following three pieces of data:

  1. To Address: Denotes where the Bitcoin is going
  2. From Address: Denotes where the Bitcoin came from
  3. Amount: Denotes how much Bitcoin is being transferred

Most of us are familiar with the idea of having an online bank account. This account serves as your secure place to send and receive money. Although wallets achieve the same result, under the hood, they function much differently. There is no one account that you own when working with Bitcoin. Instead, each recipient in a new transaction creates a new encrypted address where Bitcoins are sent to.

Think of a new address in Bitcoin like a secure safe that is in the middle of your lawn. Your employer adds money to it but only you can take the money out. It doesn’t matter that the safe is in plain sight because it is uncrackable. Only you can access the funds.

Every two weeks, your employer sends you more Bitcoins. Each time, they create a new safe and deposit your funds. Your lawn is now filled with secure safes that only you can access.

Your wallet app keeps track of the codes to open each safe and the location of where each safe exists. This all happens under the hood. To you, when looking at your wallet app, it appears that you have one account with X number of Bitcoins in your account.

Why does Bitcoin operate like this? Why not just have a single secure account that you own where your funds get deposited into? The reason for this setup is because no one person, company, government or central bank controls Bitcoin. There is no centralized place where you can go to sign up for an account. Remember, the wallet app you use is not a bank that safely stores your funds. It is just a piece of software that allows you to interact with the Bitcoin network.

The next question to answer is how is it possible for Bitcoin to create uncrackable safes? Safes so secure that they can be left out in public, for all to see, without fear of an unauthorized person being able to open them.

This is possible through a technology called public key cryptography. For each new transaction, the receiver’s wallet app creates a public and private key. The public key is used as the address for where the encrypted safe exists on the Bitcoin network and the private key allows the recipient to open the safe.

Conceptually, you can imagine this as:

Bitcoin transaction

In our above example, we said each new public address was a new safe where only you have the key. This is true. Now, you just need to understand that we represent the location of a safe in computer code as an extremely long hexadecimal string of characters. The same is true for the key needed to open the safe. But, don’t let the long string of characters confuse you — conceptually it’s just a locked safe with a single key which can open it.

The Magic of Public Key Cryptography

Explaining exactly how public key cryptography works is out of the scope for this article, but I do want to explore the concept a bit more for those who are completely new to the field.

First, cryptography is the science of hiding the contents of information from your enemies. Its initial uses were in wartime when generals needed to send information about their battle plans to their troops. In previous eras, generals worried about their messages falling into the wrong hands because given the encrypted message it was possible to work backwards to decrypt it.

This all changed with the invention of public key cryptography. Public key encryption is asymmetrical, which means even if you have the secret message and the public key used to encrypt the message, there is no way for you to work backwards to decrypt the message. Only the person with the private key can decode the message.

In this way, the details of every transaction ever made on the Bitcoin network are freely viewable. The below image shows three random transactions I found online at blockchain-explorer.

Continuing with our above example, Bitcoins move from one safe to another safe. The from and to addresses are scary long strings of characters but to a computer it just means move funds from one safe to another safe.

Bitcoin transactions on the blockchain

Ok, so now we know that every transaction is destined for a specific address which only the receiver of the transaction has access to. Bitcoin actually adds another layer of security on top of this by requiring that the sender of the transaction prove that they in fact have the rights to send Bitcoin from the address they are sending from.

This is called private key signing and works because of an interesting quirk in how public key encryption functions. It is possible to encrypt a message with the private key and decrypt it with the public key — the reverse of what was just described above. Generally, this is a very bad idea because anyone with the public key (which is everyone) can decrypt the message.

On the Bitcoin network, this quirk is exploited so that sender’s must sign a transaction with their private key. In this way, miner’s working to add the transaction to the blockchain (more on this shortly) can verify the identity of the sender by using the address’s public key.

The chart below outlines the process of how new transactions are secured.

Chart of how transactions are secured within Bitcoin

If you’re getting confused, just understand that Bitcoin takes precautions to ensure the right person is sending the funds and only the person destined to receive those funds are allowed to access them.

The Public Ledger

Now that we understand how Bitcoin secures individual transactions, we need to explore how it keeps an accurate history of past transactions. Managing the public ledger without a third party overseer requires the use of a new technology called the blockchain. But, before explaining how the blockchain works, let’s ensure we understand why we need it.

Banks: Do We Need Them?

As mentioned earlier in this article, the vast majority of us already use and rely on a digital money system. We sign up with a bank, get an online account, fund the account and now freely move money around, right?

Well, almost true. For their “account services” banks charge fees. Want to send money to another bank? There’s a fee. Want to purchase something with a credit card? There’s a fee. Need a cashier’s check? There’s a fee. Want to automatically pay bills online or use direct deposit? There’s a fee.

Now, it’s reasonable for banks to charge fees for these services, after all, they are providing desired services. But, we begrudgingly pay these fees because banks provide security and convenience for our money. You, for example, cannot log into your bank account and send money you don’t have to someone else. Banks ensure we can only spend what we have because they maintain a ledger of all our transactions — who we sent money to and who sent money to us.

In this way, banks serve as third party middlemen in the secure flow of money throughout the economy. But, for this service, we are subject to their fees, their terms and our funds are vulnerable to attacks depending on the safety protocols that bank has in place.

But, is there a way we can keep track of everyone’s history of transactions without the oversight of banks?

For most of human history the answer was a resounding no. But, with the invention of the blockchain, we can keep a public ledger of all transactions while ensuring people only spend what they have. Banks are no longer needed as agents of trust.

How the Blockchain Works

In its simplest definition, a blockchain is a community maintained database of transactions which grows, but cannot be modified. This is unlike a traditional database which can be changed freely. In this way, blockchains are always growing in size as new blocks are stacked on top of old blocks.

Basic Blockchain with Three Linked Blocks

The blockchain is also decentralized, which means the entire blockchain exists on thousands of computers spread out across the world. In fact, anyone can signup to be a miner and participate in hosting the Bitcoin blockchain.

This is the opposite of current centralized banking setups, where a company hosts their own database — which they can alter at will — on servers running in a secure location with strict control on who can access them.

But, how exactly does a blockchain ensure its immutability? The answer lies in more cryptography!

Hashing

Blockchains secure each block of transactions with a hash function. A hash function can be used on any digital file to create a fixed sized, one-way output, — called a fingerprint. Every fingerprint is unique to its inputs. Change any input in the slightest and the output will be completely different.

Take, for example, the following string: "Hey don't mess with this string!”. If any part of this string changes, the fingerprint will be completely different. Below, I show three examples where I make a tiny tweak to the string. The result is an output which is completely different except for its standardized length. And, importantly, knowing the output does not give us any insight into what was the original input.

SHA-256 is one of many secure hashing protocols. It is used widely throughout the web for encrypting information and, to date, there is no known way to crack it. The Bitcoin protocol uses the SHA-256 standard.

Hashing functions are the equivalent of tamper-proof seals found on medicine bottles. If the seal is unbroken, we can rest assured that the medicine inside is unaltered from when it was first bottled.

Securing a Block

The Bitcoin blockchain looks at all new transactions posted to its network approximately every 10 minutes. Using a hash function, Bitcoin could create a unique fingerprint of the entire ledger, which would work, however, it would quickly become too computationally intensive to look over all transactions every time someone posted a new transaction.

Remember, blockchains are immutable which means they are always growing in size. In fact, as of 1/19/2019 the current size of the Bitcoin blockchain is around 200 GB. In order for this decentralized system to work, every computer running the Bitcoin blockchain must contain the entire ledger.

To solve this problem, a blockchain doesn’t try and create a new hash of the entire ledger every time it needs to add new transactions. Instead, it breaks the data up into blocks. Each new block includes the previous block’s hash output as an input to its hash function. The result is blocks of data that are interconnected.

Blocks, connected by the previous block’s hash

If any data is altered in a previous block, its fingerprint is changed, which causes all the proceeding blocks to become invalid.

Block 2’s fingerprint changes, rest of block’s became invalid

A great, interactive demo of how the blockchain works to connect new valid blocks can be found here: https://anders.com/blockchain/blockchain.html

Remember, the ultimate purpose of a block is efficiency. By grouping a bunch of encrypted transactions together and placing a tamper proof seal on them, the network only needs to focus on keeping each block safe versus every single underlying transaction.

Adding New Blocks

At this point, you should have a strong conceptual understanding of how Bitcoin uses public key cryptography to secure individual transactions and how it uses a blockchain to create a tamper-proof ledger of all the transactions in the system.

Now, we need to explain how new transactions are posted to the network and how thousands of independent computers running in different parts of the world are able to agree on the given state of a blockchain.

Introducing Miners

The Bitcoin blockchain is decentralized and the only way for it to work is to have other computers around the world running its software. Typically, a tech company that wants to provide its software to its customers has to either setup and run a bunch of servers themselves or pay a hosting company like AWS for the right to use a certain number of servers. Regardless of whether a company owns or rents its servers, it still costs money to operate as you’ve got to pay for the electricity, security and the physical hardware.

Now, if it is costly to run software, why would anyone host the Bitcoin software? The answer is that the Bitcoin pays people to run it with newly minted Bitcoins.

The beauty of this system is that it accomplishes two things at once. Mining Bitcoin — aka hosting the Bitcoin software on a computer — both adds new Bitcoins to the system and ensures its up time, which allows new transactions to post.

The amount of new Bitcoins that get added to the system is predetermined. The initial payout started at 50 BTC for every new block. That amount halves after every 210,000 added blocks. The current payout is 12.5 BTC per block.

When a miner successfully validates a new block they add an additional transaction to account for their mining reward. This special transaction, called the coinbase transaction, has no from address — because the Bitcoins were created out of thin air — and every valid block must contain it.

The total number of Bitcoins that can ever be mined is 21 million. At which point, miners will rely exclusively on transaction fees (discussed later) to sustain the network.

Ensuring Consensus

Remember, a blockchain is a community maintained database. There are tens of thousands of miners located around the world. As new transactions post to the system, miners who are physically closer to a given transaction will see it first.

As shown in the example below, if a new transaction occurs in the US, it is much more likely to be picked up by a US based miner than one located in Japan.

From Bitnodes — Map of Bitcoin Miners

But, because every miner in the system needs to be made aware of all the transactions that occur, the miner who discovered the transaction first needs to propagate it through the system. This takes time. If this propagation needed to occur with every new transaction — and there are hundreds of thousands of transactions per day — the ledger would never be able to reach an agreed upon state. If the ledger cannot agree on its current state, then it can never add new transactions.

So, the creator(s) of Bitcoin needed a way to introduce lag time into the system so that new transactions had enough time to reach everyone and the state of the ledger could be agreed upon before adding new blocks.

A somewhat arbitrary time of 10 minutes was chosen. This time represents a tradeoff between speed and efficiency where speed is the time it takes to make all miners aware of a new block and efficiency is limiting the amount of wasted computational work where miners are working to add transactions to the chain that are already confirmed (abandon blocks will be explained shortly).

The chart below offers a visualization of this process. Every 10 minutes, miners grab as many transactions that can fit in 1 MB of data — the max size of a block. Miners decide which transactions go into their block and then begin working to solve a computationally challenging but functionally useless hashing problem called Proof of Work.

Miners attempting to add a new block

Proof of Work

It’s important to understand that requiring miners to find “proof of work” for their block before being able to add it to the chain is simply a way to slow the system down. Often times you’ll read that miners are “validating transactions”. While this is true, that task is independent of the time it takes to crack a proof of work problem.

Solving a proof of work problem is much like winning the lottery. In a proof of work problem, a miner gets the fingerprint of hashing the following six items in a block:

  1. Current version of the bitcoin protocol
  2. Current timestamp
  3. Difficulty level (to solve the proof of work problem)
  4. A Nonce (number used once)
  5. Previous block’s hash
  6. Hash of all the transactions in the block

These six inputs create a unique hash output. For example, block 416,731 in the blockchain has the following valid hash:

Notice all those zeroes before the number begins? Proof of work requires the miner to continually change the nonce (one of the inputs mentioned above) until a specified number of zeroes appears at the beginning of the hash. Hash outputs are completely random given their inputs. Miners team up into huge pools so they can make trillions of guesses per second.

Bitcoin wants new blocks to be validated every 10 minutes. So, every two weeks it reviews the average time to solve a block and adjusts the difficulty level of the hashing problem accordingly. A higher difficulty level will on average increase the time it takes to find a valid hash output.

*How this process works in detail can be found in the appendix.

Dealing With Duplicates

Once a miner finds a valid proof work, the block is added to the chain. But, importantly, there are multiple right answers to any given proof of work problem and multiple miners may find a valid block at roughly the same time.

Which block gets added?

Generally, it is the block that finished first. As soon as other miners see a valid block they start working on the next block. This is true because a longer blockchain is a more secure one. Remember, if you change one bit within a previously completed block, it’s hash changes, which makes the block invalid and all blocks stacked on top of it invalid as well.

If an attacker wants to change the history of the blockchain, they need to solve the proof of work problem for a given block plus all the blocks stacked on top of it. They need to do this at a faster rate than new blocks added to the top of the chain. Achieving this would require enormous computational power. As a result, when looking to validate a new block, miners will always gravitate to working off the longest chain.

In the Bitcoin blockchain, valid blocks which are abandoned have their miner reward taken away and their transactions are place back in the pool of the unconfirmed. In other blockchains, like Ethereum, miners of abandoned blocks still get paid.

The graph below shows a blockchain progressing with splits that occur due to multiple valid blocks being found. But, because one of the chains found the next block sooner, the smaller chain is abandoned.

How multiple valid blocks are handled

The block building process continues as long as people are making transactions on the network. The current Bitcoin blockchain is over 500,000 blocks deep. This makes Bitcoin extremely resilient and nearly impossible to hack.

The Future of Bitcoin and Blockchains

Bitcoin proved it is possible to have a decentralized, digital only currency that is safe and valuable. The stability of Bitcoin fluctuates wildly because the vast majority of people involved with Bitcoin view it as an investment (which leads to widespread speculation) instead of using it as a currency. The main reason for this is that Bitcoin is not readily accepted by many companies as a form of payment.

Over time, more and more businesses will slowly begin to accept Bitcoins as a payment option but governments are unlikely to officially sanction it as legal tender because of their inability to control it. Ultimately, Bitcoin’s success depends on how poorly governments manage their money. If another world financial collapse occurs like in 2008/09, Bitcoin may be brought in by popular vote.

Regardless of Bitcoin’s future, the blockchain technology will continue to grow in its utility. It is currently in a hype cycle with people over eager to use it simply because it is new, however, there are real use cases in areas like real estate title management, voting, insurance and supply chain management.

Ultimately, the promise of the technology is to make our lives easier, more efficient and more secure.

Thanks for reading! 🙏

— —

Appendix

Bitcoin’s Proof of Work Explained

The following is a deeper explanation of the mechanisms involved in Bitcoin’s proof of work algorithm known as Hashcash.

Each miner is required to provide proof of work. When a miner is hashing a new block, they hash the following six items to create that block’s hash.

  1. Current version of the bitcoin protocol
  2. Current timestamp
  3. Difficulty level (to solve the proof of work problem)
  4. A Nonce (number used once)
  5. Previous block’s hash
  6. Hash of all the transactions in the block

Each miner is repeatedly hashing the block — changing only the nonce — until they have a fingerprint that is lower than specified number. There is not a single right answer.

Hashcash — Bitcoin’s Proof of Work Problem

How fast this challenge can be solved can be changed by adjusting the difficulty level — which, in effect, lowers the possible correct outcomes. As more miners come online, the likelihood of finding the correct answer faster increases. Because Bitcoin wants a new block hashed every 10 minutes, it controls the rate of completion by adjusting the difficulty level.

Increased difficulty lowers the range of acceptable values. Decreased difficulty increases the range of acceptable values.

Controlling the rate of new blocks

The following image attempts to visualize how this process works. The two characters at the top represent miners. Each number represents a random nonce they guessed. The colored pins represent the final derived fingerprint. As soon as one of the guessed fingerprints is within the bounds setup by the target — that miner wins.

Now, how are the target and difficulty levels actually determined?

Every two weeks, the network analyzes the average time to compute a block. If it takes over 10 minutes, the difficulty level is decreased. If it takes under 10 minutes, the difficulty level is increased.

The difficulty and target are proportionately related. The formula to find the target is:

Where N is a constant number that bitcoin created when it first launched. The first blocked ever computed had a difficulty level of 1. The current difficulty level is 5,883,988,430,955.41. By increasing the difficulty, you decrease the target window, which, in effect, increases the overall difficulty of computing the correct answer.

Imagine N = 20. If the difficulty level is 1, that means 0–20 are all valid fingerprints. If the difficulty raises to 5 that means 0–4 are all valid fingerprints. As you can see, a slight change in the difficulty level makes the total number of possible outcomes much smaller.

A great, interactive demo of how the blockchain works to secure each new block can be found here: https://anders.com/blockchain/blockchain.html

Double-spend

A double spend can occur when someone sends money to you but then also sends money to another address that they own. They can alter the timestamp of that transaction and have it appear before your transaction. The blockchain will accept the first transaction and view the second transaction as a fraud.

The easiest way to avoid this situation is to wait on at least three confirmations, where a confirmation is the addition of a new valid block.

For a more complete description of what happens during a double spend, see this article: https://medium.com/innerquest-online/how-does-a-blockchain-prevent-double-spending-of-bitcoins-fa0ecf9849f7

Miner Fees

Fees are added to transactions to incentive miners to process a particular transaction faster. When a sender creates a transaction, they can add a fee. When a miner wins a block they collect all the fees associated with each transaction. Miner’s prioritize transactions with higher fees. So, if you need a transaction to happen sooner, you increase the amount you’re willing to pay.

How Change is Handled on the Blockchain

In looking over transactions it is very rare to see a single address send to another single address. This is because in bitcoin a from address must send all the bitcoins associated with it. Anything leftover from a transaction is sent to another address that the sender owns.

An Example

Person A wants to purchase something that costs 10 BTC. Person A doesn’t have a single address that they own which contains 10 BTC. Instead they have 3 addresses which have the following amounts:

Address 1: 2 BTC

Address 2: 7 BTC

Address 3: 4 BTC

In order to reach the 10 BTC purchase price, the sender would create a new transaction that would send from all three addresses. The sender needs change of 3 BTC. He creates another address, which he owns, to send along the additional 3 BTC. Thankful, management of change is handled automatically by most wallet apps.

Get Best Software Deals Directly In Your Inbox

--

--