Remove Liq Code Walk

A detailed walkthrough of Uniswap's removeLiquidity function. This lesson shows the parameters and outputs for the function, and provides a breakdown of what happens behind the scenes.

Solidity Developer

Uniswap V2

1. Remove Liq Graph
A visual guide to removing liquidity from a constant product AMM - This lesson visually explains how removing liquidity from a constant product automated market maker (AMM) works. This is done by creating a visualization with two liquidity curves (one before and one after removing liquidity), and showing how the price remains the same during this process. Duration: 3min
2. Remove Liq Math Dx Dy
A technical guide to removing liquidity from a Constant Product AMM - The lesson covers how removing liquidity from a Constant Product AMM can be represented mathematically, and how to apply the formula to determine the amounts of tokens to be removed in order to maintain the initial price. Duration: 1min
3. Remove Liq Math Pool Shares Intro
A practical guide to removing liquidity in Uniswap V2. The lesson covers the math behind removing liquidity, showing how to calculate the amount of tokens to remove to keep the price the same before and after removing liquidity. Duration: 3min
4. Remove Liq Math Pool Value Funcs
A detailed explanation on the relationship between liquidity and pool value. This video shows how liquidity is defined and how to interpret the relationship between the change in liquidity and change in pool value. Duration: 1min
5. Remove Liq Math Sqrt Delta Liq
A simple derivation of the price impact formula for a constant product AMM. The lesson covers how to calculate the price impact of removing liquidity from a constant product AMM pool by deriving the impact formula using basic math. The derivation will show how the amount of tokens removed and the initial pool balance determine the price impact. Duration: 5min
6. Remove Liq Contract Call
A comprehensive guide to removing liquidity from a Uniswap V2 pair contract. The lesson covers the steps involved in removing liquidity from a pair contract, including calling the removeLiquidity function, transferring pool shares back to the pair contract, and burning the shares to receive the underlying tokens back. Duration: 1min
7. Remove Liq Code Walk
A detailed walkthrough of Uniswap's removeLiquidity function. This lesson shows the parameters and outputs for the function, and provides a breakdown of what happens behind the scenes. Duration: 5min
8. Remove Liq Code Walk Burn
A detailed explanation of the `burn` function in Uniswap V2 pair contract - The lesson covers the different steps involved in the execution of the `burn` function, including the calculations to determine the amount of tokens to be burned and transferred. It also explains why the amount of tokens to burn is implied by the pool shares provided as input. Duration: 2min
9. Remove Liq Ex
A technical walkthrough on removing liquidity from Uniswap V2 pair contract - In this lesson, we will walk through how to remove liquidity from the Uniswap V2 pair contract, using an example of the DAI-WETH pair contract. Duration: 1min
10. Remove Liq Ex Sol
A practical guide to removing liquidity from Uniswap V2 pools. The lesson explains the steps required to remove liquidity from a Uniswap V2 pool by calling the removeLiquidity function within the UniswapV2Router02 contract. The code example shows how to fill in the required parameters and provides a description of each parameter. Duration: 3min

Course Overview

About the course

What you'll learn

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)

Course Description

Who is this course for?

  • Advanced smart contract engineers
  • Web3 developers
  • Smart Contract Security researchers

Potential Careers

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)

Meet your instructors

Tasuku Nakamura

Tasuku Nakamura

Founder at smartcontract.engineer

Smart contract engineer and educator.

Last updated on October 9, 2024

Testimonials

Students Reviews

Read what our students have to say about this course.

Chainlink

Chainlink

Chainlink

Gustavo Gonzalez

Gustavo Gonzalez

Solutions Engineer at OpenZeppelin

Francesco Andreoli

Francesco Andreoli

Lead Devrel at Metamask

Albert Hu

Albert Hu

DeForm Founding Engineer

Radek

Radek

Senior Developer Advocate at Ceramic

Boidushya

Boidushya

WalletConnect

Idris

Idris

Developer Relations Engineer at Axelar