Cryptocurrency => A cryptographically protected electronic currency that is a purely peer-to-peer version of electronic cash that allows online payments to be sent directly from one party to another (via digital wallets) without going through a financial institution. Transactions are recorded on a blockchain with timestamps by hashing them into an ongoing chain of hash based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work.
Blockchain => distributed ledger => database
A blockchain refers to a type of digital ledger (database) that stores data in a distributed manner across many computer nodes. Data records are stored in “blocks” or chunks that are cryptographically linked together and built up sequentially over time like a chain. Because the data is cryptographically encoded and linked it is considered immutable once it is placed in a block and accepted across the network nodes.
Hashing Algorithm / SHA256
A hash algorithm is a mathematical function that converts a numerical input value (ex. digital data) into another compressed numerical value.
How is hashing relevant to blockchain based cryptocurrencies? => It’s the cryptographic glue that securely links the blocks together (among other things). The contents of block 1 produce a hashed output that is used to link to block2. That cryptographic link as well as all the contents of block2 produce a hashed output of block2. The critical observation here is that if the contents of block1 were ever changed you would never be able to generate the same hashed output of block2 again => and break/invalidate the hashed output for every subsequent block on the chain (=> see Merkle Trees 1, 2). This structure is what provides data integrity to the blockchain and makes it immutable (see prior section and examples by Anders Brownsworth).
Secure Hashing Algorithm (SHA)-256 is the hash function and mining algorithm used by the Bitcoin protocol and many other altcoins. Ethereum uses a hash function known as Keccak-256. It falls into a family of hash functions known as SHA-3, whereas SHA-256 falls into the SHA-2 family grouping.
These video references do a good job explaining some of the math and underlying mechanics for how SHA-256 works.
Here’s a site that visually explains SHA-256 step-by-step. For the really curious, here’s a quick review of how alphanumeric and other character sets are encoded and stored on computers …then have fun with this site detailing UTF-8 …. more than you ever wanted to know… :-)
Mining is the process where “crypto miners” compete using specialized computing hardware to be the first to “discover” a specially formatted hash function output to link two blocks together. Miners are incented to do this because they earn bitcoin when they are the first. The incentive helps attract a lot of miners, which on a distributed platform helps prevent any single miner or group of miners from gaining the upper hand to control or corrupt the system => see 51% Attack. In Bitcoin’s case, mining is the only method by which coins enter circulation and there is a hard cap of 21 million coins that will ever be produced. 19 million have been mined so far and it is expected to hit 21 million roughly by 2140. While miners are incented with bitcoin to use their computing power to “mine blocks”, this process is really a tool to validate transactions as they occur on the chain => the purpose of this validation is prevent occurrence of the double spend problem.
A consensus mechanism is a fundamental and critical component in any blockchain protocol. It addresses the need of how to achieve consensus (i.e. agreement) across a computer network that is geographically distributed, independent, and may have bad actors present. This condition is also known as the Byzantine General’s Problem. Consensus across nodes is required before a transaction can be registered in the ledger and incorporated into a block.
While there are many alternative consensus mechanisms discussed in the press, the two that matter today are:
Public-Key Cryptography (PKC)
Cryptocurrencies make use of what is known as Public key cryptography (PKC). PKC is an encryption technique that uses a paired key algorithm, one public and one private key (aka asymmetric cryptography) for secure data communication. The public key can be used by anyone (Alice, Bob, etc.) to construct a message intended for Charlie. Charlie is the only person with the private key and therefore the only person that can decrypt a message that was encrypted with his public key.
Many modern computer systems employ PKC technology in a variety of applications. In cryptocurrency PKC is used to setup and secure digital wallets. The wallet address is derived from the public key. The private key pair is also used for the creation of digital signatures and transaction verification => i.e. validating that you are the wallet owner and for managing the wallet contents, so it’s imperative that the private key is never shared.
Digital signatures are used to confirm transactions. Only with a valid digital signature will a transaction be added to a blockchain ledger. Bitcoin, Ethereum, and other blockchains use a specific algorithm to verify transactions called Elliptic Curve Digital Signature Algorithm (ECDSA). Unlike other applications of asymmetric cryptography, this algorithm creates digital signatures without encryption (… b/c this offers the same level of security as RSA, but creates much shorter key lengths => more efficient use of blockchain space).
Crypto wallets allow users to store and manage their crypto assets. A crypto wallet can be purely digital, like a software program on your desktop or mobile device (see MetaMask, Exodus Desktop, etc.) or hardware based like the one of the Ledger products that connect to your devices via bluetooth. Which is right for you will depend on your needs.
Crypto Wallets depend on PKC technology (see section above).
When you buy cryptocurrencies on an exchange, like coinbase, you can let them hold the assets for you. In this case, they are your custodians for those assets. The difference is that the exchange is holding the assets in a digital wallet they control instead of you, only they have the private key. The meme “not your keys, not your coins” comes from this because of stories about exchanges going bust or being hacked and bitcoins getting stolen from people’s accounts (see Mt. Gox). That may have been more true in the early cryptocurrency days, but today most reputable exchanges have insurance against such hacks and most assets would be refunded => see Coinbase hack. Still, some people will transfer their crypto assets from an exchange and into a crypto wallet they personally control, for example onto a hardware wallet. In short, digital wallets allow cryptocurrency holdings to be transportable. You can keep your holdings on an exchange, move them between exchanges, or just hold them on a personal wallet you control. This risk with a personal wallet is you will be totally out of luck if your private keys are compromised (i.e. fall into the hands of a bad actor) or even lost (see Lost Passwords Lock Millionaires Out of Their Bitcoin Fortunes).
Note: => Right now, a crypto wallet and digital wallet are not exactly the same thing, though the terms are often used interchangeably. ApplePay, Google Wallet, Samsung Pay, and many others are all digital wallets that securely hold credit and debit card information, as well as other data. They do not yet support cryptocurrencies. Paypal has begun to support some cryptocurrencies, so they are probably the closest wallet platform today that supports cryptocurrencies alongside traditional payment methods.
Bitcoin and Ethereum are separate blockchains that were developed under different protocols. So while they make look similar at a high level, under the hood they are really quite different. In this sense, Layer 1 is the term that’s used to describe or refer to the underlying main blockchain architecture.
Here’s a quick list of some of the top Layer 1 blockchain systems today:
Blockchain protocols each prioritize different aspects of the “Scalability Trilemma”
Act as an overlay network that lies on top of the underlying blockchain doing a lot of the work for it.
Many Layer 2 solutions attempt to address scalability for the Bitcoin & Ethereum blockchains
DeFi provides financial services (without the involvement of centralized intermediaries - ex. traditional banks & exchanges) through the use of smart contracts on a blockchain. DeFi differs from traditional finance not so much in types of services it offers, but rather in how it performs them.
The DeFi ecosystem revolves around:
Defi vs. CeFi vs. Traditional Finance
DeFi Building Blocks
Unlike most cryptocurrencies that experience extreme price volatility, stabelcoins are designed to keep their price on par with a unit value of a reference asset. For the biggest stablecoins this reference asset is usually the US dollar. The goal is to keep the price of one stablecoin token priced at $1.00. On many crypto exchanges stablecoins proxy as a dollar equivalent. Stablecoins are useful in many Defi applications and help create liquitity for many marketplaces.
Stablecoins provide value preservation, speed and efficiency. Many people treat stablecoins in their holdings as a cash equivalent with the added value of near instant settlement. Moving funds into physical cash takes time and often carries a cost. As a cash proxy it is far easier and much quicker to move a stablecoin like Tether or USDC across blockchains and exchanges than to try the same with cash.
See my post stablecoin post and discussion about CBDC’s towards the bottom here
Read Behind the Scenes of Central Bank Digital Currency from the IMF (this is a pdf download).
Highlights the various combinations of four key properties:
Central Banks and digital currencies - Speech by Ben Broadbent - Bank of England (pdf download)