Digital Assets


Bitcoin architecture, mining, wallets, and addresses; Bitcoin issues (block size, forks, fees, supply); Ethereum and smart contracts; and digital token typologies and transaction mechanics.

Topics in this chapter

  • Bitcoin: Introduction, Bitcoin Mining, Working Mechanism, Bitcoin Wallets, Bitcoin Address
  • Bitcoin Issues: Block Size, Split, Transaction Fees, Bitcoin Supply and its Future
  • Ethereum: Introduction, History, Comparison with Bitcoin, Actors in the Ethereum Ecosystem, Smart Contracts
  • Digital Tokens: Introduction, Types of Tokens (Native, Asset-backed, Contract, and Utility), and Transactions

Bitcoin Architecture and Mining

Bitcoin Architecture and the UTXO Model

Bitcoin is the first successful implementation of a decentralized digital currency. Its architecture integrates a cryptographically secured, append-only ledger — the blockchain — with a game-theoretically sound consensus mechanism and a set of cryptographic tools for wallet management and transaction authorization. Bitcoin uses an Unspent Transaction Output (UTXO) model, in contrast to account-based ledgers. Each transaction consumes one or more UTXOs as inputs and creates new UTXOs as outputs. The state transition is Ut+1=(UtI)O\mathcal{U}_{t+1} = (\mathcal{U}_t \setminus I) \cup O, subject to the conservation constraint oOv(o)iIv(i)\sum_{o \in O} v(o) \le \sum_{i \in I} v(i), where the residual is the implicit miner fee. An output is encumbered by a locking script (scriptPubKey) that specifies the conditions under which the value can be spent. The input that spends it provides an unlocking script (scriptSig) satisfying those conditions. The sum of input values must equal the sum of output values plus a transaction fee ff: ivin,i=jvout,j+f,f0\sum_i v_{in,i} = \sum_j v_{out,j} + f, \quad f \geq 0. This conservation law, verified by every full node, enforces the integrity of the money supply.

Bitcoin Mining: The Proof-of-Work Consensus

Bitcoin relies on Nakamoto consensus, combining proof-of-work (PoW) with a longest-chain rule. To propose a valid block, a miner must find a nonce such that the double SHA-256 hash of the block header falls below a target TT: H(H(headernonce))<TH(H(\text{header} \parallel \text{nonce})) < T. The target TT is a 256-bit number; its inverse defines the difficulty D=Tmax/TD = T_{\max}/T, where TmaxT_{\max} is the maximum target (difficulty 1). The search for a nonce is a brute-force, memoryless process: each hash trial is an independent Bernoulli trial with success probability p=T/2256p = T / 2^{256}. The number of hashes required to find a valid block follows a geometric distribution with mean 1/p1/p. For a miner controlling a fraction qq of the total network hashrate HnetH_{net}, the expected time to mine a block is approximately 600/q600 / q seconds, since the protocol targets a 10-minute average block interval. The protocol adjusts the difficulty every 2016 blocks (roughly two weeks): Tnew=Tcurrent×tactual2016×600 secT_{new} = T_{current} \times \frac{t_{actual}}{2016 \times 600 \text{ sec}}, with clamping factors to prevent extreme swings. The longest-chain rule (chain with the most accumulated proof-of-work) resolves forks. When two miners find blocks at approximately the same height, a temporary fork occurs; the fork is resolved probabilistically as subsequent blocks are built.

Mining Economics

Mining is a competitive, capital-intensive industry. Miners incur costs for specialized hardware (ASICs), electricity, cooling, and maintenance. Their revenue per block consists of the block subsidy — newly minted bitcoins — and the sum of transaction fees. The subsidy halves approximately every 210,000 blocks (about four years), an event termed the halving. Under perfect competition and free entry, expected profit is driven to zero in the long run: E[R]Cmarginal\mathbb{E}[R] \approx C_{marginal}. Miner expected profit per unit time is πi(hi,Hi)=hihi+HiRΔci(hi)\pi_i(h_i, H_{-i}) = \frac{h_i}{h_i + H_{-i}} \cdot \frac{R}{\Delta^*} - c_i(h_i), where RR is the block reward. On the transaction selection side, miners face a block weight limit (4 million weight units). They solve a knapsack-like optimization: maximize fi\sum f_i subject to wiWmax\sum w_i \le W_{\max}, creating a fee market where users bid for block space.

Bitcoin Wallets and Addresses

A Bitcoin wallet is not a container of coins but a manager of private keys that authorize the spending of UTXOs. Key generation begins with a 256-bit secret scalar dd sampled uniformly from [1,n1][1, n-1], where nn is the order of the secp256k1 elliptic curve. The corresponding public key is the curve point Q=dGQ = d \cdot G, where GG is the generator. Security rests on the hardness of the Elliptic Curve Discrete Logarithm Problem (ECDLP). An address is not the public key itself but a hashed and encoded version: Address=base58check(RIPEMD160(SHA256(Q)))\text{Address} = \text{base58check}(RIPEMD160(SHA256(Q))). This hashing shortens the public key and adds a layer of quantum resistance — until a transaction spends, the public key is not exposed, enhancing pseudonymity. Types of wallets include: non-deterministic (random) where each key is independently generated; deterministic (HD) where keys are derived from a single seed using BIP32/BIP39; hardware wallets where private keys are stored on dedicated secure hardware; and multisignature wallets requiring mm-of-nn signatures to authorize transactions.

Transaction Lifecycle

A Bitcoin transaction proceeds through four stages: (1) Construction — the sender's wallet selects UTXOs, specifies outputs and a fee, and signs each input with the corresponding private key using ECDSA. (2) Signing and broadcast — the signed transaction is broadcast to the peer-to-peer network. (3) Propagation — peers validate the transaction against the current UTXO set and relay it if valid; it enters the mempool. (4) Confirmation — miners include the transaction in a block; as subsequent blocks are built on top, the probability of a chain reorganization becomes exponentially small. Finality in Bitcoin is probabilistic, not deterministic. The probability that an attacker with fraction qq of hash power ever catches up from a deficit of zz blocks is Pz=(q/p)zP_z = (q/p)^z for q<pq < p. For q=0.1q = 0.1 and z=6z = 6, Pz0.0009P_z \approx 0.0009, motivating the conventional six-confirmation rule for high-value settlements.

Bitcoin Issues

The Block Size Debate and Scaling Trade-offs

Bitcoin's throughput is constrained by two parameters: the maximum block size (historically 1 MB, later effectively increased via SegWit to ~4 MB weight units) and the average block interval (targeted at 10 minutes). Maximum TPS: TPSmax=BTλ\text{TPS}_{\max} = \frac{B}{T} \cdot \lambda. With B1B \approx 1 MB, T250T \approx 250 bytes, and λ1/600\lambda \approx 1/600 s1^{-1}, this yields roughly 7 TPS — compared to thousands for centralized payment networks. The block size debate revolves around the trade-off: increasing BB raises throughput but also increases the operational cost for full nodes, potentially reducing the number of independent validators and eroding decentralization. Larger blocks increase propagation delay τ\tau, and if τ\tau becomes significant relative to the block interval, the orphan rate increases, disproportionately penalizing smaller miners. Segregated Witness (SegWit) offered a partial resolution by separating signature data from transaction data, effectively increasing throughput without a hard fork. The weight unit system (4 million weight units per block) allowed blocks up to roughly 4 MB.

Network Forks as Governance Mechanisms

When consensus on protocol parameters fails, the blockchain can undergo a fork — a divergence into two separate chains with a shared history. Forks are either soft forks (tightening consensus rules, backward compatible) or hard forks (loosening rules, not backward compatible). The 2017 block size controversy culminated in a hard fork creating Bitcoin Cash (BCH) with an 8 MB block size. The fork embodies a Coasian bargaining breakdown: stakeholders with different preferences could not agree on a coordinated upgrade, so the chain split. From a governance perspective, a fork is a mechanism for preference revelation and resource allocation within a decentralised system. The resulting prices pAp_A and pBp_B on exchanges signal the relative valuation: pA>pB    E[tδtUi,t(PA)]>E[tδtUi,t(PB)]p_A > p_B \iff \mathbb{E}[\sum_t \delta^t U_{i,t}(P_A)] > \mathbb{E}[\sum_t \delta^t U_{i,t}(P_B)] for the marginal investor. However, forks create uncertainty, split network effects, and can degrade the digital scarcity property.

Transaction Fee Markets

With a limited block size, transaction inclusion becomes a rivalrous good. Bitcoin's fee market operates as a first-price auction. Miners, acting as rational profit-maximizers, select a subset of transactions by solving a 0-1 knapsack problem: maxMiMpisi\max_{M} \sum_{i \in M} p_i s_i subject to iMsiB\sum_{i \in M} s_i \le B. The equilibrium fee rate ff^* clears the market: Q(f)=BˉQ(f^*) = \bar{B}. When demand exceeds capacity, f>0f^* > 0, and users with lower urgency or lower valuation are priced out. Replace-by-fee (RBF) and child-pays-for-parent (CPFP) enable dynamic adjustment of fees post-broadcast. During congestion, fee rates spike dramatically, as in December 2017 and April 2021, when average fees exceeded $50 per transaction.

Bitcoin Supply and Its Future

Bitcoin's monetary policy is governed by a deterministic supply schedule: an initial reward of 50 BTC per block, halved every 210,000 blocks (approximately four years), with a total supply asymptotically approaching 21 million. The subsidy at block height tt: Rt=R02t/hR_t = R_0 \cdot 2^{-\lfloor t/h \rfloor}, where R0=50R_0 = 50 BTC and h=210,000h = 210,000 blocks. The total asymptotic supply: S=k=0hR02k=210,000×50×2=21,000,000S_{\infty} = \sum_{k=0}^{\infty} h \cdot R_0 \cdot 2^{-k} = 210,000 \times 50 \times 2 = 21,000,000 BTC. The stock-to-flow (S2F) ratio, defined as Mt/(ΔMt per year)M_t / (\Delta M_t \text{ per year}), rises over time, making Bitcoin an increasingly scarce asset in flow terms. The Security Budget Problem: As tt \to \infty, the block subsidy 0\to 0. The network's security must be funded entirely by transaction fees. If the fee market fails to generate sufficient revenue, rational miners will exit, causing hash rate to decline. A declining hash rate exponentially reduces the cost of a 51% attack, rendering the network vulnerable. This is the most profound existential challenge for Bitcoin's long-term viability.

Ethereum

Introduction and History

While Bitcoin pioneered decentralized digital scarcity, it offered a deliberately constrained scripting language. The vision of a general-purpose, world computer — a decentralized platform executing arbitrary code in a trustless environment — was articulated by Vitalik Buterin in a 2013 white paper and formalized by Gavin Wood's 2014 Yellow Paper, which specified the Ethereum Virtual Machine (EVM). Ethereum's public blockchain launched on July 30, 2015, following a crowdsale that raised over $18 million in Bitcoin. A defining moment was the 2016 Decentralized Autonomous Organization (DAO) hack, where a reentrancy vulnerability led to the theft of 3.6 million ETH. The community's controversial hard fork created two parallel blockchains — Ethereum (ETH) and Ethereum Classic (ETC) — exposing fundamental tensions between immutability and pragmatic security.

Comparison with Bitcoin

Feature Bitcoin Ethereum
Primary Purpose Digital currency / store of value Programmable smart contract platform
State Model UTXO Account-based
Scripting Limited, non-Turing-complete Turing-complete (EVM)
Block Time ~10 minutes ~12 seconds (post-Merge)
Consensus Proof of Work Proof of Stake (post-Merge)
Supply Capped at 21 million No hard cap (deflationary via EIP-1559 burn)
Address Hash of public key Last 20 bytes of Keccak-256 hash of public key

Actors in the Ethereum Ecosystem

The Ethereum network comprises a heterogeneous set of participants: Validators (formerly miners) are the block producers, motivated by priority fees and occasional Maximal Extractable Value (MEV) extraction. Full nodes validate the entire blockchain, enforcing protocol rules without direct economic reward. Developers write and deploy smart contracts in high-level languages such as Solidity that compile down to EVM bytecode. dApp users pay gas fees to interact with contracts through browser wallets like MetaMask. Liquid staking providers (e.g., Lido) and MEV searchers add layers of specialization, creating a complex market for block space and execution rights.

Smart Contracts as Self-Executing Economic Agreements

A smart contract is a collection of persistent, immutable-address bytecode and state deployed on the Ethereum blockchain. Its functions are triggered by either externally owned accounts or other contracts, executing deterministically across all EVM nodes. Because the EVM is Turing-complete, it is susceptible to the halting problem. Gas is a unit measuring computational effort. Each EVM opcode has a fixed gas cost. The total transaction fee under EIP-1559 is F=G×(bt+p)F = G \times (b_t + p), where btb_t is the protocol-determined base fee (burned) and pp is the priority fee (paid to validator). The base fee dynamically adjusts: bt+1=bt(1+18GtGtargetGtarget)b_{t+1} = b_t \left(1 + \frac{1}{8} \cdot \frac{G_t - G_{target}}{G_{target}}\right). Economic analysis treats smart contracts as commitment devices that eliminate ex-post renegotiation and reduce moral hazard. For example, a decentralized exchange (DEX) contract can provably hold reserves and execute trades algorithmically without a central operator. In an automated market maker (AMM) such as Uniswap, a constant product formula xy=kx \cdot y = k defines the possible price curve, with the instantaneous marginal exchange rate PAB=y/xP_{A \to B} = y/x.

Digital Tokens

Introduction to Digital Tokens

A digital token is a cryptographically secured, transferable unit of data recorded on a distributed ledger that encodes a bundle of economic rights — ranging from monetary claims and ownership stakes to access privileges and governance votes. Formally, a token TiT_i can be represented as Ti=(IDi,Ri,Si,Hi)T_i = (ID_i, \mathcal{R}_i, \mathcal{S}_i, \mathcal{H}_i), where IDiID_i is a unique identifier, Ri\mathcal{R}_i denotes the encoded rights, Si\mathcal{S}_i is the state (ownership, balance, metadata), and Hi\mathcal{H}_i is the cryptographic hash linking it to the ledger's history. Tokens can be classified along two orthogonal axes: the source of value (intrinsic, external, contractual, instrumental) and the fungibility structure (interchangeable or uniquely identifiable).

Native Tokens

Native tokens are the endogenous monetary units of a blockchain protocol, created by the consensus mechanism itself rather than issued against external collateral. Bitcoin (BTC) and Ether (ETH) are paradigmatic examples. They serve three interlocking functions: a medium of exchange for peer-to-peer settlement, a unit of account for pricing computational resources (gas), and an incentive layer that aligns validator behavior with network security. The supply path is typically algorithmically determined — e.g., Bitcoin's geometric decay — which renders monetary policy a credible commitment rather than a discretionary choice. By eliminating the time-inconsistency problem, native tokens solve the inflationary bias inherent in centralized issuance, at the cost of forfeiting counter-cyclical stabilization. The modified equation of exchange: MtVt=PtQt+GtM_t \cdot V_t = P_t \cdot Q_t + G_t, where GtG_t is aggregate gas expenditure.

Asset-Backed Tokens

Asset-backed tokens are digital representations of claims on a specified off-chain asset, such as a fiat currency (e.g., USDC, USDT), a commodity (e.g., gold-backed GLC), or real estate. The foundational mechanism is a tripartite process: (i) deposit — the issuer takes custody of the underlying asset; (ii) issuance — a proportional number of tokens are minted on the blockchain; (iii) redemption — token holders may surrender tokens to the issuer to reclaim the underlying asset, triggering token burning. The no-arbitrage pricing condition is PT=NAVNP_T = \frac{NAV}{N} in frictionless markets. The economic vulnerability is counterparty risk: the token holder bears the insolvency risk of the issuer and custodial theft. Without a credible claim enforcement mechanism, asset-backed tokens can trade below net asset value, introducing a liquidity premium.

Contract Tokens

Contract tokens are programmable representations of legal agreements, where the token itself is the contract, not merely a receipt. They encode rights to cash flows, voting power, or contingent claims, and are often governed by token standards like ERC-20 (fungible) or ERC-721 (non-fungible). Classic examples include equity shares, corporate bonds, and interest rate swaps tokenized on a blockchain. Valuation proceeds analogously to traditional financial claims. For a bond token promising coupon payments CC and face value FF at maturity TT: P0=t=1TC(1+rt)t+F(1+rT)TP_0 = \sum_{t=1}^{T} \frac{C}{(1+r_t)^t} + \frac{F}{(1+r_T)^T}. The programmable nature allows for automated execution of covenants, reducing monitoring costs and mitigating moral hazard. Non-fungible contract tokens represent unique rights (e.g., a specific mortgage). Governance tokens, a subset, grant voting rights in DAOs; their value can be modeled as a function of the expected discounted value of future protocol revenues.

Utility Tokens

Utility tokens confer the right to access a specific service or product within a digital ecosystem. Unlike native tokens, they are not necessary for base-layer security; unlike contract tokens, they do not typically represent a financial claim. Examples include Filecoin (decentralized storage) and Basic Attention Token (advertising). A canonical valuation framework is the Equation of Exchange: MV=PDM V = P D, where MM is token supply, VV is velocity, PP is the price of the network service (in fiat), and DD is the real quantity of service units demanded. The token's exchange rate is E=PDMVE = \frac{P D}{M V}. The "token velocity problem" arises because high velocity reduces the required float and thus the token's store-of-value premium. Utility tokens that provide exclusive access or staking discounts can compress velocity; for instance, Filecoin requires service providers to stake tokens, effectively locking supply.

Token Transactions

Across all typologies, token transfers are executed through a common transactional substrate. A transaction τ\tau is defined as τ=(sender,receiver,Δ,σ,nonce,data)\tau = (\text{sender}, \text{receiver}, \Delta, \sigma, \text{nonce}, \text{data}), where σ\sigma is the sender's digital signature, verifiable via the public key such that Verify(pk,τ,σ)=1\text{Verify}(pk, \tau, \sigma) = 1. The nonce prevents replay attacks, ensuring each τ\tau is processed exactly once. Two dominant accounting models prevail: the UTXO model (Bitcoin), where tokens are indivisible "coins" consumed and re-created in each transaction, and the account model (Ethereum), where balances are mutated in place. Transactions are bundled into blocks and appended to the ledger through a consensus mechanism. Under Proof-of-Work, miners compete to solve a cryptographic puzzle; under Proof-of-Stake, validators are selected proportional to stake. The transaction fee compensates validators for inclusion and provides a sybil-resistance mechanism.