0/5
In the previous video we were introduced to an equation that relates how liquidity changes in a Uniswap V2 constant product market maker (AMM) to changes in the amount of each asset in the pool. The equation is: L1 - L0 / L0 = dX / X0 = dY / Y0 Where L0 is the initial liquidity, L1 is the liquidity after adding dX and dY amount of token X and Y, X0 is the initial amount of token X, and Y0 is the initial amount of token Y. In this lesson we'll discuss how to define a function that measures the liquidity of a Uniswap V2 pool. This function takes the current amounts of each asset (X and Y) in the pool as input, and outputs the pool's liquidity. We will define our liquidity function as F(X, Y) = L where: - F is the function we are defining. - X is the amount of the token X in the pool. - Y is the amount of the token Y in the pool. - L is the liquidity of the pool. We came up with three different ways to define this function, which we will discuss in the coming lessons. **#Tag: Diagram of pool liquidity function**
A simple explanation of liquidity in automated market makers - This lesson covers the definition of liquidity and how it changes as the amount of tokens in an automated market maker change. The lesson also defines the pool value as a function of the token amounts and shows the derivation of the relationship between changes in liquidity and the ratio of changes in token amounts.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Course Overview
About the course
How to use Uniswap v2 dex and contracts
Interacting with the Uniswap v2 router and factory
How to create Uniswap v2 liquidity pools
How to add liquidity to Uniswap v2 pools
Swaps, flash swaps, flash swap arbitrage, and time-weighted average price (TWAP)
Security researcher
$49,999 - $120,000 (avg. salary)
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Last updated on October 9, 2024
Solidity Developer
Uniswap V2Duration: 14min
Duration: 1h 20min
Duration: 10min
Duration: 54min
Duration: 25min
Duration: 26min
Duration: 1h 03min
Duration: 59min
Course Overview
About the course
How to use Uniswap v2 dex and contracts
Interacting with the Uniswap v2 router and factory
How to create Uniswap v2 liquidity pools
How to add liquidity to Uniswap v2 pools
Swaps, flash swaps, flash swap arbitrage, and time-weighted average price (TWAP)
Security researcher
$49,999 - $120,000 (avg. salary)
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Last updated on October 9, 2024
Testimonials
Read what our students have to say about this course.
Chainlink
Chainlink
Gustavo Gonzalez
Solutions Engineer at OpenZeppelin
Francesco Andreoli
Lead Devrel at Metamask
Albert Hu
DeForm Founding Engineer
Radek
Senior Developer Advocate at Ceramic
Boidushya
WalletConnect
Idris
Developer Relations Engineer at Axelar