How to Make a Swap
Here you can find step-by-step instructions on how to execute a swap on the testnet.
Time to make our first trade! As the word "Swap" suggests, all trading on the testnet involves the swapping of one token for another. As a trader, you specify the token you want to give and the token you want to receive in return. Obviously, in order to make a swap you will need to have some tokens already in your wallet.
The Swap Page.
The Maverick dApp loads the Swap page by default, but you can also navigate to it at any time using the menu in the top left. When you arrive at the Swap Page, you will see a window with two token inputs. The top one is used to indicate the token you want to trade on Maverick; the bottom one is used to indicate the token you want to receive in return.
Close-up of the Swap window.
Use the drop-down menus (1) to choose a token pair for your swap. Once you have one token selected, the other drop-down menu will present a list of tokens available for swapping with that token. You can also use the arrow button (2) between the tokens to switch the direction of your swap quickly. The tokens available for swapping are limited by the pools currently deployed on Maverick.
You can use the numeric input (3) in the token inputs to choose the amount of tokens you want to swap. You can edit the input or the output value, and the AMM will update the other value to the corresponding amount based on the current price of the tokens. If you want to swap all of the token you hold, you can click the Max button (4) to choose the maximum amount you have available in your connected wallet. You will also be able to see the current balance (5) of each token that is currently in your wallet.
Once you have chosen your tokens and token amounts, the button will update to say Swap [input token] to [output token] (6) (so long as your wallet balance is sufficient to make the swap and the tokens have both been approved).
Please note, the first time you use any token on Maverick, you will be asked to Approve that particular token. UI buttons like Swap/Deposit will show as Approve [Token] until that token has been approved. Approving a token requires you to confirm the choice in a Metamask wallet pop-up. You may also need to set an appropriate spending allowance. Read more here.
Below the Swap button, you can find a summary of the details of your swap:
- The price you are paying for your swap, expressed as how much output token you are getting for each input token
- The minimum amount of the output token you are guaranteed to receive in the swap
The AMM guarantees a minimum amount because there can still be fluctuations in the pool before you click the Swap button and send your transaction to the blockchain. But you can be certain you will receive the minimum amount if you choose to execute the transaction.
In the screenshot, we can note that the previewed output is around 9.995706278 USDT. This may seem a little strange, given that USDC and USDT theoretically share an equal value. The difference in Input and Output is caused by something called slippage, which is explained at greater length in our FAQ.
If you want to fine-tune the parameters of your swap, you can use the controls icon (7) in the top right of the window. This will allow you to select your slippage tolerance (i.e., how much drift from the quoted price you are comfortable with) and indicate how long you are willing to wait for the transaction to confirm before abandoning it. For more information on slippage, see our FAQ section!
If you are happy with the details of your swap, click Swap [input token] to [output token]. The UI will now ask you to review and confirm your swap.
The Swap page asking for confirmation.
Clicking Confirm Swap will send a transaction authorization to your wallet. At this point, a pop-up window should appear asking you to confirm the transaction in your wallet. Click Confirm in this window, and it will close. After a short wait, you will see a green pop-up that reads "Swap Successful."
Congratulations--you have completed your first swap on the Maverick!