Penny Wise and Pound Foolish: Quantifying the Risk of Unlimited Approval of ERC20 Tokens on Ethereum

Dabao Wang, Hang Feng, Siwei Wu, Yajin Zhou, Lei Wu, Xingliang Yuan · DOI

Introduction

In the Ethereum ecosystem, interacting with Decentralized Applications (DApps) often requires granting permission to a smart contract to move tokens on your behalf. This is handled via the approve function in the ERC20 standard. To minimize transaction costs (gas fees), many DApps request "unlimited approval"—effectively granting permission to spend an infinite amount of tokens ($2^{256}-1$). While this saves a few dollars in the short term ("Penny Wise"), it exposes users to catastrophic risks if the DApp is compromised ("Pound Foolish").

This study provides the first systematic quantification of these risks, revealing that 22% of users are at high risk of asset theft, while only a negligible 0.2% follow secure practices.

Threat Models

The risk of unlimited approval manifests in two primary ways. First, a DApp itself might be malicious or hijacked, directly using the approval to drain user wallets. Second, an honest DApp might contain a security vulnerability that an external attacker can exploit to call functions that move approved tokens.

Threat models for ERC20 approval exploitation, showing malicious/hijacked DApps (Model 1) and honest but vulnerable DApps (Model 2).

Methodology

The researchers employed a multi-faceted approach to analyze the ecosystem:

  1. Blockchain Analysis: Scanning the entire Ethereum history up to July 2021 using a cluster of 12 machines, identifying and parsing 25.4 million approval transactions.
  2. Interface Investigation: Manually auditing 22 representative DApps and 9 popular wallets for "Interpretability" (risk explanation) and "Flexibility" (ability to modify approval amounts).
  3. Behavioral Characterization: Formalizing five modes of user behavior to track how users manage their approvals over time, identifying those who follow "good practice" (on-demand approval and timely revocation).

The Explosion of Unlimited Approvals

The prevalence of unlimited approvals has grown dramatically alongside the rise of Decentralized Finance (DeFi). The release of Uniswap V2 in May 2020 marked a turning point, after which the volume of approval transactions—particularly unlimited ones—skyrocketed.

Growth of ERC20 approval transactions over time. The dark blue bars represent "Unlimited" approvals, which dominate the transaction count following the DeFi boom.

Key Findings

1. Defaulting to Danger

The study found that 60% of all approval transactions on Ethereum are for unlimited amounts. Alarmingly, all 22 DApps surveyed requested unlimited approval by default. Most users simply click "confirm" without realizing they are granting permanent, infinite access to their funds.

2. UI Deception and Poor Support

User interfaces often fail to protect users. Only 10% of DApp/Wallet UIs provide clear explanatory information about the approval mechanism. Furthermore, some DApps (like Curve.fi and Yearn Finance) were found to have misleading UIs, showing a small approval amount to the user while actually sending an unlimited approval request to the wallet for signing.

3. The "High Risk" State

A user is considered at "High Risk" if they have a non-zero token balance and an active allowance granted to a spender. Most users fail to revoke these approvals after their transactions are complete, leaving a "back door" open indefinitely. The study found that 22% of users currently reside in this high-risk state.

4. Economic Incentives

The primary driver for this insecure behavior is economic. Users frequently choose the risk of total loss over the certainty of paying an additional $5–$20 in gas fees for a limited, one-time approval. Only 0.2% of users were found to follow secure "good practices."

Conclusion

The practice of unlimited approval is a systemic vulnerability in the Ethereum ecosystem. While it offers convenience and cost savings, the lack of user awareness and poor UI design has created a massive attack surface. As the ecosystem evolves, moving toward standards like EIP-2612 (permit) and exploring Layer 2 solutions with lower fees may help mitigate these "Pound Foolish" risks.

Summary updated

Abstract

The prosperity of decentralized finance motivates many investors to profit via trading their crypto assets on decentralized applications (DApps for short) of the Ethereum ecosystem. Apart from Ether (the native cryptocurrency of Ethereum), many ERC20 (a widely used token standard on Ethereum) tokens obtain vast market value in the ecosystem. Specifically, the approval mechanism is used to delegate the privilege of spending users' tokens to DApps. By doing so, the DApps can transfer these tokens to arbitrary receivers on behalf of the users. To increase the usability, unlimited approval is commonly adopted by DApps to reduce the required interaction between them and their users. However, as shown in existing security incidents, this mechanism can be abused to steal users' tokens. In this paper, we present the first systematic study to quantify the risk of unlimited approval of ERC20 tokens on Ethereum. Specifically, by evaluating existing transactions up to 31st July 2021, we find that unlimited approval is prevalent (60%, 15.2M/25.4M) in the ecosystem, and 22% of users have a high risk of their approved tokens for stealing. After that, we investigate the security issues that are involved in interacting with the UIs of 22 representative DApps and 9 famous wallets to prepare the approval transactions. The result reveals the worrisome fact that all DApps request unlimited approval from the front-end users and only 10% (3/31) of UIs provide explanatory information for the approval mechanism. Meanwhile, only 16% (5/31) of UIs allow users to modify their approval amounts. Finally, we take a further step to characterize the user behavior into five modes and formalize the good practice, i.e., on-demand approval and timely spending, towards securely spending approved tokens. However, the evaluation result suggests that only 0.2% of users follow the good practice to mitigate the risk.
BibTeX
@inproceedings{wang2022penny,
  author = {Dabao Wang and Hang Feng and Siwei Wu and Yajin Zhou and Lei Wu and Xingliang Yuan},
  title = {{Penny Wise and Pound Foolish: Quantifying the Risk of Unlimited Approval of ERC20 Tokens on Ethereum}},
  booktitle = {RAID},
  year = {2022},
  doi = {10.1145/3545948.3545963},
}

Loading related content...

Figure