the value of the asset the user wants to get
the value in the liquidity pool of the asset being spent
the value in the liquidity pool of the kind of asset to be sent out
Optional
feeBasisPoints: bigint = 30nthe fee taken in basis points. The default is 0.3% or 30 basis points. The fee is taken from outputValue
inputValue - the value of input required to purchase output
Contains the logic for calculating how much should be taken from the user in exchange for what they want to obtain. Reused in several different places, including to check whether an offer is valid, getting the current price for an asset on user request, and to do the actual reallocation after an offer has been made.