- Check prerequisites
- Install tools
- Watch videos on Cyfrin Updraft
- Do exercises under topics
- Ask questions on GitHub discussions
- Advanced Solidity developer
- Experience with Foundry
- Knowledge of constant sum (
x + y = K
) and constant product (xy = K
) AMM - Python (optional)
- Basic understanding of DeFi (optional)
- Uniswap V2 and V3 (optional)
- Foundry
- Python / Jupyter lab (optional)
Check out the videos on Cyfrin Updraft for each lesson.
What you will learn
- What is Curve AMM
- How is it different from Uniswap v2 and v3?
- Course intro
- Lead instructor
- Best practices
- Setup repo for exercises
- How to execute exercises
- Curve intro
- Comparison with Uniswap v2 and v3
What you will learn
- Math of Curve v1 AMM
- How Curve v1's equation calculates swap amount and liuidity
- Graph Curve V1 AMM
- Graph Curve V1 xy/(D/2)^2
- Math
- Newton's method
What you will learn
- Curve v1 AMM contract overview
- Parameter
A
that controls the flatness of the curve of Curve v1- Number
D
that quantifies liquidity of the pool
- Contract overview
- Graph How A affects D
- Code walkthrough
A
- Code walkthrough
ramp_A
- Code walkthrough
stop_ramp_A
- Code walkthrough
- Code walkthrough
_xp
- Code walkthrough
get_D
- Python Compute equations for D
- Code walkthrough
get_virtual_price
- Code walkthrough
calc_token_amount
What you will learn
- How swap function is implemented
- Contract calls
- Code walkthrough
exchange
- Code walkthrough
get_y
- Python Compute equations for y
- Code walkthrough
- Code walkthrough
get_dy
- Exercises
What you will learn
- How the function to add liquidity is implemented
- Imbalance fee for adding liquidity in a way that changes the token ratios
- Contract calls
- Imbalance fee
- Code walkthrough
add_liquidity
- Exercise
What you will learn
- How the functions to remove liquidity are implemented
- Contract calls
- Code walkthrough
remove_liquidity
- Graph calc_withdraw_one_coin
- Code walkthrough
remove_liquidity_one_coin
- Code walkthrough
_calc_withdraw_one_coin
- Code walkthrough
- Exercises