FHGR - University of Applied Sciences of the Grisons
Office Hours
By appointment
Course Description
This course provides a comprehensive introduction to decentralized finance (DeFi), exploring the technical foundations, economic mechanisms, and practical applications of blockchain-based financial protocols. Students will gain hands-on experience with DeFi protocols through Python-based analysis and interact with live blockchain data.
Learning Outcomes
Upon completion of this course, students will be able to:
Explain DeFi architecture - Describe how blockchain technology, smart contracts, and cryptographic primitives enable trustless financial services
Analyze AMM mechanics - Calculate swap outputs, price impact, and slippage using constant function market maker formulas
Evaluate lending protocols - Compute collateralization ratios, health factors, and liquidation thresholds in overcollateralized lending
Assess stablecoin stability - Compare different stablecoin mechanisms and evaluate their risk profiles and failure modes
Quantify impermanent loss - Calculate the opportunity cost of liquidity provision under various price divergence scenarios
Design yield strategies - Construct and evaluate risk-adjusted yield farming strategies across multiple protocols
Identify security vulnerabilities - Recognize common smart contract vulnerabilities and analyze historical DeFi exploits
Analyze governance systems - Evaluate token-based governance mechanisms and identify potential attack vectors
Implement DeFi interactions - Write Python code to interact with DeFi protocols using web3.py and analyze on-chain data
Prerequisites
Check Your Readiness
Click each prerequisite you've completed to track your readiness for this course.
Python proficiency (3.10+) with experience in data analysis libraries
Basic understanding of blockchain technology and cryptographic concepts
Fundamentals of finance and economics (time value of money, risk/return)
Basic statistics and probability (distributions, hypothesis testing)
Weekly Schedule
Week 1: Introduction to DeFi
Complete
Overview of decentralized finance, its history, and comparison with traditional finance
What is Decentralized Finance?History and evolution of DeFiDeFi vs Traditional Finance (TradFi)Key characteristics and principlesThe DeFi ecosystem overview
Reading: Decentralized Finance: On Blockchain- and Smart Contract-Based Financial Markets
Week 2: Blockchain Foundations
Complete
Ethereum, smart contracts, and the technical infrastructure of DeFi
Ethereum architectureSmart contracts fundamentalsGas and transaction costsEVM and bytecodeLayer 1 vs Layer 2 solutions
Reading: Ethereum: A Next-Generation Smart Contract and Decentralized Application Platform
Week 3: Tokens and Standards
Complete
Token standards, fungible and non-fungible tokens, and tokenomics
ERC-20 fungible tokensERC-721 and ERC-1155 NFTsToken economics (tokenomics)Token distribution mechanismsWrapped tokens and bridges
Reading: An Empirical Study of ERC20 Token Networks
Week 4: Decentralized Exchanges
Complete
Automated Market Makers, liquidity pools, and DEX mechanics
Order books vs AMMsConstant Product Market Makers (x*y=k)Uniswap V2 and V3 mechanicsLiquidity provision and LP tokensSlippage and price impact
Reading: An Analysis of Uniswap Markets
Week 5: Lending Protocols
Complete
Collateralized lending, interest rate models, and liquidations
Overcollateralized lendingInterest rate modelsHealth factors and liquidationsAave and Compound mechanicsFlash loans
Reading: SoK: Lending Pools in Decentralized Finance
Week 6: Stablecoins
Complete
Stablecoin mechanisms, algorithmic vs collateralized designs
All work must be original. Use of AI assistants for ideation and code assistance is permitted; direct copying or submitting AI-generated content as your own is not. All sources must be properly cited.
Late Submissions
Up to 24 hours late: 10% penalty
Up to 48 hours late: 25% penalty
Beyond 48 hours: Not accepted without prior arrangement
Collaboration
Students are encouraged to discuss concepts and approaches with classmates. However, all submitted code and written work must be your own. Clearly document any external resources or discussions in your submissions.
Course Schedule Overview
Week
Module
Topic
Deliverable
1-3
Foundations
DeFi, Blockchain, Tokens
Exercise 1-3
4-6
Core Protocols
DEXs, Lending, Stablecoins
Midterm Project
7-9
Strategies
Yield, Derivatives, Oracles
Exercise 7-9, Presentation
10-12
Advanced
Governance, Security, Future
Final Project
Contact
For questions about course content, post in the GitHub Discussions. For personal matters, email the instructor directly.