Get Elastic Pool Addresses

Uncover The Best Pools

Overview

For each token pair, there are possibly many multiple pools with different configurations. As such, it is necessary to specify which pools are to be used for fetching token rates, trade execution and liquidity provision.

Selecting the right pool

KyberSwap Elastic contract provides a function to get a specific pool. For each inputs including tokenIn, tokenOut, fee there will be an exact pool.

The input fee parameter can be:

  • 8 in BPS ~ 0.008%

  • 10in BPS ~ 0.01%

  • 40in BPS ~ 0.04%

  • 300in BPS ~ 0.3%

  • 1000in BPS ~ 1%

getPool()

Returns the pool address for a given pair of tokens and a swap fee. Note that the token order does not matter.

Input

FieldTypeExplanation

tokenA

address

contract address of either token0 or token1

tokenB

address

contract address of the other token

swapFeeBps

uint16

swap fee, in basis points

Output

FieldTypeExplanation

pool

address

The pool address. Returns null address if it does not exist

Last updated

Change request #477: Elastic fee tier and token launches