Formulas

For application development, we recommend to use our SDK. But here you can find formulas for interaction at a low level.

Here you can find formulas for swap.alcor contract.

Pool token price calculation


sqrtPriceX64 ** 2 / 2 ** 128 * 10 ** (precisionA-precisionB)


2 ** 128 / sqrtPriceX64 ** 2 * 10 ** (precisionB-precisionA)

Last updated