Decentralized Payments, Contracts, and Finance for Humans and AI
2026 Fall Edition
Announcements
- CPSC 3640 will be offered in Fall 2026. The course website is now live with the schedule and logistics.
Information
Time/location
- MW 11:35am-12:50pm
- Location: TBA
Instructor
- Prof. Fan Zhang (https://fanzhang.me)
- OH: TBD
Course Staff
- Teaching Assistance: TBA
Platforms
Course Description
Blockchains provide a platform for humans to coordinate economic activity without relying on centralized intermediaries. Emerging standards such as EIP-8004 aim to extend these capabilities to autonomous agents, enabling AI systems to transact and coordinate through shared protocols. This introductory course explores such decentralized applications, including tokens, exchanges, lending protocols, stablecoins, oracles, decentralized governance, and emerging standards for AI coordination and interoperability. Students will learn system architecture, security intuition, and how to build and debug decentralized applications.
Prerequisites
Required: CPSC 201 and 202 (or equivalent), and a basic understanding of computer systems and networks.
Course Format
This is an in-person lecture course. Classes combine conceptual discussion with hands-on labs where students write and debug Solidity smart contracts and interact with live DeFi protocols. Guest lectures from practitioners may supplement core material. The course concludes with group presentations and a final in-class exam.
| Assessment | Weight | Details |
|---|---|---|
| Class Participation | 10% | Ongoing throughout the semester; includes in-class discussion and engagement |
| Homework & Labs | 40% | ~6 problem sets and hands-on Solidity labs, distributed roughly every 1–2 weeks |
| Group Presentation | 20% | Teams present a recent research paper; presentations are a technical deep-dive (~20 minutes), scheduled during the final weeks of the semester or as fit in the schedule |
| Final Exam | 30% | In-class final exam on basic conceptual understanding across all four units |
Course Structure
This course is organized into four units that build progressively from foundational concepts to advanced applications at the intersection of AI and blockchain.
Unit 1 — Foundation establishes the intellectual and technical bedrock of the course. Students learn why decentralized systems are needed by tracing the history of digital money, examining the failures of trusted-party approaches, and understanding core cryptographic primitives. The unit introduces three paradigms for building trusted computers — Trusted Execution Environments (TEEs), cryptographic proofs, and State Machine Replication — which recur throughout the course. A unifying framework positions both crypto and AI as middleware layers that enable trustworthy, decentralized decision-making pipelines.
Unit 2 — DeFi for Humans covers the major building blocks of the decentralized finance ecosystem as it exists today. Beginning with Bitcoin's breakthrough in permissionless consensus and continuing through Ethereum and smart contract programming in Solidity, students learn how tokens, stablecoins, decentralized exchanges (DEXes), automated market makers (AMMs), oracles, lending protocols, and cross-chain interoperability work under the hood. The unit concludes with an in-depth treatment of security: smart contract bugs, Miner/Maximal Extractable Value (MEV), privacy risks, and the fundamental tension between usability and security in key management.
Unit 3 — DeFi/Crypto for AI examines how blockchain infrastructure can serve autonomous AI agents. Students explore emerging payment protocols designed for agent-to-agent transactions, the role of TEEs in providing verifiable, confidential computation for AI workloads, and how decentralized infrastructure can underpin reliable AI pipelines. This unit engages directly with open research questions around agent identity, economic coordination, and trust without central authorities.
Unit 4 — AI for Crypto reverses the lens, asking how AI can improve the design, analysis, and usability of blockchain systems. Topics include using language models and formal methods for smart contract auditing and bug detection, AI-assisted protocol design, and AI as an interface layer that bridges blockchain systems with the physical world.
By the End of the Course
Students will be able to (1) explain the architecture and security properties of major DeFi protocols, (2) write and debug Solidity smart contracts, (3) reason about MEV, privacy, and economic security, and (4) critically evaluate emerging standards for AI agent coordination on-chain.
Lecture Schedule
| # | Date | Title |
|---|---|---|
| Section I: Foundation | ||
| 1 |
Course intro
|
|
| 2 |
History of digital money, and background on key cryptographic concepts
|
|
| 3 |
Some more on cryptography
|
|
| 4 |
Trusted computers & three ways to build one
|
|
| Section II: DeFi for Humans | ||
| 5 |
Nakamoto broke new ground in 2009: Bitcoin
|
|
| 6 |
Ethereum and smart contracts
|
|
| 7 |
Tokens & stablecoins: payment protocol for AI agents
|
|
| 8 |
DEX and Automated Market Makers (AMMs)
|
|
| 9 |
Oracles, Lending & Borrowing, Prediction markets
|
|
| 10 |
Interoperability
|
|
| 11 |
Scalability: payment channels, rollups
|
|
| 12 |
DeFi security risks: bugs
|
|
| 13 |
DeFi security risks: MEV
|
|
| 14 |
MEV II
|
|
| 15 |
DeFi security risk: privacy
|
|
| 16 |
Usability and security tension: Key management (zkLogin)
|
|
| Section III: DeFi/Crypto for AI | ||
| 17 |
Payment protocols for agents (x402 and co)
|
|
| 18 |
Introduction to TEEs & TEE x AI
|
|
| 19 |
TEE x AI II
|
|
| 20 |
Securing the plumbing of AI (Props)
|
|
| 21 |
Decentralized Infra for AI
|
|
| 22 |
Coordination (EIP-8004)
|
|
| Section IV: AI for Crypto | ||
| 23 |
AI for analysis of blockchain protocols
|
|
| 24 |
AI for design of blockchain protocols and applications
|
|
| 25 |
AI for enhancing interaction with real world
|
|
| 26 |
In-class Final
|
|