Skip to main content
Outlined below are three methods to remove liquidity from an existing pool:
A spender allowance for the router is required for the LP token.
removeLiquidity supports HTS tokens with custom fees.

Removing HBAR/Token Liquidity

Remove liquidity from an existing HBAR/token liquidity pool. Function name: removeLiquidityETH Recommended gas: 2,800,000 gwei (~ $0.24 USD)
The removeLiquidityETH function operates in HBAR but derives its name from Uniswap on Ethereum. This name was kept to simplify integration for developers versed in Uniswap tools.

Code Overview

Resources:
Typescript

Removing Token/Token Liquidity

Remove liquidity from an existing token/token liquidity pool. Function name: removeLiquidity Recommended gas: 1,600,000 gwei (~ $0.14 USD)

Code Overview

Resources:
Typescript

Removing HBAR/Token Liquidity Supporting Tokens with Custom Fees

Remove liquidity from an existing HBAR/token liquidity pool supporting HTS tokens with custom fees on transfer. Function name: removeLiquidityETHSupportingFeeOnTransferTokens Recommended gas: 3,000,000 gwei (~ $0.26 USD)
The removeLiquidityETHSupportingFeeOnTransferTokens function operates in HBAR but derives its name from Uniswap on Ethereum. This name was kept to simplify integration for developers versed in Uniswap tools.

Code Overview

Resources:
Typescript