Creating a swap requires 3 pieces of information:
- 1.The token you're sending, and how much you'll send,
- 2.The token you're receiving, and how much you'll receive,
- 3.The wallet that will execute the swap.
To get started, browse to the Veriswap website and connect your wallet
Once your wallet is connected, you can start by specifying the token to send. You need to paste in a valid ERC20 token address of the token you're sending.
When you've pasted in a valid ERC20 token address you can then specify the amount you want to send. To save time you can click on the purple percentage amount buttons to automatically fill in a that percentage of your wallet balance of that token. If you click 100%, you will be sending all of your balance of that token.
Now specify which token you want to receive in the swap. Once you provide a valid ERC20 token address you will be able to specify how many tokens you will receive in the swap.
The swap won't check that the executor has enough tokens to complete the swap at this stage.
Now set the executor of the swap. This is the wallet address of the other party that you want to complete the swap. Nobody else but the executor can complete the swap.
Specifying the executor will reveal extra options to Require Signata Identity and Enforce Risk Detection. You can enable these if you wish for the swap.
Now, you must Approve and then Open Swap. Both of these actions require signatures submitted on the blockchain, and will incur network gas fees. Approval is needed to let the Veriswap contract transfer your tokens out of your wallet, and Open Swap creates the swap record on the chain.
Once the swap has been opened on the blockchain, you will see a confirmation message. You also now cannot create any more swaps until the currently open swap is completed or canceled.
You will see a link at the top of the page to Manage Your Swap.
Click on the button to open the swap information page. You can give the URL of the page you're looking at to the executor so they can complete the swap.
To execute a swap, go to the swap URL provided to you by the creator of the swap and connect your wallet.
You will be shown details about the swap for you to review before you execute.
If you are content with the swap details, click Approve and then Complete Swap. Both of these actions require signatures submitted on the blockchain, and will incur network gas fees. Approval is needed to let the Veriswap contract transfer your tokens out of your wallet, and Complete Swap executes the swap record on the chain.
If you need to change the executor of a swap after it's been created, you can simply open up your created swap. You'll see a message at the top confirming that you're looking at your own swap, and a warning that you're not the designed executor of it.
Down the bottom you will find a textbox to enter a new executor address. Provide a new valid wallet address and click Change Executor.
If you wish to cancel the swap, just click Cancel Swap at the bottom of the page.