Image for post
Image for post

Bitcoin: The First Cryptocurrency

By Akshat Verma on ALTCOIN MAGAZINE

Akshat Verma
May 27, 2019 · 13 min read
Image for post
Image for post
Credit: bitcoinist.com

itcoins were invented by a person or a group of people using the name, Satoshi Nakamoto and released as open-source software in 2009. The basic goal of introducing bitcoin was to eliminate the role of a central authority for a peer-to-peer transaction of funds. This was accomplished by introducing a decentralized platform based on Blockchain Technology.

Image for post
Image for post
Credit: E-learning Spot — altervista

Are Bitcoin And Blockchain The Same Thing?

No, they are not! However, they are closely related. When bitcoin was released as open source code, blockchain was wrapped up in the same solution. Since bitcoin is the first application of blockchain, people started using the term “bitcoin” for the blockchain. This is where all the misunderstanding started.

If Bitcoin and Blockchain Are Not The Same Then What Is A “Bitcoin Block”?

Blocks are files where data pertaining to the bitcoin network is permanently recorded. A block records some or all of the most recent Bitcoin transactions that have not yet entered any prior blocks. Thus, a block is like a page of a ledger or record book. Each time a block is ‘completed’, it gives way to the next block in the blockchain. A block is thus a permanent store of records which, once written, cannot be altered or removed.

The Bitcoin Network

The bitcoin network is a peer-to-peer payment network that operates on a cryptographic protocol. Users send and receive bitcoins, the units of currency, by broadcasting digitally signed messages to the network using bitcoin cryptocurrency wallet software. Transactions are recorded into a distributed, replicated public database known as the blockchain, with consensus achieved by a proof-of-work system called mining.

How Big Is The Bitcoin Network?

Image for post
Image for post
Credit: www.statista.com
  • The size of the Bitcoin network has experienced consistently high levels of growth since its creation, reaching approximately 210 gigabytes in size as of the beginning of April 2019. The bitcoin network is a distributed database that contains a continuously-growing and tamper-evident list of all Bitcoin transactions and records since the date of its initial release in January of 2009.
  • Nearly 1 million IP addresses are getting added to this network per month. There are only 5–10 k fully validating nodes or the nodes that are always connected to the network.

What Are Fully Validating Nodes And What Do They Do?

The fully validating nodes are the computer systems that are always connected to the bitcoin network. Fully validating nodes maintain the track of UTXO set. UTXOs are Unspent Transaction Outputs. Currently, there are more than 75 million UTXOs.

The collection of all UTXO in a bitcoin network collectively define the state of the bitcoin blockchain.

UTXOs are referenced as inputs and outputs. The transfer of bitcoins from sender to receiver initializes the request to send from one or more UTXOs to one or more newly created UTXOs as requested by the sender.

Structure Of UTXO

The structure of UTXO consists of:

  1. Unique identifier of the transaction that created the UTXO.
  2. Index of this UTXO in the transactions output list.
  3. Value or amount it is created for.
  4. Optional: Conditions under which the output can be spent.

The optional condition may or may not be present in the structure depending on the conditions.

Structure Of Transactions

The structure of transactions in a bitcoin blockchain consists of:

  1. Reference number of the current transaction.
  2. Reference(s) to one or more input UTXOs.
  3. Reference(s) to one or more output UTXOs.
  4. Total input amount and output amount.

NOTE: Transactions bring about the transfer of values in a bitcoin blockchain while the concept of UTXO defines about input and output of such a transaction.

How Many Type Of Nodes Are There In The Bitcoin Network?

These are the list of nodes that we can have on a bitcoin network:

  • Full Blockchain Node: Contains full blockchain database, and network routing capabilities
  • Solo Miner: Contains the mining function, the full copy of the blockchain database and the network routing capabilities.
  • Lightweight (SPV) Wallet: Contains a wallet and network routing capabilities.
  • Reference Client (Bitcoin Core): Contains a wallet, a full blockchain database, a miner and the network routing capabilities.
  • Pool Protocol Servers: These are gateway routers connecting the P2P network nodes running other protocols such as pool mining nodes or Stratum.
  • Mining Nodes: Contains the mining function without the full copy of the blockchain, instead, they have the Stratum protocol or other pool mining protocols.
  • Lightweight (SPV) Stratum Wallet: Contains the wallet and the network capabilities on the Stratum protocol without the blockchain.

Hard Coded Limitations Of Bitcoin

  1. 10 minutes average creation time per block.
  2. Only 1 million bytes can be entered in a block.
  3. A total of 20,000 signature operations can be there in a block.
  4. The total number of bitcoins can be 21 million.
  5. 1 bitcoin =100 Million Satoshi.
  6. The bitcoin mining reward is decreasing every four years as 50(2009), 25(2012), 12.5 (2016)…, which affects economic balance.

How To Store And Use Bitcoin?

Before moving on to this question, we should ask ourselves that we want to spend bitcoin, what are the details that are required for this?

Answer:

  1. Some info from the public blockchain
  2. The owner’s secret signing key.

Hence, it’s all about key management! We need to know how to store and use secret keys to be able to spend bitcoins.

To store and use bitcoin, one of the following methods can be adopted:

Simple Local Storage

Simple local storage can be divided into three types:

  1. Store the key in your device, like a phone or a computer. If the device is lost, the key is lost. If the device is hacked, the key is compromised.
  2. Wallet Software: The wallet software provides a nice user interface and provides a separate key for each coin.
  3. Encoding: The key can be encoded into base58 notation or can be encoded using a QR.

Hot And Cold Storage

Hot Storage — The coin is stored online. It is convenient to operate but it is risky. Hot storage provides hot secret keys and cold addresses.

Cold Storage — The coin is stored offline. It is archival but safer. Cold storage provides cold secret keys and hot addresses.

The transfer of coins can take place from hot storage to cold storage and vice-versa. But how will hot storage transfer coins if the cold storage is offline?

Solution: The cold storage provides a big batch of addresses/keys to the hot storage beforehand, the hot storage initiates the transfer and when the cold storage comes online, the transfer is completed.

Splitting And Sharing Keys

In this, the cryptographic method of sharing called Secret Sharing is implemented. The idea in this method is that the secret is split into N pieces, such that given any K pieces, can reconstruct the secret given fewer than K pieces, don’t learn anything.

Online Wallets And Exchanges

Online Wallet — It is like a local wallet but “in the cloud” runs in your browser site sends code site stores keys you log in to access the wallet. It is convenient, easy to install, can run on multiple devices. But this leads to security issues.

Bitcoin Exchanges — The bitcoin exchanges accept deposits of Bitcoins and fiat currency ($, €, …). It promises to pay back on demand. It Lets customers make and receive bitcoin payments and also buy/sell bitcoins for fiat currency.

Example: Suppose an account at Exchange holds $5000 + 3 Bitcoin. The owner uses Exchange to buy 2 Bitcoin for $580 each. Hence, the result is that the account holds $3840 + 5 Bitcoin now.

NOTE: No Bitcoin transaction appears on the blockchain! The only effect is that the exchange is making a different promise now.

Bank Regulation: For traditional banks, government typically imposes minimum reserve requirements, i.e., the account must hold some fraction of deposits in reserve. This regulates behavior and investments. It also insures depositors against losses and acts as a lender of last resort. The Bitcoin is not regulated like this!

Proof-of-Reserve Problem: Bitcoin exchanges can prove a lower bound on fractional reserve by providing:

  1. Lower bound for reserves.
  2. Upper bound for liabilities.

Proof-of-Reserve:

  1. Exchange proves that it has at least X amount of reserve currency.
  2. Exchange proves that customers have at most Y amount deposited. So, reserve fraction ≥ X/Y

Payment Services

It is an active environment between merchant and customer. In this scenario, both user and payment service are exposed to exchange rate risk. The user is exposed to some degree since they must hold bitcoins at least temporarily to be able to pay with bitcoins.

Transaction Fees

It costs resources for peers to relay your transaction and miners to record your transaction. Transaction fee compensates for some of these costs. Generally, higher fee means the transaction will be forwarded and recorded faster.

Currency Exchange Markets

Basic Market Dynamics:

  1. Market matches buyer and seller

2. Large, liquid market reaches a consensus price

3. Price is set by supply of Bitcoins and demand for Bitcoins

  • Supply of Bitcoins:

Supply = Coins in circulation (+ demand deposits ?)

When To Include Demand Deposits?

Answer: When they can be actually sold in the market.

  • Demand for Bitcoins:

Bitcoins are demanded to mediate fiat-currency transactions. They are also demanded as an investment if the market thinks demand will go up in the future.

Simple Model of Transaction-Demand

T = total transaction value mediated via Bitcoin ($ / sec)

D = duration that Bitcoin is needed by a transaction (sec)

S = supply of Bitcoin(not including BTC held as long-term investments)

T/P Bitcoins needed per second

S/D Bitcoins become available per second

Equilibrium: P = TD/S

This model has only two sources of demand: Mediating fiat currency transaction and investment.

NOTE: Theoretical models often leave out sine factors that matter in practice in order to keep the analysis tractable.

BITCOIN MINING

Image for post
Image for post
Credit: CoinDesk

The simple steps of initiating bitcoin mining are as follows:

  1. Join the bitcoin network and start listening for transactions.
  2. Listen for the new blocks to maintain the blockchain.
  3. Assemble a new valid block.
  4. Find the nonce to make your block valid.
  5. Hope everybody accepts your new block.
  6. Profit!

Mining Hardware

The hardware used for Bitcoin mining is known as Bitcoin ASICs (Application Specific Integrated Circuits).

These are special purpose hardware which is designed to run constantly for life. They require significant expertise, long lead times. They are perhaps the only chips that are developed at such fast rates. An example of Bitcoin ASIC is Terra Miner IV.

An ASIC allows miners to use hardware made specifically for Bitcoin Core or other SHA-256 algorithm coins.

SHA-256: SHA stands for Secure Hash Algorithm. SHA-256 is a member of the SHA-2 cryptographic hash functions designed by the NSA. Cryptographic hash functions are mathematical operations run on digital data; by comparing the computed “hash” (the output from execution of the algorithm) to a known and expected hash value, a person can determine the data’s integrity. A one-way hash can be generated from any piece of data, but the data cannot be generated from the hash.

SHA-256 is a general-purpose hash function that remains unbroken in cryptography.

MINING POOLS

Goal: Pool participants all attempt to mine a block with the same coinbase recipient. They send money to a key which is owned by the pool manager.

  • The pool manager distributes money to members based on how much work they have performed(minus the cut for pool manager).
  • This makes mining more predictable, allows for small miners to participate and more miners start using updated validation software.
  • It leads to centralization and discourages miners from running full nodes.

MINING INCENTIVES AND STRATEGIES:

The strategies are decided using a game-theoretic analysis of mining. There are several strategic decisions that are taken. These are:

  • Which transaction to include in a block.
  • Which block to mine on top off.
  • How to choose between colliding blocks.
  • When to announce the new blocks?

Bitcoin blocks are subjected to:

  • Block with-holding attacks- If a miner finds a block, they keep a secret.
  • Forking attacks (these own more than 50% of the network).
  1. Punitive forking — Blacklisting a transaction from an address X. Strategy: The miner announces that they will refuse to mine on any chain with a transaction from X.
  2. Feather forking — To blacklist a transaction from X, the miner announces that they will refuse to mine directly on any block with a transaction from X but they will consider after n confirming blocks.

Anonymity Property

Anonymity in Computer Science is a sum of pseudonymity and unlinkability.

Image for post
Image for post
credit: Bitcoin wiki

Pseudonymity — Pseudonymity, a word derived from a pseudonym, meaning «false name», is a state of disguised identity. The pseudonym identifies a holder, that is, one or more human beings who possess but do not disclose their true names (that is, legal identities). Most pseudonym holders use pseudonyms because they wish to remain anonymous, but anonymity is difficult to achieve and is often fraught with legal issues.

Unlinkability — Unlinkability is different interactions of the same user with the system should be linkable to each other.

True anonymity requires unlinkability, such that an attacker’s examination of the pseudonym holder’s message provides no new information about the holder’s true name.

Need for anonymity property?

  • Blockchain-based currencies are totally, publicly and permanently traceable.
  • Without anonymity, privacy is much worse than traditional banking.

Consensus In Bitcoin

What is consensus?

A consensus is a fault-tolerant mechanism that is used in computer and blockchain systems to achieve the necessary agreement on a single data value or a single state of the network among distributed processes or multi-agent systems. It is useful in record-keeping, among other things.

Image for post
Image for post
  • Consensus about rules: It defines the kind of blocks that are going into the blockchain.
  • Consensus that coins are valuable: The coins are valuable because they are owned.
  • Consensus about history: It defines the history of the block. Through this, the peers agree on who owns which coin.

There are different kinds of consensus mechanism algorithms which work on different principles.

Bitcoin Core Software: It is the most widely used, open source (MIT License) consensus mechanism algorithm. Those who don’t use this, follow its rules.

Bitcoin Improvement Protocols(BIPs): It is a “formal” proposal to changes to Bitcoin including tech specifications and ratio value. It is published in a numbered series. Each BIP has a champion to evangelize/coordinate. Other types of BIPs are Information BIPs, Process-oriented BIPs.

Anti Money Laundering: This is operated by the government through KYC (Know Your Customer). This identifies and authenticate clients, evaluates the risk of the client, watch for anomalous behavior.

Alternative Mining Puzzles: Puzzles are the core of Bitcoin. Incentive system steers participants. Puzzles are difficult to solve, so attacks are costly but they are not hard, so honest miners are compensated.

Puzzle Requirements: It should be cheap to verify, it should have adjustable difficulty and the chance of winning should be proportional to hash power such that large players get proportional advantage and even small players get proportional compensation.

Proof-of-Useful Work:

  • Differs from the traditional volunteer distributed computing projects because cryptocurrencies cannot rely on a trusted administrator to select and distribute the problems to be solved.
  • Should preferably be based on problems whose solutions benefit the public, rather than the solver, to avoid skewing the incentives of miners.
  • Have not been used preferably to solve computational problems such as protein folding.

Virtual Mining — Proof-of-Stake: The proof of stake (POS) is another common consensus algorithm that evolved as a low-cost, low-energy consuming alternative to POW algorithm. It involves allocation of responsibility in maintaining the public ledger to a participant node in proportion to the number of virtual currency tokens held by it.

Benefits of virtual mining: Lowers overall costs and 51% is even harder (but possible).

Validations of Virtual Mining:

  • Proof-of-Stake: “Stake” of a coin grows over time as long as the coin is unused.
  • Proof-of-Burn: Mining with a coin destroys the coin.
  • Proof-of-Deposit: Can reclaim the coin after some time.
  • Proof-of-Activity: Any coin might be a coin.

Virtual mining does away with most of the power requirements of proof-of-work systems. Several variations of virtual mining have been proposed.

Applications Of Bitcoin

There are several applications of Bitcoin:

  1. Bitcoin can be used as a platform.
  2. Bitcoin can be used as smart property.
  3. Bitcoin can be used randomness source.
  4. Bitcoins can be used in decentralized prediction markets.
  5. Bitcoins can also be altered by forking to create a new type of coins or altcoins. All the altcoins are built either by forking main chain of bitcoins or by taking bitcoin blockchain’s reference.

The Future Of Bitcoin?

The U.S Treasury has identified bitcoin as a virtual currency, while it’s more commonly described as the first cryptocurrency and the largest of its kind by total market value, currently being $19.2 billion.

There’s a long road ahead and technology will need to improve and limitations will need to fall away, but with governments and regulators the world over beginning to take a more pragmatic view and understand the need to legitimize in the interest of anti-money laundering and other preventative policies, Bitcoin could well benefit from central banks’ advancement and development of distributed ledgers.

About the Author

Akshat Verma is currently pursuing his Bachelor of Technology in Electronics and Communication Engineering at National Institute of Technology, Raipur (Chhattisgarh, India). He is a final year undergraduate student. He is very deeply inclined towards Blockchain Technology. He is also currently enrolled in a Research and Development Internship at Kerala Blockchain Academy.

The Capital

A publishing platform for professionals now available on https://thecapital.io

Sign up for Try The Capital Platform at thecapital.io

By The Capital

Head over to https://thecapital.io, sign up and publish your first article today! Take a look

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox
Medium sent you an email at to complete your subscription.

Akshat Verma

Written by

Senior Undergraduate Student at National Institute of Technology, Raipur || Blockchain Specialist

The Capital

A publishing platform for professionals in business, finance, and tech

Akshat Verma

Written by

Senior Undergraduate Student at National Institute of Technology, Raipur || Blockchain Specialist

The Capital

A publishing platform for professionals in business, finance, and tech

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store