Fall 2023

CS194-177 · CS294-177 · EWMBA 237 · MFE 230T

Instructors

Christine Parlour Dawn Song
Christine Parlour Dawn Song
UC Berkeley UC Berkeley

Course Staff

Jaiden Fairoze (TA), Matthew Fogel (Reader)

Meetings

Synchronous lectures:
Tuesday, 10:00 AM - 11:00 AM
Soda 306
Note: the class is assigned the 9am to 11am slot, but we will only use the second hour. Lecture recordings will be posted shortly after the synchronous lecture.

Office Hours

All office hours are held remotely (online).

Dawn Song 4:30pm-5:00pm Mon To be rescheduled Meeting link
Jaiden Fairoze 2:00pm-3:00pm Wed Meeting link
Matthew Fogel 1:30pm-2:30pm Tue Meeting link

Enrollment

CS undergraduate students: please register for CS194-177.
CS graduate students: please register for CS294-177.

This is a variable-unit course. The requirements for each number of units are listed below.

See the Grading section below for further details.

Participation

We expect students to attend the live lectures in-person. If there is a guest lecture, we encourage students to ask questions. Participation will be measured by lecture attendance. If you have a time conflict with another class or another reason you cannot regularly attend synchronous lectures, please make a private post on Edstem – we will handle each case individually.

Course Syllabus

Grading

The class will have short written homework and hands-on labs. Students enrolling in 1 unit are expected to submit an article that summarizes either a) one of the lectures or b) a topic from the Future of Decentralization, AI, and Computing Summit – students enrolling in more than 1 unit will not have to submit an article. Students enrolling in 2 units or more are to complete weekly quizzes of equal weight (graded on correctness). In addition, 3 and 4 unit students will participate in a group project (6 students per group), aiming to develop new solutions or analyze existing solutions and real-world deployment in DeFi, including a significant implementation component for 4 unit students.

1 unit

Quizzes50%
Participation25%
Article25%
2 units

Participation25%
Quizzes25%
Assignments15%
Labs35%
3 units

Participation10%
Quizzes10%
Assignments5%
Labs15%
Project Proposal5%
… Milestone15%
… Presentation15%
… Report25%
4 units

Participation10%
Quizzes10%
Assignments5%
Labs15%
Project Proposal5%
… Milestone10%
… Presentation10%
… Report20%
… Implementation15%

Summary Article

Students enrolled in 1 unit are expected to submit a 500-word summary article of one of the lectures. Alternatively, students that attend The Future of Decentralization, AI, and Computing Summit in-person may write an article summarizing a topic learned at the summit – bonus points will be awarded for this option if the article is publicly accessible.

The article’s marking criteria can be found below:

Students who wish to choose the summit option may fill out this submission form before Sep 8.

Quizzes

All quizzes are released in parallel with (or shortly after) the corresponding lecture and will be due midnight the following Tuesday. Please remember to complete the quiz each week – they will be graded on correctness. The questions are all multiple-choice and there are usually at most 5 per quiz.

Group Project

Students will be completing an open-ended research project culminating in a presentation and a workshop-style paper submitted at the end of the semester. You will choose an area of research in DeFi that you wish to explore and are encouraged to read related papers in that area. You will then identify an area that you believe needs improvement or merits further research and build systems and/or conduct experiments to further the state of the art within your chosen field. Students are welcome to choose their own topics, but we’ll also provide a list of topic suggestions that you can take inspiration from if you wish. Groups of 5-6 students are required. 3-unit and 4-unit students should not be in the same group. More detail regarding group formation and logistics will be posted when necessary.

Assignment Timeline

Assignment Released Deadline
Group formation 9/05 9/18
Project proposal 9/19 10/09
Assignment 1 10/10 10/16
Assignment 2 10/24 10/30
Project milestone 10/31 11/06
Lab 1 11/07 11/13
Lab 2 11/14 11/27
Project presentation 11/21 12/04
Project final report 11/21 12/04

Course Description

The purpose of this class is to bring together students and interdisciplinary experts in Computer Science and Finance to discuss the emerging area of Decentralized Finance (or DeFi). DeFi has experienced an unprecedented growth, with hundreds of projects and a countless stream of financial, distributed systems, and blockchain innovations. The total value locked (TVL) in decentralized finance — a measure of the total value of assets committed to the DeFi ecosystem — has reached over $80 billion. When compared to the traditional centralized finance (CeFi), DeFi offers products and services serving similar financial goals, but critically innovates with novel capabilities such as instantaneous multi-billion USD flash loans. By utilizing blockchain and smart contract technologies, DeFi as a whole aims to provide a new platform for programmable, automated finance services that remove the reliance on central trust and intermediaries.

Our goal is to provide a framework to understand this new area of financial services. For each finance function, we will consider 1) the current intermediated structure, and then b) the DeFi version (actual or proposed) that fulfills the function. Is either one of these optimal? We will evaluate both through the lens of CS and finance. Is the application computable (efficiency, decidable), programmable (automatic)? Is the application welfare-enhancing and stable (not a source of systemic risk). How do the new and old systems interact? We aim for the students to be able to critically evaluate whether a new DeFi protocol is novel and practical. We further will capture the security danger in DeFi, as well as their impact on the underlying consensus security. Lastly, we hope to give an insight into how to program and structure secure and incentive-compatible DeFi applications.

Through the exposure to cutting-edge research as well as remaining open challenges, we hope for our students to quickly integrate into academic as well as industrial projects related to DeFi.

Summarizing, we will cover a broad spectrum of topics, including:

  1. A comprehensive introduction covering a computer science and finance background required for the remainder of the course. We will discuss the basics of decentralized systems, permissionless blockchains, consensus, smart contracts and contrast DeFi to traditional finance.

  2. We will cover the computer science and economic aspects of DeFi assets, and how they link to CeFi through stablecoins. The course will elaborate on DeFi asset exchanges and contrast the traditional limit order book models to automated market makers. Just like in CeFi, debt and derivatives play a fundamental role in DeFi. We’ll dive into the various debt models, such as under- and over-collateralized debt, as well as synthetic assets in DeFi. Insurances, portfolio management and prediction markets form equally crucial elements to a decentralised economy as we will elaborate on. Last but not least, we will show different attempts at measuring and tracking systemic risk and its computability.

  3. To link blockchains with financial information from the real-world, we will provide a deep-dive into oracles. We will discuss decentralized reputation, identities and proof of properties. Because most DeFi is transparently readable, including transaction amounts, fees, dates/times, etc, privacy plays an increasingly important role in DeFi. We will cover various privacy technologies including zero-knowledge proofs and their applications in DeFi. We will also discuss various attempts at how to enforce data ownership, data monetization and valuation as well as controlled use and misuse of data.

  4. A digital economy would not thrive without strong security. We will outline the many past security attacks, introspect a few of them in closer detail and provide recommendations on how to strengthen DeFi security. We will discuss the systemic risks stemming from Miner Extractable Value (MEV) and how MEV can be minimized by design. Decentralized governance provides power to a pseudonymous collective, and we will explore how governance works, and how it may be attacked.