0/5
## Removing Liquidity With One Coin Let's explore how a liquidity provider utilizes the `remove_liquidity_one_coin` function when they want to remove their liquidity in a single token. When a liquidity provider seeks to remove all of their liquidity at once, they can call the `remove_liquidity` function. This would result in receiving all three tokens - USDC, WBTC, and ETH. However, the `remove_liquidity_one_coin` function allows them to specify and receive their liquidity in a single, preferred token. For example, consider a pool comprised of USDC, WBTC, and ETH. A liquidity provider might want to remove their liquidity, but only receive ETH. They'll call the `remove_liquidity_one_coin` function and provide their liquidity provider shares (LP shares). The pool contract will then burn these LP shares and calculate the amount of liquidity to return to the user. Since the user has chosen to receive their liquidity in ETH, the pool contract calculates the correct amount of ETH and sends it back to the user. Users also have the option to receive WETH instead of ETH. If this option is chosen, the pool contract will handle things slightly differently. After the LP shares are returned and the amount of ETH to return to the user is calculated, that ETH will instead be deposited into the WETH contract. The WETH contract will convert the ETH to WETH, and then the pool contract will send this WETH to the user.
Learn how to withdraw liquidity in a single token using remove_liquidity_one_coin—ideal for LPs who prefer ETH, WETH, or another token.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Course Overview
About the course
AMM math for Curve Cryptoswap
How liquidity is concentrated
Price-repegging
How function calls interact with the AMM
Curve Cryptoswap state variables
How the function exchange works
How to swap tokens
How to add and remove liquidity
Math for Curve Cryptoswap’s internal price oracle
Implicit differentiation
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Blockchain Financial Analyst
$100,000 - $150,000 (avg. salary)
DeFi Developer
$75,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 May 15, 2025
DeFi Developer
Curve CryptoswapDuration: 4min
Duration: 1h 21min
Duration: 28min
Duration: 26min
Duration: 14min
Duration: 24min
Duration: 59min
Duration: 5min
Course Overview
About the course
AMM math for Curve Cryptoswap
How liquidity is concentrated
Price-repegging
How function calls interact with the AMM
Curve Cryptoswap state variables
How the function exchange works
How to swap tokens
How to add and remove liquidity
Math for Curve Cryptoswap’s internal price oracle
Implicit differentiation
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Blockchain Financial Analyst
$100,000 - $150,000 (avg. salary)
DeFi Developer
$75,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 May 15, 2025