Written By
Community Wizard

Breaking Down the Steps of Token Approval

November 24, 2021

As newcomers to the decentralized economy transition away from the traditional finance system, there is a slight learning curve when it comes to new concepts and new ways of exchanging value.

One area that can be particularly difficult at first is executing transactions on Ethereum. Transacting with ERC-20 tokens on Ethereum and EVM-compatible networks is a multi-step process, and each step must be completed in order for transactions to be submitted to the blockchain. 

There are a few things that a new user must initially do to start participating in the decentralized economy:

  1. Use a fiat on-ramp (ie. Coinbase) to get tokens.
  2. Create a new wallet whether it be a hot wallet (Metamask, Coinbase wallet) or a cold wallet (Ledger, Trezor).
  3. Send the tokens from the fiat on-ramp to your Ethereum wallet.

After you complete this checklist you are ready for your first transaction, whether it be a token exchange, adding or removing liquidity, or depositing your tokens in a vault.

What is Token Approval?

Within Ethereum, there are 2 types of tokens that users transact with most frequently: ETH (the native currency) and ERC-20 tokens (all non-ETH tokens). If a user is transacting with ETH, they can simply perform the transaction by clicking “confirm” in the transaction window.

Token approval comes into play when a user is transacting with a token other than ETH. For example, if a user wants to transact with an ERC-20 token, there are TWO steps for full transaction approval:

  1. The user must click “confirm” in the first transaction window to indicate that the smart contract is allowed to transact with the token. This is the approval step.

  2. The user must click “confirm” in the second transaction window to complete the transaction. This is the confirmation step.
The transaction window on the left is an example of what the approval step will look like. The transaction window on the right is an example of what the confirmation step will look like.

For ERC-20 transactions, users must approve the smart contract’s interaction with your token in the first transaction window, and then they must confirm the submission of the transaction to the blockchain in the second transaction window.

When users are transacting with ETH on its own, the only step that is required to complete a transaction is to confirm that you want to submit a transaction to the blockchain. When users are transacting with ERC-20 tokens that are underpinned by a self-executing smart-contract, a second step is added so that users can provide approval for the smart contract to interact with the token on their behalf. This “approval” step is followed by the regular confirmation that users want their transaction to be submitted to the blockchain. 

Limited vs. Infinite Token Approval

To reiterate, transacting with ERC-20 tokens is a 2-step process. This next section illustrates two different types of token approvals using the USDC token as a reference.

On Zapper, there are two kinds of token approvals that a user can select in their Transaction Settings: Limited and Infinite. This selection is made by toggling the Infinite Allowance setting.

The screenshot below demonstrates what your transaction will look like if you have your transactions set to Limited. The current balance of USDC tokens in the wallet is set for approval on the smart contract. Once the transaction is complete, any future USDC balance will require manual approval by the user for this smart contract.

The screenshot below demonstrates what your transaction will look like if you have your transactions set to Infinite. The current balance of USDC tokens in the wallet is set for infinite approval. Once the transaction is complete, any future USDC balance for this smart contract will NOT require manual approval by the user. Future transactions of this kind will automatically approve the smart contract to transact on the user’s behalf.

How Do I Choose between Limited and Infinite Token Approval?

There are pros and cons to both Limited and Infinite token approval. Limited Token approval is the safest method of transacting, requiring users to provide approval each time a smart contract needs to transact on their behalf. This gives users greater control over each transaction they submit to the blockchain. A downside of Limited Token approval is that it is often less efficient if a user is frequently transacting with the same ERC-20 token on the same smart contract. They will have to re-approve the token and pay gas for both the approval and confirmation steps.

When it comes to Infinite Token approval, users will only have to pay gas once for a one-time approval of the current balance of the ERC-20 token, and any future balance of that token for the smart contract. So it can be a time- and money-saving strategy to set Infinite approval for recurring transactions. The drawback is the high level of risk that comes with Infinite Token approval. If you are transacting with a smart contract that has a vulnerability (an error in the code, for example), ERC-20 tokens that are pre-approved can be drained from the wallet if a bad actor notices the exploit. If you do choose to select Infinite Token approval, it is common practice and highly recommended that you check in and manage your Infinite Token approvals regularly. 

A final note for clarity: when a user approves an ERC-20 token transaction, each transaction is specific to one smart contract. For example, the token approval of USDC required for a token swap is distinct from the token approval of USDC to be added to a liquidity pool. Each type of transaction will be underpinned by a different smart contract, and each unique smart contract requires its own unique token approval, and for users to decide on whether each unique smart contract has Limited or Infinite Token approval. 

Safety First

The best tool in a Web3 user’s belt is knowledge. Being aware of how the complex systems that make up the decentralized economy, how these systems work, and the choices available to balance efficiency with safety can set a newcomer apart from an expert.

Manage your ERC-20 tokens on Zapper.
View balances, swap, save, and manage token approvals for your tokens.

Related Posts