Skip to main content
Create a new HBAR/token or token/token liquidity pool. There are two methods to add a new liquidity pool:
See Pool creation fee to get the current pool creation fee.
Ensure that the liquidity pool does not exist on-chain prior to creation of the new pool. See Check for an existing pool.
Increase the client’s max token auto-association by one to receive the incoming LP token.
To add liquidity to an existing pool, see Adding liquidity.
Both methods supports HTS tokens with custom fees.

Creating a New HBAR/Token Liquidity Pool

Create a new HBAR/token liquidity pool and provide it with initial liquidity. Function name: addLiquidityETHNewPool Recommended gas: 3,200,000 gwei (~ $0.27 USD)
A spender allowance for the router is required for the HTS token.
The addLiquidityETHNewPool 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

Creating a New Token/Token Liquidity Pool

Create a new token/token liquidity pool and provide it with initial liquidity. Function name: addLiquidityNewPool Recommended gas: 3,200,000 gwei (~ $0.27 USD)
A spender allowance for the router is required for both HTS tokens.

Code Overview

Resources:
Typescript