TokenScope: Automatically Detecting Inconsistent Behaviors of Cryptocurrency Tokens in Ethereum

被引:99
作者
Chen, Ting [1 ]
Zhang, Yufei [1 ]
Li, Zihao [1 ]
Luo, Xiapu [2 ]
Wang, Ting [3 ]
Cao, Rong [1 ]
Xiao, Xiuzhuo [1 ]
Zhang, Xiaosong [1 ]
机构
[1] UESTC, Chengdu, Peoples R China
[2] Hong Kong Polytech Univ, Hong Kong, Peoples R China
[3] Penn State Univ, University Pk, PA 16802 USA
来源
PROCEEDINGS OF THE 2019 ACM SIGSAC CONFERENCE ON COMPUTER AND COMMUNICATIONS SECURITY (CCS'19) | 2019年
基金
美国国家科学基金会; 中国国家自然科学基金; 国家重点研发计划;
关键词
Ethereum; token; ERC-20; inconsistent behavior;
D O I
10.1145/3319535.3345664
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Motivated by the success of Bitcoin, lots of cryptocurrencies have been created, the majority of which were implemented as smart contracts running on Ethereum and called tokens. To regulate the interaction between these tokens and users as well as third-party tools (e.g., wallets, exchange markets, etc.), several standards have been proposed for the implementation of token contracts. Although existing tokens involve lots of money, little is known whether or not their behaviors are consistent with the standards. Inconsistent behaviors can lead to user confusion and financial loss, because users/third-party tools interact with token contracts by invoking standard interfaces and listening to standard events. In this work, we take the first step to investigate such inconsistent token behaviors with regard to ERC-20, the most popular token standard. We propose a novel approach to automatically detect such inconsistency by contrasting the behaviors derived from three different sources, including the manipulations of core data structures recording the token holders and their shares, the actions indicated by standard interfaces, and the behaviors suggested by standard events. We implement our approach in a new tool named TokenScope and use it to inspect all transactions sent to the deployed tokens. We detected 3,259,001 transactions that trigger inconsistent behaviors, and these behaviors resulted from 7,472 tokens. By manually examining all (2,353) open-source tokens having inconsistent behaviors, we found that the precision of TokenScope is above 99.9%. Moreover, we revealed 11 major reasons behind the inconsistency, e.g., flawed tokens, standard methods missing, lack of standard events, etc. In particular, we discovered 50 unreported flawed tokens.
引用
收藏
页码:1503 / 1520
页数:18
相关论文
共 61 条
[1]  
Amani Sidney, 2018, ACM SIGPLAN INT C CE
[2]  
[Anonymous], 2018, TOPIC THERE WAS COIN
[3]  
[Anonymous], 2018, CVE201810376 PECKSHI
[4]  
[Anonymous], 2019, KROWN WHIT
[5]  
[Anonymous], 2018, CVE201810376 PECKCH
[6]  
[Anonymous], 2018, ETHEX DEC EXCH BUILT
[7]  
[Anonymous], 2018, ETHVM OP SOURC ETH B
[8]  
[Anonymous], 2017, ERC223 TOK STAND
[9]  
[Anonymous], 2018, TOK TRACK
[10]  
[Anonymous], 2017, MAN APIS