Create pool

1. Create a pool with some initial liquidity to be added

use sdk.pool.createPoolTransactionPayload method.

Function input params

  • currencyA: coin/fa type of currency token

  • currencyB: coin/fa type of currency token

  • currencyAAmount: the amount about currency A, which used to add liquidity

  • currencyBAmount: the amount about currency B, which used to add liquidity

  • feeTierIndex: Fee Rate Tier will affect price precision. Now mainnet exist some different type FeeRateTier, the correspond to different fee rates.

Tick spacing
Fee Rate
FeeTierIndex

1

0.01%

0

10

0.05%

1

60

0.3%

2

200

1%

3

20

0.1%

4

50

0.25%

5
  • currentPriceTick : The tick corresponds to the current price.

  • tickLower : The tick corresponds to the lower price.

  • tickUpper : The tick corresponds to the upper price.

  • SDK provided a util function `priceToTick` for the calculation from price to tick.

  • -443636 < tickLowerIndex < currentPriceTickIndex<tickUpperIndex < 443636, 443636 is a constant, derived from the maximum range representable by the Q32.62 fixed-point number format.

  • Currently, creating a pool requires adding bidirectional liquidity.

  • slippage : slippage value. 0.1 means 0.1%

Example

The White Paper is for informational purposes only. Nothing in the White Paper constitutes legal, financial or tax advice. Its content may be updated from time to time without express notice. You should seek your own professional advice before engaging in any activity in connection with Hyperion. See Legal Disclaimerarrow-up-right.

Last updated