Remove liquidity from an existing token/token liquidity pool
Outlined below are three methods to remove liquidity from an existing pool:
Contract ID: SaucerSwapV1RouterV3
A spender allowance for the router is required for the LP token.
removeLiquidity supports HTS tokens with custom fees.
Remove liquidity from an existing HBAR/token liquidity pool.
Function name: removeLiquidityETH
⛽ Recommended gas: 2,800,000 gwei (~ $0.24 USD)
Parameter Name | Description |
---|---|
address token | EVM address of the token paired with HBAR |
uint liquidity | LP liquidity amount to remove |
uint amountTokenMin | The minimum token amount to receive in its smallest unit |
uint amountETHMin | The minimum HBAR amount to receive in its smallest unit |
address to | EVM address to receive the tokens |
uint deadline | Deadline in Unix seconds |
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.
Remove liquidity from an existing token/token liquidity pool.
Function name: removeLiquidity
⛽ Recommended gas: 1,600,000 gwei (~ $0.14 USD)
Parameter Name | Description |
---|---|
address tokenA | EVM address of the first HTS token |
address tokenB | EVM address of the second HTS token |
uint liquidity | LP liquidity amount to remove in its smallest unit |
uint amountAMin | The minimum amount for the first token in its smallest unit |
uint amountBMin | The minimum amount for the second token in its smallest unit |
address to | EVM address to receive the tokens |
uint deadline | Deadline in Unix seconds |
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)
Parameter Name | Description |
---|---|
address token | EVM address of the token paired with HBAR |
uint liquidity | LP liquidity amount to remove in its smallest unit |
uint amountTokenMin | The minimum token amount to receive in its smallest unit |
uint amountETHMin | The minimum HBAR amount to receive in its smallest unit |
address to | EVM address to receive the tokens |
uint deadline | Deadline in Unix seconds |
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.
Remove liquidity from an existing token/token liquidity pool
Outlined below are three methods to remove liquidity from an existing pool:
Contract ID: SaucerSwapV1RouterV3
A spender allowance for the router is required for the LP token.
removeLiquidity supports HTS tokens with custom fees.
Remove liquidity from an existing HBAR/token liquidity pool.
Function name: removeLiquidityETH
⛽ Recommended gas: 2,800,000 gwei (~ $0.24 USD)
Parameter Name | Description |
---|---|
address token | EVM address of the token paired with HBAR |
uint liquidity | LP liquidity amount to remove |
uint amountTokenMin | The minimum token amount to receive in its smallest unit |
uint amountETHMin | The minimum HBAR amount to receive in its smallest unit |
address to | EVM address to receive the tokens |
uint deadline | Deadline in Unix seconds |
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.
Remove liquidity from an existing token/token liquidity pool.
Function name: removeLiquidity
⛽ Recommended gas: 1,600,000 gwei (~ $0.14 USD)
Parameter Name | Description |
---|---|
address tokenA | EVM address of the first HTS token |
address tokenB | EVM address of the second HTS token |
uint liquidity | LP liquidity amount to remove in its smallest unit |
uint amountAMin | The minimum amount for the first token in its smallest unit |
uint amountBMin | The minimum amount for the second token in its smallest unit |
address to | EVM address to receive the tokens |
uint deadline | Deadline in Unix seconds |
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)
Parameter Name | Description |
---|---|
address token | EVM address of the token paired with HBAR |
uint liquidity | LP liquidity amount to remove in its smallest unit |
uint amountTokenMin | The minimum token amount to receive in its smallest unit |
uint amountETHMin | The minimum HBAR amount to receive in its smallest unit |
address to | EVM address to receive the tokens |
uint deadline | Deadline in Unix seconds |
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.