# Blockchain Technology and Polkadot _Eight Week Curriculum_ This is assuming two lectures per week, 1 hour 15 minutes per lecture. ## Week 1 ### Lecture 1 - Introduction 1. What is a blockchain? What is cryptocurrency? What is the difference? 3. Understanding censorship resistance, immutability 4. Basic idea of Bitcoin 5. Brief overview of current capabilities of blockchains * Tokens * NFTs * Smart contracts * DeFi _This lecture will be at a very high level - it should deliberately avoid any math._ ### Lecture 2 - Public Key Cryptography 1. Cryptography - high level overview 2. Public and private keys 3. Digital signatures 4. Commitment schemes 5. How is public key cryptography used in Bitcoin? _With the limited time here, it makes more sense to cover what public key cryptography can do, as opposed to how it does it. If students are interested, though, it would be nice to dig into elliptic curve cryptography and specifically Secp256k1 (used in Bitcoin), and Ed25519/Sr25519 on Polkadot._ ## Week 2 ### Lecture 1 - Hashing Algorithms 1. What is a hashing algorithm? 2. Cryptographically secure hashing algorithms 3. What is hashing used for in Bitcoin? 4. What are we looking for in a hashing algorithm in Bitcoin? * Collision resistance * Hiding * Puzzle-friendliness (although the details of why will come later) _If time permits and the students are interested, the teacher can go into Merkle-Damgard transforms and how the two major hashing algorithms used in Bitcoin differ (SHA-256 vs. RIPEMD-160), along Blake2b (used in Polkadot)._ ### Lecture 2 - Building the Blockchain 1. Understanding linked lists 2. Hash pointers 3. Combining hash pointers with linked lists to make a simple blockchain 4. "Attacking" our simple blockchain and limitations (e.g. double-spends) * This should cover the easiest way to guard against - centralization / checkpoints _If the majority of students have a computer science background, this may be a very quick lecture. In which case, it would be worth it to dive into Merkle trees as well._ ## Week 3 ### Lecture 1 - Securing A Blockchain in A Decentralized Way 1. Drawbacks of a centralized authority 2. Using hashes as proof-of-work * Start with Adam Back's HashCash, used for spam prevention 3. Mining 4. Potential attacks against proof-of-work chains (e.g. 51% attack, feather forking) 5. Evolution of Bitcoin mining (CPUs -> GPUs -> FPGAs -> ASICs) _It may be interesting to go into depth on alternative (non-SHA256) POW systems, e.g. Litecoin's scrypt or Grin's Cuckatoo32+, and the benefits/drawbacks of them. Additionally, it would be illuminating to talk about the issues with hashpower migration between chains with the same hashing algorithm such as Bitcoin/Bitcoin Cash._ ### Lecture 2 - Alternative Mechanisms to Proof-of-Work 1. Drawbacks to proof-of-work (e.g. electricity usage, waste, blocktime variance) 2. Alternative solutions (proof-of-storage, proof-of-useful-work) * I would not focus much on these. They have mostly been a dead end, but useful to see the evolution. 4. Deep dive into proof-of-stake 5. Types of Proof of Stakes (pure, delegated, nominated) _I think it would be important to note there that PoS is not a panacea; there are drawbacks to it as well!_ ## Week 4 ### Lecture 1 - Understanding Consensus and Evolution 1. Nakamoto consensus (benefits and drawbacks) 2. Probabilistic vs provable finality 3. Hard forks vs Soft Forks 4. Finality gadgets 5. Social consensus _This lecture and the last are laying the groundwork for the problems with Bitcoin. There are some amazing things about it but it is the first attempt at a modern blockchain!_ ### Lecture 2 - Bitcoin as a Platform 1. Secure timestamping (blockchains as timechains) 2. Bitcoin as source of randomness 3. Document provability 4. Colored coins 5. Overlay currencies 6. Ordinals / Inscriptions _The last two lectures and this are really preparation for the next lecture. People can see the limitations of trying to build on Bitcoin._ ## Week 5 ### Lecture 1 - Ethereum and Smart Contracts 1. Limitations of Bitcoin and Script (partially covered in last lecture) 2. Understanding Turing completeness 3. Short history of Ethereum 4. Basic overview of Solidity * Simple stateful contract, such as "lucky number" storage ### Lecture 2 - Polkadot 1. Problems seen in Ethereum 2. Basic architectural overview of Polkadot * Relay chain vs parachains * Wasm blobs / runtimes vs. node software 3. Substrate / Polkadot SDK * Running local copy of Substrate node ## Week 6 ### Lecture 1 - Understanding Polkadot's Consensus and Staking 1. Hybrid consensus (BABE and GRANDPA) 2. Nominated Proof of Stake 3. Parachain Validation (backing groups, slashing, etc.) ### Lecture 2 - OpenGov 1. How OpenGov works 2. Different Tracks 3. Parameter changes 4. Code changes 5. Treasury proposals - how treasury works, burns, proposals, etc. 6. Case studies - go over a few previous Referenda, Decentralized Voices, etc. _If time allows, it would be interesting to cover Gov1 vs OpenGov._ ## Week 7 ### Lecture 1 - Building on Polkadot - Smart Contracts Recommendation - build on Solidity with Moonbeam or Astar and deploy. ### Lecture 2 - Building on Polkadot - Substrate Recommendation - Get Substrate node template, make minor change, and deploy. There probably won't be more time in a single lecture. ## Week 8 ### Lecture 1 - Societal Impacts of Blockchain Technlogy 1. Potential decentralization of institutions 2. Economic impact of a provably hard currency 3. Political impact of mathematically provable truth 4. Tokenization of real-world assets 5. Anti-corruption mechanisms 6. Energy usage / PoW vs PoS ### Lecture 2 - The Future 1. Technical/usability improvements * Scalability * Zero-knowledge * Account abstraction 2. Adoption _Depending on what the students are interested in, you may want to change this._