How Does Bitcoin Work?

Bitcoin is not a physical object or a computer file

  • Bitcoin is a shared ledger system where transactions adjust the balances within the ledger so there is no physical object or file other than the shared Blockchain ledger.
  • A Bitcoin can be broken down to 8 decimal places and it is a ledger entry so there is no significance to individual Bitcoins.
  • If Bitcoins are lost that means the secret “private keys” were lost.
  • If Bitcoins are stolen that means that the private keys were compromised and used to transfer funds to another address.

Bitcoin Uses a Shared Ledger that Everyone can see called the “Blockchain” and transactions adjust the balances within the ledger

  • Everyone sees the Blockchain ledger and all Bitcoin transactions that have ever taken place.
  • The shared ledger is called the “Blockchain” because sections or “blocks” with new transactions are added and they are “chained” together using mathematics for verification.
  • The Blockchain is shared by p2p technology.
  • A Bitcoin transaction changes the shared Blockchain ledger.
  • Sending Bitcoins is Like Sending an Email to the end user.
  • Everyone sees transactions broadcast on the Bitcoin network and the changes made to the shared Blockchain ledger.
  • Many web sites have Blockchain “explorers” where they display the data, sometimes combining it with other data.
  • The shared Blockchain ledger is a shared database and is not any individual web site or service.
  • IP addresses or other identifying information are not part of the Blockchain data.

A Bitcoin wallet is a collection of Bitcoin addresses along with the secret “private keys” needed to adjust the Blockchain ledger

  • A Bitcoin wallet does not contain any Bitcoins.
  • A Bitcoin Wallet is a Collection of Bitcoin Addresses and the associated secret “private keys” needed to adjust the shared Blockchain ledger.
  • A Bitcoin address is a long string of letters and numbers and is usually displayed as a link or QR Code:  1JoEoube3F822qAunTF1U7mv9VQmEtcupD
  • A Bitcoin address is randomly generated in the Bitcoin wallet along with the secret “private key” password needed to process transactions for that address and is available to use immediately.
    • There are more Bitcoin addresses than atoms in the Earth so the system is protected from two users generating the same address by the huge number of available addresses.
  • A Bitcoin Wallet is more like a key chain than a wallet.
  • A Bitcoin Wallet scans the Blockchain and adds up all the balances of all the addresses in your wallet.
  • A Bitcoin address is can be seen in the Blockchain ledger once it is used for a transaction.
  • A Bitcoin Wallet is not in the Blockchain, only individual addresses.
  • Users can generate and store “private keys” in a “cold wallet” which is a computer that is never online for maximum security.
  • Transactions can be “signed” with the secret “private keys” using offline computers to prevent online theft.
  • A user can verify they own a Bitcoin address by using the secret “private key” to” sign” a phrase and the public address can be used to verify the “signature” of the message.
  • A Bitcoin wallet automatically creates new addresses called “change” addresses when transactions are conducted to enhance privacy.
  • If you have 3 bitcoins and you send 1 bitcoin another new address is created and the 2 bitcoins left over (the “change”) is sent to a newly created “change” address in your wallet.









Bitcoin “Mining” adds or “confirms” transactions to the shared Blockchain ledger

  • Bitcoin “mining” is the way a consensus is achieved in a decentralized manner.
  • Bitcoin mining is a contest where computers try to solve a math problem.
  • The “winner” gets to add a new section to the Blockchain ledger called a “block” that contains data about recent transactions, information about the previous block, and the miner’s payment address.
  • Blocks are “chained” together using mathematics so each block depends on all the blocks before it for verification purposes so the ledger is called the “Blockchain.”
  • If any data in the block is changed the solution to the math problem will be wrong and the block will be rejected by users running “Full Nodes” using the Bitcoin Core software.
  • The winner of the contest keeps the transaction fees and gets a “block reward.”
  • Users running “Full Nodes” by running the Bitcoin Core software “validates” transactions and blocks and only propagate those that fit within the rules of the Bitcoin Core software.
  • Confirmation times are about 10 minutes on average but could be shorter or longer since it is random.
  • Miners decide which transactions to accept so using a  small or no transaction fee may cause a delay in conformation until a miner who accepts the transaction solves a new block in the Blockchain.
  • The size of blocks in the Blockchain is currently limited and can accommodate about 7 transactions per second and would only be a problem if this rate were to be exceeded for an extended period since transactions can be in the next block should one be filled.

Bitcoin Mining Uses “Proof of Work” to Achieve a  Consensus in a Decentralized Manner

  • Each Bitcoin Miner is using computers to try to solve a math problem.
  • The average amount of computational power needed to solve the problem is known.
  • A “bad actor” would need more computational power than everyone else combined to consistently solve the problems.
    • A 51% attack is where one entity controls most of the computational power of the Bitcoin network and does nefarious things.
  • The users running Bitcoin Core software to run “Full Nodes” only propagate transactions and blocks that fit within the rules of the software.
  • The Blockchain that took the largest amount of computational power is accepted as the authentic ledger by the Bitcoin users running “Full Nodes.”
  • The nomenclature is that “Full Nodes” “validate” transactions and the miners “confirm” transactions.

The Bitcoin Network is many Bitcoin users running “full nodes” that “validate” and propagate Bitcoin transactions and miners that “confirm” the transactions

  • Users operate “Full Nodes” by running the Bitcoin Core software and they “validate” and propagate transactions and share the Blockchain ledger using p2p.
  • “Miners” record and “confirm” transactions and broadcast new blocks to the “Full Nodes.”
  • “Full Nodes” automatically connect to other nodes when connected to the network.
  • “Full Nodes” propagate transactions and new blocks found by miners that fit the Bitcoin rules as well as sharing the Blockchain ledger with other nodes.
  • Users can change the version of the software they run to decide which transactions and blocks to propagate.
  • Changing the shared Blockchain data will result in other “Full Nodes” rejecting the data because the mathematical verification will fail.
  • Full nodes may not propagate transactions that are too small and/or have small or no transaction fees a spam prevention measure but those settings are generally configurable.
  • Some services try to map full nodes and make inferences about the IP addresses where transactions originate but connections are configurable and users can avoid being seen on the entire network.

Transactions are irreversible after multiple confirmations

  • The shared Blockchain ledger is shared among thousands of users running “Full Nodes” using the Bitcoin Core software so that no central authority has control to adjust the ledger.
  • The Block Chain is secured by the amount of computational work it would take to change it.
    • For example, If a bad actor wanted to change the Blockchain for the last 10 blocks they would need to solve the math problem 11 times faster than the rest network would solve it just 1 time.
  • When a block is added to the Blockchain they are said to have “1 confirmation.”
  • Mining is a race to get the longest blockchain so different versions of the Blockchain often propagate through the network.
  • When one version of the Blockchain eventually wins some blocks get “orphaned” and deleted from the main Blockchain.
    • If a block is orphaned the transactions go back into the pool of available transactions and the miner loses the transaction fees and the block rewards.
    • Miners cannot spend block rewards and transactions fees until 99 more blocks (100 confirmations) are found in case blocks get orphaned.
  • As a general rule of thumb users should wait 6 confirmations (that means 5 new blocks have been found after the transaction was included in a block) because the odds of fork lasting more than 6 blocks is very small.
    • A user could potentially “double spend” the same coins during the period when the transaction is waiting for confirmation after getting orphaned.
    • “Double spending” means a users broadcasts a transaction that spends the same bitcoins with the hope that the second transaction will be confirmed and invalidate the original transaction.
    • Merchant services companies report little or no issue with “double spending” in practice.
    • Some merchant services offer flexible settings as to how many confirmations are required before payments are approved since it only affects purchases where products are delivered immediately.
  • “Green Addresses” are Bitcoin addresses known and trusted by a merchant and they may accept transactions without concern for confirmations.

Bitcoin Mining is solving a math problem.

  • The problems solved by the Bitcoin mining process serves no purpose other than to secure the Bitcoin network.
  • Bitcoin mining energy use is comparable to the resources used in traditional currencies and payment systems for counterfeiting, fraud, printing paper money, etc.
  • The “difficulty” of the math problem being solved is adjusted up or down depending on how much computational power is being used to solve the problem.
    • Bitcoin is designed so the average block time is solved in 10 minutes.
    • The difficulty is adjusted every 2016 blocks which is approximately 2 weeks.
    • Since Bitcoin mining has been increasing rapidly, and the “difficulty” adjustments take a couple weeks blocks are being solved quicker than every 10 minutes on average.
  • The math problem generally cannot be used for other purposes because the requirements are:
    • The problem must be hard to solve but easy to verify since thousands of “Full Nodes” running on computers with limited resources must verify the solution.
    • The average time to solve the problem must be known and can be adjusted as needed.
    • The problem cannot be solved “offline” in an arbitrary amount of time and must depend on the block most recently solved.
  • The math problem that is solved is to do cryptographic hashes of the block data and look for a minimum number of leading zeros.

Bitcoin Mining is a way to distribute Bitcoin

  • Bitcoins are initially distributed by “mining,” or solving one of the math problems to add a new block of the shared Blockchain ledger.
  • Miners not only get the transaction fees, they get a “block reward” which is currently 25 Bitcoins.
  • The block reward gets “halved” about every 210,000 blocks which is about 4 years.
  • Block rewards started as 50 bitcoin and was reduced to 25 bitcoin in late 2012 and the next halving in 2016 will bring it down to 12.5 bitcoin.
  • The halving process continues until 2140 when the reward is smaller than the 8 decimal digits currently available in the Bitcoin protocol.

A Bitcoin Transactions May or May Not Require a Transaction Fee

  • Transaction fees go to the Bitcoin “miners.”
  • Bitcoin mining is based on a free market incentive system where the transaction fees pay for the computer resources of the Bitcoin miners.
  • Bitcoin Transaction fees generally depend on the amount of data being sent rather than the amount of the transaction.
  • The “age” of the coins and other factors also affect the transaction fee to prevent users from creating large numbers of useless “spam” transactions.
  • Bitcoin miners may decide on which transactions to accept and “confirm.”
    • Transactions with small or no transactions fees may not be confirmed quickly if some miners who are solving the math problems don’t accept the transaction.
    • Unconfirmed transactions eventually get deleted from the pool of available transactions but some wallets and online services may continue to rebroadcast the transactions for a period of time.
    • Spending the same Bitcoins in another transaction that gets “confirmed” would invalidate a “stuck” transactions that has not been confirmed.
  • If many tiny amounts are grouped together in a single transaction the fee could exceed the value of the transaction since the fee depends on the amount of data.
  • Private service can conduct “off-Blockchain” transactions to reduce fees for micropayments.
  • Some Bitcoin wallets claims fees are “required” when they actually not be and some online wallets require fees higher than required.

Bitcoin mining is normally done in Pools

  • Due to the amount of computer power needed to find a block most smaller miners operate in pools where they all try to solve the same problem and split the revenue.
  • Trying to solve blocks individually may be high risk due to the low probability and rising “difficulty” which makes the math problem more difficult to solve.
  • Pool mining guarantees income over the short term but the mining pool charges a fee.
  • “Solo” mining software no longer works with today’s fast equipment but miners can run the pool software themselves.
  • Miners can change pools quickly.
  • A 51% attack is where a single entity has the majority of hashing power and can do nefarious things but
    • This affects the exchange rate and miners with Bitcoin holdings have incentives to switch pools.

Bitcoin Transactions Have Rich Features

  • Bitcoin transactions have a programming language allowing for many complex transaction types not yet widely used.
  • multisignature transactions (where more than one party needs to approve or “sign” a transaction with their “private key”), reversibility, transactions to be done in the future, etc. are all possible.
  • Other systems, sometimes called “Bitcoin 2.0,” use the Bitcoin Blockchain to manage other types of property or offer other features.
  • Advanced transactions may pay for Bitcoin mining infrastructure in the future.

Bitcoin is based on Mathematics

  • Bitcoin is based on a branch of mathematics called cryptography.
  • Bitcoin addresses uses Elliptical Curve Cryptography.
  • Cryptographic “hashes” are used which are a one-way function used to verify things and it is not possible to get the original input from a hash.
  • Encryption scrambles things that can later be “de-scrambled” or decrypted with a key.
  • Bitcoin private keys are often protected by encryption for security but encryption itself is not part of the Bitcoin protocol.
    • All encryption is cryptography but all cryptography is not encryption.
  • Bitcoin addresses are calculated from a randomly generated private/public key pair.
    • While the public key can be used directly a public address is used because:
      • Multiple cryptography algorithms are used so if one system has a weakness the private key still cannot be reversed from the public address.
      • The Bitcoin address is shorter than the public key.
      • The Bitcoin address has a checksum to help detect errors.
      • The Bitcoin address has a version number to allow additional features such as transaction scripting (“pay to script hash” or “P2SH”)

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>