New: Wallet recovery made easy with Ledger Recover, provided by Coincover

Get started

Up your Web3 game

Ledger Academy Quests

  • Test your knowledge
  • Earn POK NFTs
Play now See all quests

Ethereum Token Approvals Explained

Beginner
Coins spiraling in a circle
KEY TAKEAWAYS:
— Token approvals refer to the on-chain permission that crypto owners give to web3 applications to access and utilize their assets for automated transactions.

— While token approvals are a great example of the self-sovereignty that comes with crypto, they also put heightened responsibility on users to be aware of the risks that they can carry.

— Getting educated on how token approvals work and how to mitigate their potential risks is an important step all Ethereum users should take.    

Ethereum revolutionized the blockchain ecosystem with its enabling of self-executing smart contracts and sophisticated Web3 applications. 

These apps generally need permission from wallet owners to function, which users can grant by signing transactions with their private keys. Of course, signing individual transactions every time can be cumbersome for users, especially for repetitive tasks. Besides creating a poor overall user experience, it also leads to higher overall gas fees.

The token approval mechanism solves this challenge while retaining the security of funds. But there are also some associated risks that users need to be aware of.

So, in this article, we will explore what token approvals are and how they work, the history of token approvals, how to make them safely, and when you should use them.

Let’s dive in.

What Are Token Approvals?

Token approvals are the on-chain permissions that crypto wallet users grant to smart contracts, primarily on decentralized applications (dApps). This allows smart contracts to access a specific amount of a user’s tokens without needing a wallet signature for individual transactions. In some instances, a user’s approval lets a dApp transfer assets from the user’s wallet to the dApp’s smart contract to perform transactions automatically.

Some dApps may request access to a finite quantity of funds while others request unlimited access. A user must review these parameters before confirming a token approval request from smart contracts.

As the approval confirmation happens on-chain, there’s a gas fee associated with it that users must pay. Once done, the blockchain immutably records the transaction for transparency and security. 

So why exactly might a dApp require a token approval?

What Are Token Approvals For?

By default, a dApp cannot access a user’s crypto assets without explicit permission through wallet signatures. Token approvals represent documented permission for dApps to use these assets, even when you’re not around to sign transactions.

For example, let’s say you want to use a lending platform like Aave. To do this, you must first approve the tokens you want to lend. The token approval will permit Aave to access your wallet and transfer funds to a lending pool.

Similarly, NFT marketplaces also require token approvals. If you want to sell an NFT on a platform like OpenSea, you must grant the marketplace permission to handle the NFT transaction for you.

But what happens behind the scenes when dApps access tokens from a user’s wallet?

How Token Approvals Work

Different token standards have slightly different methods for token approvals, though they all carry out the same function more or less.

For ERC-20 tokens, there are three important smart contract functions involved in token approvals:

  • The ‘approve’ function, which is what allows a smart contract address to spend a user’s tokens
  • The ‘allowance’ function, which states how many tokens the user has approved the smart contract to spend
  • The ‘transferFrom’ function, which is how the contract spends the tokens 

Token approvals have evolved to improve user experience, reduce transaction costs, and enhance asset security. The following section elaborates on the history of each token standard and its corresponding approval mechanisms.

The History of Token Approvals

ERC-20 Token Standard’s “Approve”: The Original Approval Mechanism

The ERC-20 token standard’s ‘approve’ function is the original token approval mechanism. It allows you to specify the number of tokens you approve a smart contract to move out of your account. Despite being the foundation of Ethereum token approvals, this method has some disadvantages.

Firstly, each approval registers itself as a separate transaction on the blockchain. As you have to pay gas fees for each transaction, this can quickly add up. Secondly, you have to pre-approve a set amount of tokens that a given contract can use. This means you have to provide a new token approval every time you hit the approved amount of tokens on a contract. 

Finally, giving unlimited token approvals to a dApp can hamper wallet security. That’s because a bad actor can exploit a smart contract with unlimited token approval to drain tokens from your wallet.

ERC-2612 Permit Signatures

ERC-2612 introduced a new method of Ethereum token approvals known as Permit signatures. To explain, Permit signatures allow you to grant token approvals by signing a message off-chain. Afterward, the dApp’s smart contract uses this off-chain signature to verify and execute the token approval on-chain.

This approach comes with a few key benefits. For one, signing the approval off-chain means that users are spared paying gas fees until the transaction happens on-chain. Moreover, these off-chain approvals mean that you don’t have to execute a new on-chain transaction with every signature, vastly improving the user experience of interacting with dApps. ERC-2612 permit signatures also enhance asset security, allowing users to predefine limits and expiration times for token approvals.

Unfortunately, as useful as it is, ERC-2612 has not been universally adopted as of yet. 

Permit2

Permit2 is an open-source token approval contract built by the Uniswap team that aims to extend the benefits of ERC-2612 to all tokens. That is to say, Permit2 allows you to use gasless approvals for any token, regardless of whether that token has integrated ERC-2612. In addition, Permit2 has automatic expiration built-in, eliminating the security risk that comes with lingering token approvals.

Permit2 also lets users batch together multiple tokens and execute several token transfers in one transaction. Likewise, users can revoke token approvals in batches.

Speaking of revoking token approvals, why exactly might you want to do that, and how do you know when it is necessary?

The Risks of Approving Tokens

While token approvals are an essential step for permissioned accessibility to users’ assets they do come with some risks that are worth keeping in mind.

One of the primary ways that bad actors exploit token approvals is through the use of malicious smart contract functions. If an unsuspecting user selects the ‘SetApprovalForAll’ function on a malicious contract or dApp, scammers can drain tokens from the user’s wallet. 

Hackers can similarly drain a user’s wallet by exploiting non-malicious but faulty smart contracts. This is one of the dangers of lingering approvals, as a smart contract could be compromised long after you initially interact with it.

Many people have also fallen victim to scammers after interacting with the wrong smart contract, thinking it was for a trusted dApp. This often happens as a result of phishing scams, which is why it’s so vital to triple-check a platform before signing any token approvals. 

While not nearly as common, it is also possible for a project owner to go rogue and deliberately create a faulty smart contract within a legitimate dApp. The owner could then exploit the existing token approvals to steal funds. 

Does Unlimited Token Approval Mean the Contract Has Access to All My Assets?

When you give an ‘unlimited’ token approval, it is only applicable to the cryptocurrency or NFT collection for which you approved the transaction.

For example, if you provide unlimited approval for ETH, then the smart contract can access all the ETH in your crypto wallet. However, it cannot access other assets like USDT or USDC, if you have any. 

Similarly, if you give unlimited approval for Crypto Punk NFTs, the smart contract can only access the NFTs from that collection.

When To Revoke Your Approvals?

There are multiple circumstances where you should revoke your token approvals:

You Don’t Use That App or Service Anymore

When you stop using a dApp, you don’t regularly track suspicious activity like data breaches on the platform. Thus, it is good practice to limit or revoke your token approvals from a dApp you don’t use. It reduces the risk of losing assets to hacks, phishing scams, and other exploits. 

The Smart Contract Has an Exploit

Sometimes a smart contract has a security flaw that attackers can exploit. For example, the NFT trading platform, NFT Trader, recently faced a security threat where attackers stole NFTs worth over $3 million. The company reported an attack on old smart contracts and requested users to revoke their token approvals for two specific contract addresses.

You Connected to the Smart Contract Accidentally

Before a token approval, you have the opportunity to verify the smart contract details on a block explorer like Etherscan. This will reveal any unusual activity or a potential scam. However, if you still connect to the wrong contract, you can revoke your token approval as soon as you notice it.

You Just Got Scammed

If a scammer steals your funds, revoking token approval won’t help you get your money back. However, you should revoke any active approvals to prevent hackers from stealing more. Reviewing and revoking token approval periodically reduces the chance of approval exploits.

How To Approve Tokens Safely

You can’t manually assess or predict all the risks associated with using smart contracts or assigning them token approvals. But you can take some safety measures to minimize your chances of being a victim of hacks and thefts. 

Only Allow Token Approvals on Trusted Platforms

You must only provide token approvals to trusted dApps. Make sure to check what a dApp is requesting before you approve your tokens. If the dApp promises extraordinary returns or anything that seems too good to be true, be extremely vigilant and avoid connecting your wallet to it. 

You must also cross-check the dApp’s name, URL, and smart contract address on a block explorer and provide limited token access to unfamiliar dApps.

Do Your Research (DYOR)

It is important to perform due diligence before you approve tokens. Many fake dApps will have flaws like wrong spellings, low-quality images or logos, and other mistakes. Do a thorough check before approving your tokens.

You can also try to find reviews or community discussions around dApps that you are skeptical about. 

Segregate Your Assets: Keep Your Valuable Assets Cold

Even when you take all precautions, there are chances of losing your funds to unforeseen smart contract exploits. To avoid losing all your assets at once, you must segregate your crypto assets into multiple accounts. 

For instance, you can have three separate accounts. You can use one as a vault to safeguard your long-term crypto holdings. You should never connect this account to any smart contract. 

You can then use the second account to buy and sell assets on trusted platforms. And finally, the third wallet acts as a burner wallet specifically for connecting to potentially untrustworthy platforms.

If you use this setup, your long-term holdings stay safe from approvals you make with your other accounts.

Remember To Revoke Your Approvals

You must have complete control over your tokens and revoke any active permissions that seem unnecessary. Services like Revoke.cash and Coinbrain allow users to scan wallet addresses and revoke access to dApps that they no longer use.

However, approving and revoking tokens for each transaction is time-consuming and expensive. This is why a user might not revoke their approvals, even though this can negatively affect the security of their assets. More often than not though, failure to revoke your approvals could end up being more expensive.

Does Revoking Approvals Cost Money?

Assigning and revoking token approvals are both an on-chain process which means that yes, revoking token approvals does incur a gas fee. However, newer blockchain updates like those mentioned previously do offer gasless token approval and revoking mechanisms, as well as the ability to revoke approvals in batches.

How To Revoke Ethereum Token Approvals

You can easily revoke Ethereum token approvals with Revoke.cash and the Ethereum Token Approval tool on Etherscan.

How To Revoke Token Approvals on Revoke.cash

Follow the steps below to revoke your tokens through Revoke.cash:

Step 1

Click on ‘Connect Wallet’ in the top right corner. You can also enter a wallet address on the search bar at the top of the page.

Step 2

Review your active approvals by selecting the network and other filtering options.

Step 3

You can now revoke the token approvals for the dApps that you don’t use anymore.

How To Revoke Token Approvals on Etherscan

Follow the steps below to revoke your tokens through the Ethereum Token Approval page on Etherscan:

Step 1

Enter your wallet address in the search bar and click the search button. It will display the list of smart contracts that are connected to the address.

Step 2

Click on ‘Connect to Web3’ to connect your web3 wallet.

Step 3

Click the ‘Revoke’ button for the smart contract you no longer want to interact with. 

Note that every smart contract will have its own ‘Revoke’ button. So, you will have to individually revoke access for each one of them.

Final Thoughts on Token Approvals

Token approvals demonstrate that web3 users truly own their assets and can make sovereign decisions about how these assets interact with dApps. However, there are risks associated with them that users can only mitigate if they clearly understand the concept and use it wisely.

While hardware wallets are useful as they allow you to better secure your private keys, they cannot protect you from signing malicious contracts. That’s why properly segregating your crypto assets is one of the best ways to secure yourself against the potential risks of token approvals. 

Thankfully, with a single Ledger device, you can easily manage an unlimited number of accounts. That means that you can set up separate mint, trade, and vault accounts in the same wallet and label them on the Ledger Live app, helping you keep track of your accounts and keep your valuable assets safe.

So what are you waiting for? Join the Ledger ecosystem so that you can enjoy the benefits of self-custody and enhanced security as you explore all that the world of crypto has to offer.


Stay in touch

Announcements can be found in our blog. Press contact:
[email protected]

Subscribe to our
newsletter

New coins supported, blog updates and exclusive offers directly in your inbox


Your email address will only be used to send you our newsletter, as well as updates and offers. You can unsubscribe at any time using the link included in the newsletter.

Learn more about how we manage your data and your rights.