解决对ERC20令牌的多次取款攻击
Resolving the Multiple Withdrawal Attack on ERC20 Tokens
摘要:
自定义令牌是部署在以太坊和其他区块链平台上的分散式应用程序(dapps)的组成部分。对于以太坊来说,ERC20标准是一种广泛使用的令牌接口,可以与许多现有的dapp、用户界面平台和流行的web应用程序(例如,交换服务)。ERC20安全问题,被称为“多次取款攻击”,在GitHub上被提出,自2016年11月以来一直开放。这个问题涉及到ERC20定义的方法approve(),它被设想为令牌持有者允许其他用户和dapps提取一定数量的令牌的一种方式。当令牌持有者希望将批准的令牌数量从N调整到M时(这可能是增加或减少),就会出现安全问题。如果是恶意的,被批准N个token的用户或dapp可以提前运行调整交易,首先撤回N个token,然后允许确认批准,并撤回额外的M个token。在本文中,我们评估了针对此问题提出的10种缓解措施,发现没有一种解决方案完全令人满意。然后,我们提出了两个新的解决方案,以减轻攻击,其中一个完全满足标准的约束,第二个显示了在解决这个问题的一般限制,从ERC20的批准方法。
英文摘要:
Custom tokens are an integral component of decentralized applications (dapps) deployed on Ethereum and other blockchain platforms. For Ethereum, the ERC20 standard is a widely used token interface and is interoperable with many existing dapps, user interface platforms, and popular web applications (e.g., exchange services). An ERC20 security issue, known as the "multiple withdrawal attack", was raised on GitHub and has been open since November 2016. The issue concerns ERC20's defined method approve() which was envisioned as a way for token holders to give permission for other users and dapps to withdraw a capped number of tokens. The security issue arises when a token holder wants to adjust the amount of approved tokens from N to M (this could be an increase or decrease). If malicious, a user or dapp who is approved for N tokens can front-run the adjustment transaction to first withdraw N tokens, then allow the approval to be confirmed, and withdraw an additional M tokens. In this paper, we evaluate 10 proposed mitigations for this issues and find that no solution is fully satisfactory. We then propose 2 new solutions that mitigate the attack, one of which fully fulfills constraints of the standard, and the second one shows a general limitation in addressing this issue from ERC20's approve method.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。