課程資訊
課程名稱
分散式金融導論
Introduction to Decentralized Finance 
開課學期
113-1 
授課對象
電機資訊學院  資訊網路與多媒體研究所  
授課教師
廖世偉 
課號
CSIE5060 
課程識別碼
922EU4780 
班次
 
學分
3.0 
全/半年
半年 
必/選修
選修 
上課時間
星期五B,C,D(19:20~22:00) 
上課地點
資104 
備註
初選不開放。本課程以英語授課。
總人數上限:100人 
 
課程簡介影片
 
核心能力關聯
核心能力與課程規劃關聯圖
課程大綱
為確保您我的權利,請尊重智慧財產權及不得非法影印
課程概述

Decentralized Finance (DeFi) is a financial ecosystem built on blockchain technology that operates without traditional intermediaries such as banks or brokerages. Instead, DeFi protocols leverage smart contracts on blockchain networks to facilitate financial transactions and services. The benefits of DeFi include:

- Accessibility: Anyone with an internet connection can access DeFi services anytime, removing barriers associated with traditional finance.
- Transparency: Transactions are recorded on the blockchain, ensuring transparency and reducing the potential for fraud.
- Control: Users maintain control over their assets and financial decisions without relying on intermediaries.

DeFi is reshaping the financial landscape by leveraging blockchain technology to create a more open, transparent, and accessible financial system. As the ecosystem evolves, it has the potential to revolutionize how we interact with financial services.

**Course Structure**

This course is divided into two main parts: smart contract development and an introduction to DeFi. Initially, we will focus on programming smart contracts, which will later aid in analyzing the complex codebases of modern DeFi protocols. The second part will cover the fundamentals of DeFi, including decentralized exchanges (DEX) and lending protocols. We will use well-known protocols such as Uniswap and Compound as case studies to explore their architecture, underlying mathematics, and operational mechanisms.

Each class is structured into two sections: the first two hours (19:30 - 21:30) will be dedicated to the regular course material, while the last 30 minutes (21:30 - 22:00) will be reserved for TA hours or DeFi news. During TA hours, students can ask questions, and if there is no questions, TAs or students may share the latest developments in the DeFi space. Discussions may cover technical aspects, mechanisms, and economic considerations, but will exclude discussions about coin prices.

**Course Material**

This course will focus on the Ethereum ecosystem, including all EVM-compatible chains, but will not cover ecosystems such as Solana, Aptos, or Sui. We will use Solidity as our smart contract programming language and Foundry as our testing framework throughout the course and assignment.

**Disclaimer**

During the course, you may need to use your private key for sending on-chain transactions. Be aware that exposing or sharing your private key can be dangerous. Ensure you keep your private key secure, as we are not responsible for any financial losses resulting from its compromise.

**Course Enrollment**

To enroll in this course, please complete the homework 0 and fill out the application form. We will send you the course code when the semester starts.

Homework 0: https://drive.google.com/file/d/1gQpB_HRocImV0PU1NEj6_HquK0yWJQBt/view?usp=drive_link

Application Form: https://forms.gle/sBP6Rw7m6WJZmBkx8 

課程目標
This course aims to introduce students to the world of Decentralized Finance (DeFi) and explore the evolving blockchain landscape. By the end of the course, students will gain knowledge and skills in the following areas:

1. Blockchain Basics
2. Smart Contract Programming
3. Smart Contract Security
4. Common ERC Standards and EIPs
5. Overview of Decentralized Finance (DeFi)
6. Advances and Innovations in DeFi 
課程要求
Introduction to Computer Science and Programming 
預期每週課後學習時數
Office Hours
備註: 21:30 - 22:00, each Friday 
指定閱讀
Mastering Bitcoin: Programming the Open Blockchain (Bitcoinbook)
Mastering Ethereum: Building Smart Contracts and DApps (Ethereumbook) 
參考書目
How to DeFi: Advanced, by Lucius Fang, Benjamin Hor, Erina Azmi. Affiliation: CoinGecko.
Automated Market Makers: A Practical Guide to Decentralized Exchanges and Cryptocurrency Trading
Decentralized Finance: UC Berkeley 
評量方式
(僅供參考)
 
No.
項目
百分比
說明
1. 
Homework 0 
5% 
1. This assignment is required to enroll in the course. 2. You must complete it to receive the course code. 
2. 
Homework 1-4 
40% 
1. There are a total of 4 assignments, each accounting for 10% of the final grade. 2. Late submissions are not allowed and will receive zero points. 
3. 
Midterm 
20% 
1. Everyone must participate in the exam in person. 2. Please follow the exam rules as announced in the course guidelines. 
4. 
Final 
20% 
1. Everyone must participate in the exam in person. 2. Please follow the exam rules as announced in the course guidelines. 
5. 
After Class Exercise 
10% 
1. There will be 10 class exercises, each accounting for 1% of the final grade. 2. Each exercise should be completed within a week, with the format being either multiple choice questions or fill-in-the-blank problems. 
6. 
Class Participation 
5% 
TBD 
 
針對學生困難提供學生調整方式
 
上課形式
以錄影輔助
作業繳交方式
延長作業繳交期限
考試形式
其他
由師生雙方議定
課程進度
週次
日期
單元主題
第1週
9/6  Course Overview 
第2週
9/13  Introduction to Smart Contract Language and Testing Framework 
第3週
9/20  Solidity Advances and Common ERCs 
第4週
9/27  Upgradeable Proxy Pattern - Transparent Proxy, UUPS and Beacon Proxy 
第5週
10/4  How to secure your contract - Web3 Security & Smart Contract Analysis Tools 
第6週
10/11  Holiday 
第7週
10/18  Course Recap: Blockchain & Smart Contract Development 
第8週
10/25  Midterm Exam 
第9週
11/1  Introduction to Decentralized Finance - DeFi 101 
第10週
11/8  (1) Oracle: Bridging Off-Chain Data to the Blockchain System
(2) Flash Loan: Borrow Large Assets within an Atomic Transaction 
第11週
11/15  Holiday 
第12週
11/22  Decentralized Exchange: An Example with Uniswap (1) 
第13週
11/29  Decentralized Exchange: An Example with Uniswap (2) 
第14週
12/ 6  Lending Protocol Overview: An Example with Compound (1) 
第15週
12/13  Lending Protocol Overview: An Example with Compound (2) 
第16週
12/20  Final Exam