- A user approves token spending via smart contract.
- The smart contract determines the exchange rate and facilitates the swap between the two tokens.
- The transaction is completed atomically and the tokens are transferred to the user’s wallet.
- Getting a price: Estimate the amount of tokens you will receive for a given amount of exchanged tokens.
- Creating a swap quote: Return a swap transaction payload that you can use to sign and submit in order to execute the swap.