Books45 chapters12 h 5 min read
Investing & Digital Assets
A share of stock and a bitcoin look like different things, and the businesses that hold them run on the same promises: the customer owns what the ledger says they own, an order gets the best price the market offers, assets are kept apart from the firm's own, and anyone can be shown that what's owed is actually held. A broker keeps those promises through a clearing house, a depository and a century of rules written after each crisis; a crypto exchange keeps them with keys, wallets and a chain that settles in minutes and never closes; a stablecoin issuer keeps one more, a dollar on chain for every dollar in reserve, redeemable on demand. When a firm broke those promises, as Lehman, MF Global, Celsius and FTX did, the ledger and the assets stopped agreeing, and every rule in this book is a guard against that. This book surveys how the industry does each piece, benchmarked across Robinhood, Schwab, Fidelity, Interactive Brokers, Coinbase, Kraken, Gemini, Binance, Circle, Tether, Paxos, Anchorage, BitGo, Fireblocks, BlackRock, Uniswap, Aave and the others, with no single company as the model, and how you'd build it, extending one core data model chapter by chapter.
It reads in thirteen parts, plus a reference. The Business: the parties and how money flows, the landscape, how brokers and exchanges make money, regulators and licenses, and the crises that wrote the rules. Accounts and Positions: opening accounts, ledgers and buying power, funding and transfers, cash sweeps and yield, corporate actions and chain events, fractional shares, tax lots and wash sales, and statements and tax forms. Trading and Markets: orders, equity market structure, routing and best execution, order books and matching engines, market data, options, margin and short selling, pre-trade risk and halts, 24-hour trading, futures, and prediction markets. Clearing and Settlement: clearing and T+1, customer protection and SIPC, books, records and the audit trail, market surveillance, and brokerage as a service. Wealth and Advice: Reg BI and fiduciary duty, robo-advisors, tax-loss harvesting and direct indexing, retirement accounts, performance, and advisor platforms. Chains and Wallets: blockchains for platform engineers, tokens, keys and signing, wallets, chain data, and layer 2s and bridges. Crypto Exchanges: how an exchange works, deposits and withdrawals, hot and cold wallets, listings, trading products, perpetuals, staking, proof of reserves, security and hacks, and the 2022 collapse. Institutional Crypto: qualified custody, custody platforms, crypto ETPs, prime brokerage and lending, and accounting. Stablecoins: the business, issuing one, the law, freezes, and depegs. Decentralized Finance: DEXs and AMMs, lending and liquidations, oracles and MEV, smart contract risk, and DeFi from a regulated platform. Tokenization: tokenized funds, tokenized stocks, and transfer agents. The Rules: securities or commodities, licensing, AML and the Travel Rule, on-chain analytics, crypto tax, and beyond the US. Running the Platform: architecture, peak days and outages, account security, AI, metrics, and conversions and shutdowns. Reference: a glossary of every term, grouped by part.
The Business
- 01The Investing & Digital Assets BusinessHow brokers, crypto exchanges, custodians and stablecoin issuers work: the parties, the money, the life of a trade and a stablecoin dollar, and the data model.38 min
- 02The Investing & Crypto LandscapeBrokers by accounts and assets, wholesalers, crypto exchanges, custodians, stablecoin supply, brokerage APIs, the deals and the 2025-26 IPOs, November 2026.14 min
- 03How Brokers & Exchanges Make MoneyPFOF per share and per contract, net interest, sweeps, stock lending, subscriptions, crypto fee tiers, staking, custody, reserve income and rate sensitivity.16 min
- 04Regulators & LicensesThe SEC, FINRA, CFTC, NFA, states, OCC, NYDFS, FinCEN, IRS and SIPC; which registration each activity needs; and one brand as many regulated entities.12 min
- 05Crises & the Rules They WroteA dated timeline from 1929 to the GENIUS Act: each crisis, the rule it produced, and the chapter of this volume that covers that rule.13 min
Accounts and Positions
- 06Opening AccountsOpening a brokerage or crypto account: account types and titling, broker CIP, the investment profile, options and margin approvals, trusted contacts, W-9s.21 min
- 07Ledgers, Positions & Buying PowerDouble entry across cash, shares and tokens: trade and settlement date, the stock record, omnibus books, buying power, withdrawable cash and on-chain units.20 min
- 08Funding & Account TransfersMoney and assets in and out of an account: ACH and instant deposits as credit, wires, debit cards, ACATS timelines and rejects, crypto transfers, fraud.18 min
- 09Cash, Sweeps & YieldWhere a broker's uninvested cash goes: free credit balances, bank and money fund sweeps, the sweep spread and its suits, and crypto yield, BlockFi to GENIUS.19 min
- 10Corporate Actions & Asset EventsDividends, splits, mergers, spinoffs, tenders and proxy votes through DTC to the ledger, and forks, airdrops, migrations and delistings on chains.22 min
- 11Fractional Shares & Recurring InvestingHow brokers create fractional positions, dollar-based orders and their rounding residuals, recurring buys and DRIP as batched orders, crypto plans, the limits.14 min
- 12Cost Basis, Tax Lots & Wash SalesLot relief methods, covered and noncovered securities, wash sales across accounts, basis through corporate actions and transfers, per-wallet crypto basis.18 min
- 13Confirms, Statements & Tax FormsRule 10b-10 confirmations, account statements, the 1099 composite, the 1099-DA timeline, 1042-S for foreign accounts, and corrected forms and their clocks.14 min
Trading and Markets
- 14Orders & Order TypesMarket, limit, stop and trailing orders, time in force, extended hours, notional orders, the OMS state machine, FIX messages and cancel/replace races.15 min
- 15US Equity Market StructureExchanges, ATSs and wholesalers, the NBBO, SIPs vs direct feeds, Reg NMS order protection, access fee caps and tick sizes, auctions and retail flow.16 min
- 16Order Routing, PFOF & Best ExecutionFINRA 5310 and regular and rigorous review, Rule 606 and 605 reports read line by line, price improvement, smart order routers and crypto best execution.16 min
- 17Order Books & Matching EnginesPrice-time and pro-rata priority, book data structures, sequencers and determinism, replay and recovery, self-trade prevention and latency budgets.14 min
- 18Market DataL1, L2 and L3 data, SIPs and direct feeds and their fees, crypto WebSocket books, candles, fan-out to millions of clients, entitlements and display rules.14 min
Chains and Wallets
- 19Blockchains for Platform EngineersUTXO and account models, nonces, EIP-1559 and Bitcoin fee markets, RBF and CPFP, finality per chain, reorgs, and a ledger that agrees with a chain.18 min
- 20Tokens & Token StandardsNative assets and tokens: ERC-20 approvals and decimals, nonstandard tokens like USDT, NFTs, SPL and Token-2022, rebasing, proxies, freezes and spoofed tokens.14 min
- 21Keys, Signing & Key ManagementKey generation, HD wallets (BIP-32, 39, 44), HSMs, multisig, MPC and published TSS attacks, ceremonies, backups, policy engines and quorum signing services.16 min
- 22WalletsCustodial and self-custody wallets, smart accounts under ERC-4337 and EIP-7702, passkey and embedded wallets, WalletConnect, drainers and address poisoning.12 min
- 23Chain Data & IndexingNodes and RPC providers, reorg-safe ingestion, event logs and traces, balances at a block, indexers and data providers, and oracles and price marks.11 min
- 24Layer 2s, Bridges & Cross-ChainOptimistic and ZK rollups, sequencers and withdrawal delays, Base as an exchange-run L2, bridge designs from lock-and-mint to CCTP, and the bridge hacks.14 min
Crypto Exchanges
- 25How a Crypto Exchange WorksThe parts of a crypto exchange: accounts, the internal ledger, omnibus wallets, matching, chain watchers, risk and fiat rails, and US vs offshore structures.19 min
- 26Deposits & WithdrawalsMoving crypto in and out of an exchange: deposit addresses and tags, confirmation policy per chain, reorgs, sweeps and gas, withdrawal pipelines and recovery.24 min
- 27Hot, Warm & Cold WalletsExchange wallet tiers: hot wallet limits and sizing, rebalancing, cold storage ceremonies, withdrawal liquidity, wallet inventory and treasury reconciliation.15 min
- 28Listing & Delisting AssetsHow exchanges decide what to list: diligence, NYDFS and MiCA rules, per-chain integration, listing as inside information, delistings, forks and migrations.18 min
- 29Crypto Trading ProductsWhat exchanges sell: simple buys priced by spread, order books with maker/taker tiers, RFQ and OTC desks, recurring buys and market maker programs.15 min
- 30Perpetuals & Crypto DerivativesPerpetual futures end to end: index and mark prices, funding, margin modes, liquidation, insurance funds, ADL, the October 10, 2025 cascade and US access.15 min
- 31Staking as a ProductCustodial staking as a product: commissions worked, unbonding and exit queues, slashing pass-through, liquid staking tokens, the SEC record and tax.14 min
- 32Proof of Reserves & LiabilitiesProof of reserves and liabilities: Merkle-sum trees with a worked inclusion proof, negative balances, zk proofs, proving assets and the limits.13 min
- 33Exchange Security & HacksThe exchange hack record from Mt. Gox to Binance in 2026, signing and hot wallet controls, insiders, social engineering, response and reimbursement.15 min
- 34FTX, Celsius & the 2022 CollapseThe 2022 crypto collapse as engineering failure: Terra, Celsius, Voyager, BlockFi, Genesis and FTX from court records, and the design rule each one motivates.14 min
Stablecoins
- 35The Stablecoin BusinessHow stablecoin issuers earn on the reserve and pay distributors for it: Circle, Coinbase and Tether from filings, rate sensitivity, and why everyone wants one.16 min
- 36Issuing a StablecoinMint and burn against wires, minter allowances, the reserve and its liquidity, monthly attestations, supply across chains, CCTP and redemption operations.18 min
- 37Stablecoin LawThe law on issuers: GENIUS Act paths, reserves, capital, redemption and the yield ban, the OCC rule and pending rules, state regimes, MiCA and the UK.18 min
- 38Freezes, Blacklists & SeizuresHow issuers freeze stablecoins: blacklist functions in USDC and USDT, OFAC and Tornado Cash, seizures and reissuance, GENIUS duties, the exchange side.14 min
- 39Depegs, Runs & Synthetic DollarsWhy stablecoins break: USDC at SVB, Terra's UST, crypto-backed DAI and USDS, Ethena's USDe, tokenized deposits, run dynamics and what the rules prevent.17 min
Decentralized Finance
- 40DEXs & AMMsConstant product math with worked swaps, price impact, slippage, concentrated liquidity, v4 hooks, impermanent loss, aggregators, intents and order books.17 min
- 41DeFi Lending & LiquidationsAave and Compound mechanics: collateral factors, health factors, rate curves, liquidations with bonuses worked through, bad debt, parameters and RWA collateral.14 min
- 42Oracles & MEVPrice oracles (Chainlink, TWAPs), oracle manipulation and the Mango Markets case, MEV with a worked sandwich, Flashbots, PBS, private order flow and user cost.15 min
- 43Smart Contract Risk & ExploitsAudits and their limits, formal verification, bug bounties, upgrades and admin keys, governance attacks, exploits by class, incident response, recoveries.14 min
- 44DeFi from a Regulated PlatformSelf-custody wallets and DEX trading at regulated platforms, swap APIs, screening contracts, the repealed DeFi broker rule, sanctions and disclosures.13 min