Calculate the input amount needed to receive a desired output amount on a bonding curve.
This function determines how much of the input asset you need to provide to get a specific output amount.
This function does not take into account fees.
Returns
The input amount required to achieve the desired output
Throws
Error if the bonding curve type is unsupported or calculation errors occur
Calculate the input amount needed to receive a desired output amount on a bonding curve. This function determines how much of the input asset you need to provide to get a specific output amount. This function does not take into account fees.
Returns
The input amount required to achieve the desired output
Throws
Error if the bonding curve type is unsupported or calculation errors occur