Documentation ¶
Index ¶
- Variables
- func ExponentiateDecimals(decimals int64) *big.Rat
- func GetAmount0ForLiq(sqrtRatioAX96, sqrtRatioBX96, liq *big.Int) (amount0 *big.Rat)
- func GetAmount1ForLiq(sqrtRatioAX96, sqrtRatioBX96, liq *big.Int) (amount1 *big.Rat)
- func GetAmountsForLiq(sqrtRatioX96, sqrtRatioAX96, sqrtRatioBX96, liq *big.Int) (amount0 *big.Rat, amount1 *big.Rat)
- func GetPriceAtSqrtRatio(x *big.Int) *big.Rat
- func GetSqrtRatioAtTick(t *big.Int) *big.Int
Constants ¶
This section is empty.
Variables ¶
View Source
var ( One = new(big.Int).SetInt64(1) Zero = new(big.Int).SetInt64(0) // Two192 for some calculations (2 ** 192) //6277101735386680763835789423207666416102355444464034512896 Two192 = new(big.Rat).SetInt(new(big.Int).SetBits([]big.Word{0, 0, 0, 1})) )
View Source
var ( // MinTick that could be used in the tick range. MinTick = new(big.Int).SetInt64(-887272) // MaxTick that could be used. MaxTick = new(big.Int).SetInt64(887272) // MinSqrtRatio (price) that could be set. MinSqrtRatio = new(big.Int).SetInt64(4295128739) // MaxSqrtRatio that could be used as price data. //1461446703485210103287273052203988822378723970342n MaxSqrtRatio = new(big.Int).SetBits([]big.Word{0x5d951d5263988d26, 0xefd1fc6a50648849, 0xfffd8963}) )
Q96 to use for some math operations 79228162514264337593543950336
Functions ¶
func ExponentiateDecimals ¶
func GetAmount0ForLiq ¶
func GetAmount1ForLiq ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.