**CSE 291-J: Blockchain Security** [*Stefan Savage*](https://cseweb.ucsd.edu/~savage/) and [*Deian Stefan*](https://cseweb.ucsd.edu/~dstefan/) About ============================================================== This course focuses on the security of blockchain technologies. Students will be introduced to many parts of the blockchain infrastructure — from the design and implementation of consensus protocols, to the programming layers above them, and the DeFi applications handling billions of dollars — and explore the different ways these systems can—and have—failed under adversarial settings. We will study attacks against real systems, revisit the security and assumptions of widely deployed protocols and applications, and analyze the impact of attacks, scams, and thefts. Lectures: : Tuesday and Thursday, 12:30--1:50pm, CSB 005 Staff: : **Instructors**: Stefan Savage and Deian Stefan : **Teaching Assistant**: Enze Liu Office hours: : **Stefan**: Tues 9am, CSE 3106 : **Deian**: Thu 3pm, CSE 3126 : **Enze**: Fri 930am, CSE 3127 Class discussion: : We'll use the CSE slack channel `cse291j-spring24` Calendar and Readings ============================================================== Tue Apr 2 2024: Introduction - [*Slides*](./slides/intro.pdf) Thu Apr 4 2024: Bitcoin - *Reading*: - [Bitcoin: A Peer-to-Peer Electronic Cash System](https://bitcoin.org/bitcoin.pdf), by Satoshi Nakamoto - Block Chain, Transactions, P2P Network sections from [Bitcoin Developer Guide](https://developer.bitcoin.org/reference/) - *Optional reading*: - [A Deep Dive into Bitcoin Mining Pools](https://arxiv.org/pdf/1905.05999.pdf) by Matteo Romiti et al. Tue Apr 9 2024: Security of Bitcoin - *Reading*: - [Majority is not Enough: Bitcoin Mining is Vulnerable](https://arxiv.org/abs/1311.0243) by Ittay Eyal and Emin Gun Sirer - [On the Instability of Bitcoin Without the Block Reward](https://www.cs.princeton.edu/~arvindn/publications/mining_CCS.pdf) by Miles Carlsten et al. Thu Apr 11 2024: Bitcoin hacks - [*Slides*](./slides/bitcoin-hacks.pdf) - *Reading*: - [On the Malleability of Bitcoin Transactions](https://fc15.ifca.ai/preproceedings/bitcoin/paper_9.pdf) by Marcin Andrychowicz et al. - [Mt. Gox: What We Still Don’t Know 10 Years After the Collapse](https://www.coindesk.com/consensus-magazine/2024/02/28/mt-gox-what-we-still-dont-know-10-years-after-the-collapse/) by Mark Hunter - *Optional reading*: - [The Bitcoin Brain Drain: Examining the Use and Abuse of Bitcoin Brain Wallets](https://jbonneau.com/doc/VBCKM16-FC-bitcoin_brain_wallets.pdf) by Marie Vasek et al. Tue Apr 16 2024: Guest talk - *Speaker*: [David Anderson](https://www.cs.cmu.edu/~dga/), Carnegie Mellon University. Thu Apr 18 2024: Ethereum (proof of stake) - [*Slides*](./slides/ethereum.pdf) - *Reading*: - [Ethereum docs](https://ethereum.org/en/developers/docs/) - *Optional*: - [Ethereum: A secure decentralised generalised transaction ledger -- EIP-150 revision](https://gavwood.com/paper.pdf) by Gavin Wood Tue Apr 23 2024: Ethereum (smart contracts) - [*Slides*](./slides/ethereum.pdf) - *Reading*: - [Solidity](https://docs.soliditylang.org/en/latest/) - [ERC-4337](https://eips.ethereum.org/EIPS/eip-4337) Thu Apr 25 2024: Bitcoin tracing - [*Slides*](./slides/tracing.pdf) - *Reading*: - [A Fistful of Bitcoins: Characterizing Payments Among Men with No Names](https://cseweb.ucsd.edu/~smeiklejohn/files/imc13.pdf) by Sarah Meiklejohn et al. - *Optional reading*: - [How to Peel a Million: Validating and Expanding Bitcoin Clusters](https://smeiklej.com/files/usenix22.pdf) by George Kappos et al. Tue Apr 30 2024: Mixers - [*Slides*](./slides/anti-tracing.pdf) - *Reading*: - [Mixcoin: Anonymity for Bitcoin with accountable mixes](https://jbonneau.com/doc/BNMCKF14-FC-mixcoin_proceedings.pdf) by Joseph Bonneau et al. - [Bitcoin Fog](https://www.wired.com/story/bitcoin-fog-dark-web-cryptocurrency-arrest/) - *Optional*: - [How Tornado Cash Works](https://www.rareskills.io/post/how-does-tornado-cash-work) Thu May 2 2024: Guest talk - *Speaker*: [Eun Young Choi](https://www.linkedin.com/in/eun-young-choi-9900474/), US Department of Justice. Tue May 7 2024: MEV and frontrunning - [*Slides*](./slides/mev.pdf) - *Reading*: - [Flash Boys 2.0: Frontrunning, Transaction Reordering, and Consensus Instability in Decentralized Exchanges](https://arxiv.org/pdf/1904.05234.pdf) by Philip Daian et al. - [Quantifying Blockchain Extractable Value: How dark is the forest?](https://arxiv.org/pdf/2101.05511.pdf) by Kaihua Qin et al. - *Optional*: - [Time to Brige: Measuring Block Construction Markets](https://arxiv.org/pdf/2305.16468.pdf) by Anton Wahrstätter et al. Thu May 9 2024: DeFi: Stablecoins, lending protocols, swaps and DEXes - [*Slides*](https://ucsdcloud-my.sharepoint.com/:p:/r/personal/dstefan_ucsd_edu/Documents/defi.pptx?d=w25a50253202c4e829ae5ba2338a985e6&csf=1&web=1&e=zTaz7p) - *Reading*: - [Uniswap](https://uniswapv3book.com/) - *Optional*: - [Compound: The Money Market Protocol](https://compound.finance/documents/Compound.Whitepaper.pdf) - [Attacking the DeFi Ecosystem with Flash Loans for Fun and Profit](https://arxiv.org/abs/2003.03810) by Kaihua Qin et al. - *Optional*: - [Reducing the Volatility of Cryptocurrencies -- A Survey of Stablecoins](https://arxiv.org/ftp/arxiv/papers/2103/2103.01340.pdf) by Ayten Kahya et al. Tue May 14 2024: Guest talk - *Speaker*: [Iam Miers](https://www.cs.umd.edu/~imiers/), University of Maryland. Thu May 16 2024: Class cancelled (work on your projects) Thu May 21 2024: Guest talk - *Speaker*: [Nicolas Christin](https://www.andrew.cmu.edu/user/nicolasc/), Carnegie Mellon University. Tue May 23 2024: DeFi Hacks - *Reading*: - [Attacking the DeFi Ecosystem with Flash Loans for Fun and Profit](https://arxiv.org/abs/2003.03810) by K. Qin et al. - [SoK: Decentralized Finance (DeFi) Attacks](https://arxiv.org/pdf/2208.13035.pdf) by Liyi Zhou et al. Tue May 28 2024: Cross-chain bridges - [*Slides*](./slides/briges.pdf) - *Reading*: - [zkBridge: Trustless Cross-chain Bridges Made Practical](https://dl.acm.org/doi/abs/10.1145/3548606.3560652) by Tiancheng Xie et al. Thu May 30 2024: Bridge hacks - *Reading*: - [SoK: Security of Cross-chain Bridges: Attack Surfaces, Defenses, and Open Problems](https://arxiv.org/abs/2312.12573) by Zhang et al. Tue Jun 4 2024: Avalanche - *Reading*: - [Scalable and Probabilistic Leaderless BFT Consensus through Metastability](https://arxiv.org/pdf/1906.08936) - [Vryx: Fortifying Decoupled State Machine Replication](https://hackmd.io/@patrickogrady/rys8mdl5p#Vryx-Fortifying-Decoupled-State-Machine-Replication) by P. O'Grady - [Frosty: Bringing strong liveness guarantees to the Snow family of consensus protocols.](https://arxiv.org/pdf/2404.14250) by A. Buchwald et al. Thu Jun 6 2024: Regulation and crypto - *Reading*: - [Cryptocurrency: Selected Policy Issues](https://crsreports.congress.gov/product/pdf/R/R47425) by Paul Tierno - [Blockchain in Finance: Legislative and Regulatory Actions Are Needed to Ensure Comprehensive Oversight of Crypto Assets](https://www.gao.gov/products/gao-23-105346) by US General Accountability Office (just read summary)