What is a token approval?
Across web3, you’ll encounter a range of transaction types, each of which is identifiable in CLV Wallet at the point of confirming the transaction.
Understanding what they are and how to interpret their meaning is an important part of staying safe in web3. The challenge is that much of the information displayed on these screens is either not designed to be human-readable–the long hexadecimal numbers we recognize as account or contract addresses being a prime example–or, at best, is difficult to decipher.
Token approvals are among the most common of the transaction types you’ll encounter and are a vital area to clue up on. In web3, and especially with a self-custodial wallet like CLV Wallet, you’re firmly in control and hold ultimate responsibility for everything you do. That’s why you must know precisely what you’re signing up for when you confirm token approvals.
1.What is a token approval?
In short: permission for a dApp to access and move a specific type of token from your wallet.
These prompts will often appear in CLV Wallet if you frequently use decentralized exchanges (DEXs) and DeFi in general. Most platforms rely on you depositing or transferring your tokens to them for one reason or another, and to do so, you’ll usually use their dApp itself. However, clicking buttons such as ‘Transfer’, ‘Deposit’, or ‘Move’ won’t do anything unless their dApp has your permission–as the wallet owner–to do so.
This is why token approvals are necessary: they enable the dApp to access your tokens on your behalf.
2.What do they signify?
If you grant permission for a dApp to access 1,000 USDT, it can do so whenever you ask it to, without needing you to sign a similar token approval transaction again. This applies until the dApp has had access to 1,000 tokens, at which point you’ll need to sign another transaction.
But what’s going on behind the scenes? Well, when you approve access to a token, in many cases, you’re consenting to the dApp calling the transfer from function, one of the functions defined in the ERC-20 standard. It enables them to transfer a given amount of the token from your wallet into theirs. The amount is determined by a corresponding approve function, for which–you guessed it–you provide inputs for when you sign your token approval.
3.EIP-3009: the permit function and minimizing gas fees
Not every token you come across works in the way we’ve described above, which applies to ERC-20 tokens. This mechanism of approve + transferFrom is not relevant for tokens that have implemented the EIP-3009 model, with the stablecoin USDC being the most prominent example.
With EIP-3009, you sign a permit transaction rather than an approve transaction. These bundle up the approval and transfer into one transaction, meaning that you effectively pay zero gas for the approval and just pay the gas for transferring the tokens.