Enrolment options

1.   Blockchains, Distributed Ledgers, Cryptography and the rise of Bitcoin.

2.   Smart Contracts, the Ethereum Network and AMMs

3.   Decentralized Exchange (DEX): a deep dive of Uniswap V2 and V3.

4.   Analytics of Liquidity Pools in Uniswap V3 using Python.

5.   Quantitative Models for AMMs and key market statistical characteristics.

6.   Balancer Protocol.

7.   Models for stable coins.

8.   Mechanics of Lending Protocols – liquidations.

Course term: Hilary
Course lecture information: 8 lectures
Course overview:

This course introduces the quantitative models and risk underpinnings of decentralized finance (DeFi), combining financial theory, smart contract mechanics, and data analytics. The material spans blockchain fundamentals, the design and modelling of Automated Market Makers (AMMs) including Uniswap V2, Uniswap V3 and Balancer, and the mechanics of overcollateralized lending protocols. Students will engage with established theoretical models, smart contract data, and Python-based analytics, developing the ability to evaluate DeFi protocols through a quantitative and risk-focused lens.

Course synopsis:

Cryptographic primitives: hashing, digital signatures, consensus algorithms. Distributed ledger technologies (DLTs): permissioned vs permissionless systems. Monetary and economic rationale behind Bitcoin; evolution from Bitcoin to DeFi. Financial primitives on-chain: lending, swapping, collateral mechanisms. Tools for reading smart contract data with Etherscan and using The Graph for analytics. Principles of AMMs and constant product market makers. Constant Function Market Makers (CFMMs) and comparison of Uniswap V2 AMMs to traditional order books. Uniswap V2 AMM valuation, P&L and portfolio risk; gamma and impermanent loss; gamma trading and the effect of realised volatility. Uniswap V2 fee mechanisms; simulation of realised token prices and impact on P&L distribution; assessment of whether fees compensate market-making risk. Uniswap V3 concentrated liquidity and custom price ranges; valuation, P&L and portfolio risk; comparison of V2 and V3 in terms of capital efficiency and impermanent loss. Python-based extraction and analysis of Uniswap V3 pool data; calculation of pool metrics such as liquidity, slippage and volume; LP performance analysis considering impermanent loss versus fee income. Mechanics of lending protocols including liquidation mechanisms in Aave and Compound; case studies of liquidation cascades and systemic risk scenarios.

Guests cannot access this course. Please log in.