the value of the asset sent in to be swapped
the value in the liquidity pool of the kind of asset sent in
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 inputValue
outputValue - the current price, in value form
Contains the logic for calculating how much should be given back to the user in exchange for what they sent in. 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.