Crypto / Blockchain Basics

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.

Main Components:

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.

Great resources available here and here by Anders Brownsworth to visually see how blockchains are cryptographically linked (related: see mining below).

Hashing Algorithm / SHA256

A hash algorithm is a mathematical function that converts a numerical input value (ex. digital data) into another compressed numerical value.

Key characteristics:

  • Hash functions take an input of any random size (from a single character to a whole encyclopedia and more) and produce an output of a fixed size.
    • The same input should always produce the same output => across different inputs, outputs should always be unique.
  • Hash functions are “one-way”, i.e. they can not be reverse engineered starting with the output to reconstruct the input => this is b/c information may be thrown away when using mod 2 to 32 power
    • Note: Hash functions are not encryption => encryption is intended to be reversible

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:

  • Proof-of-Work (PoW)
    • Bitcoin & Ethereum use this method today
    • Refer to the Mining section above as this essentially describes the process => miners perform computationally “expensive” work to solve a mathematically constrained puzzle. Solving the puzzle represents proof-of-work
    • PoW is intentionally costly and inefficient => see “Scalability Trilemma” further down this page
    • PoW is very energy intensive and often criticized as being extremely resource wasteful for a blockchain at Bitcoin’s scale
  • Proof-of-Stake (PoS)
    • PoS networks are not reliant on the mining process like PoW, instead they use a process called staking
    • Users (aka validators) stake funds (usually their own tokens) in this system. The bigger a validator’s stake, the more they can validate and earn rewards in return. Attempting to validate incorrect transactions will jeopardize their staked investment.
    • Ethereum is in the process of moving from a PoW consensus system to one that is PoS => details here


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.

  • Public Key
    • Used to encrypt data
    • Can not be used for decryption => will only return gibberish
    • Can be openly distributed/exposed.
      • Private key can not be derived or reverse engineered from the public key
  • Private Key
    • Used to decrypt data that was encrypted with a paired public key
    • Should never be shared with anyone.

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 Wallet

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).

  • Private keys are used to authenticate asset ownership and to encrypt the wallet
    • Whoever has access to a wallet’s private keys also controls the funds in the wallet
  • Public keys are used to create public addresses and to ID the wallet to receive funds.
    • For example, a Bitcoin public wallet address looks like: 3DW6sYVSTMeu1oxt29UqaisBLm7PgRQrYh
      • This address represents a unique wallet ID (it’s mine!) and can be used to send Bitcoin to (…feel free, I really won’t mind)
  • Cryptocurrency transactions are transacted through a 26-35 alphanumeric character address stored in a user’s digital wallet
  • The address does not have a user name attached to it but ALL transactions (with their from/to addresses) are visible on a blockchain
  • In this sense, many cryptocurrency transactions (like BTC) are more traceable than cash … and are not entirely anonymous. Transactions are pseudonymous b/c “sometimes” forensics analysis can trace activity back a person’s real-world ID.

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.

Protocols - Layer 1

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

  • Term attributed to Ethereum founder Vitalik Buterin
  • Illustrates the trade-off blockchain projects need to consider to balance their architecture between: decentralization, security, and scalability
  • Bitcoin chose to optimize for security and decentralization, thus scalability lags (image below).

Layer 2 Solutions

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 - Decentralized Finance

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:

  • Protocols for trading, lending, and investing
  • Stablecoin usage to provide liquidity

Key Attractors

  • Eliminates fees that banks and other FI’s charge for using their services
  • You hold your money in a secure digital wallet instead of keeping in a bank
    • Deposit & other UC’s your money is held in a smart contract
  • Anyone with an internet connection can participate without needing approval
  • Funds are transferred in seconds or minutes
  • Ability to participate in many of the revenue generating activities that are typically reserved for banks or large FI’s.

Defi vs. CeFi vs. Traditional Finance

DeFi Building Blocks


My blog post links


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.

Three types of stablecoins

  • Fiat-Collateralized - Most common type, examples include Tether, USD Coin, and True USD => 1 token equals $1 => companies backing these tokens, in theory, deposit $1 in a reserve account for every token that gets issued, the reverse happens when tokens are redeemed.
  • Crypto-Collateralized - A basketful of other crypto currencies are held to back the value the token. Because of crypto volatility, these are heavily over collateralized such that $1 in token value is generally backed by at least $2 of other crypto assets. DAI is a popular crypto backed stablecoin.
  • Algorithmic - As the name implies, an algorithm is employed to help the associated token maintain it’s value. Often this is a peg to the US dollar. In practice however, alogorithmic stablecoins have had a hard time maintaining their pegs over long periods of time and subsequently are not as popular or widely used as the other types of stablecoins.

Why Use Stablecoins

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.

Central Bank Digital Currencies (CBDC’s)

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).

Challenges and uncertainties of creating and issuing a CBDC - from a Central Bank’s Perspective

  • Financial Stability & potential to increase ease of bank runs
  • Changes to existing commercial bank’s deposit and funding models
  • Effects on credit allocation and the economy
  • Monetary policy implementation & transmission
  • Resilience of Open Payment Infrastructures

Design considerations facing central banks:

  • Make widely accessible issue wholesale only?
  • Token (eMoney) or Account (eDeposit) based
  • Issuer? => Central Bank, Commercial Bank, or others?
  • Degree of Anonymity
  • Transfer Mechanism
  • Limits or Caps
  • Interest Bearing and level of Account Services

The Money Flower

Highlights the various combinations of four key properties:

  • Issuer (central bank or other)
  • Form (digital or physical)
  • Accessibility (widely or restricted)
  • Technology (token or account based)
    Note: Areas marked 1, 2, 3 in the image above highlight the sources of the money supply (or money stock) in the US. For more information see discussion under Central Banking how money is created and expanded in the economy.

Central Banks and digital currencies - Speech by Ben Broadbent - Bank of England (pdf download)

News / Charts



Crypto Strategies - Payment Networks


  • Wants digital assets to become as big as they can be, and Visa wants to build the bridge to connect traditional businesses with …“the future of money”..
  • Reports having processed over $3.5B in crypto linked digital transactions in 2021
  • Crypto linked cards - easy way for consumers to make purchases using digital currencies without requiring stores to directly accept digital assets as payment. Visa handles the crypto to fiat conversion automatically …and presumably pays itself a nice little conversion fee.
  • Have double their number of collaborations with cryptocurrency platforms in last 18 months => 60+ partnerships with crypto platforms like FTX, BlockFI, Coinbase, Binance as part of card launch program