expectedTradeReturn()
Using this function, one can query the contract indicating the source token amount they would like to use, and receive an indication of the expected target token amount.
Note that since the rate changes over time, the target amount of tokens might grow with time as the price changes.
Function Arguments
Name
Type
Description
token
Token
The token address of the token you would like to trade out of the contract
sourceAmount
uint128
The amount of source tokens you are willing to trade out of your wallet against the indicated token
Example
Last updated