When Using Pancake Swap SDK
The Following Function
const exactOut = new Trade.bestTradeExactOut(
[pair_0_1],
token0,
new TokenAmount(token1, parseFloat(amountOut.toString(), 18)),
{ maxNumResults: 3, maxHops: 1 }
)
we receive the following response
outputAmount: TokenAmount {
numerator: JSBI(1) [ 100, sign: false ],
denominator: JSBI(2) [ 660865024, 931322574, sign: false ],
currency: Token {
decimals: 18,
symbol: 't1',
name: xxx,
chainId: 56,
address: 'xxx'
},
token: Token {
decimals: 18,
symbol: 't1',
name: xxx,
chainId: 56,
address: 'xxx'
}
},
based on the above response how does one calculate the exact amounts of tokens one would receive out based on returning result from SDK call do we perform a calculation on?
denominator: JSBI(2) [ 660865024, 931322574, sign: false ]