Skip to content

Latest commit

 

History

History
135 lines (107 loc) · 6.66 KB

curve-v1.md

File metadata and controls

135 lines (107 loc) · 6.66 KB

Curve V1

How to use this

Prerequisites

  • 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)

Tools

Topics

Check out the videos on Cyfrin Updraft for each lesson.

Section 1 - Intro

What you will learn

  • What is Curve AMM
  • How is it different from Uniswap v2 and v3?

Section 2 - Math

What you will learn

  • Math of Curve v1 AMM
  • How Curve v1's equation calculates swap amount and liuidity

Section 3 - Contract overview

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

Section 4 - Swap

What you will learn

  • How swap function is implemented

Section 5 - Add liquidity

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

Section 6 - Remove liquidity

What you will learn

  • How the functions to remove liquidity are implemented

Resources