The Pool entity represents a token pair with a balance of each of its tokens.
Returns reserve0 or reserve1, depending on whether token0 or token1 is passed in.
Returns virtual reserve0 or reserve1, depending on whether token0 or token1 is passed in.
Returns maximum output amount based on current pool and the new balances of the pools if the trade were executed.
Returns minimum input amount based on current reserves and the new balances of the tokens in the respective pools
calculates the exact amount of liquidity tokens minted.
- totalSupply requires on-chain lookup.
- The value returned from this function cannot be used as an input to getLiquidityValue.
Calculates the exact amount of token0 or token1 that the given amount of liquidity tokens represent.
- totalSupply, kLast involves on-chain lookup.
- Values returned from this function cannot be used as inputs to getLiquidityMinted.
Returns true if the token is either token0 or token1
Returns the price of the given token in terms of the other token in the pair.
returns token0 amount of the reserve.
returns virtual token0 amount of virtual reserve.
returns token1 amount of the reserve.
returns virtual token1 amount of virtual reserve.