When using a decentralized exchange such as Saturn Network to sell ERC20 tokens, you will be required to complete two transactions to get your new order on the books. The initial step is to submit what is known as an Approve transaction, and once that has confirmed you will be able to set the price and the amount of tokens you wish to sell.
We have witnessed multiple new users on our platform becoming very confused around the ERC20 Approve step, it isn't always understood or even known about. Mostly because various exchanges and wallets have different ways of displaying this information with no real industry standard. Let's walk through what it is and how the approval step looks on Saturn Network when trading tokens.
What is ERC20 Approve?
When you make a trade on our platform, the transactions are being executed by the exchange's smart contract to provide you with a trustless trading experience. Before you reach this step, you must permit the smart contract to interact with your wallet and your chosen token. Note that this does not mean the exchange's smart contract can spend your funds without your knowledge, you will always need to sign a transaction.
Here is how we deal with ERC20 Approve on Saturn Network
First, you will see our message that you need to complete the approval step before you can continue, notice how the message is unique to the token you want to trade. Once you click the green button, you will need to sign the transaction with your cryptocurrency wallet.
Depending on which dApp browser you use, things can look different at this stage, here are some examples:
Most wallets, as you can see above, simply show this step as a regular transaction with the amount being zero as nothing is being sent. Only MetaMask's notification is different and a little misleading. Saturn Protocol automatically sets the approval to the token's total supply, to ensure you only ever have to do this once. It does not mean our exchange can spend your tokens as you have to sign a transaction when you wish to create an order or execute a trade.
Once you submit the approve transaction, our website will let you know the approval step is pending.
As soon as the transaction has been confirmed on the network, you will be greeted with the order page where you can complete your trade and sign your transaction.
Why approve the token's total supply?
It makes very little sense to ask traders to submit an extra transaction every time they wish to trade, this would mean spending double the amount in gas fees. Which will add up for active traders, especially during periods where network fees are expensive. It also lowers the chance of user error where setting the wrong approval amount would cause your trades or order creation to fail.
Furthermore, we believe strongly that cryptocurrency projects should not be creating ERC20 tokens anymore as it is an outdated standard that contains risks for users. Both Saturn DAO tokens on Ethereum and Ethereum Classic follow the ERC223 standard, which removes this approve headache from the equation completely.
If you have any further queries about ERC20 Approve or how to trade on our platform please come ask on our community forum.