SCSGuard: Deep Scam Detection for Ethereum Smart Contracts
Huiwen Hu, Qianlan Bai, Yuedong Xu
Abstract
Smart contract is the building block of blockchain systems that enables automated peer-to-peer transactions and decentralized services. With the increasing popularity of smart contracts, blockchain systems, in particular Ethereum, have been the “paradise” of versatile fraud activities. In this work, we present SCSGuard, a novel deep learning scam detection framework that harnesses the automatically extractable bytecodes of smart contracts as their new features. We design a GRU network with attention mechanism learning from the N-gram bytecode patterns to determine whether a smart contract is fraudulent or not. Our framework is advantageous over the baseline algorithms in three aspects. Firstly, SCSGuard provides a unified solution to different scam genres, thus relieving the need for code analysis skills. Secondly, the inference of SCSGuard is faster than the code analysis by several orders of magnitudes. Thirdly, experimental results manifest that SCSGuard achieves high accuracy (0.92~0.94), precision (0.94~0.96) and recall (0.97~0.98) for both Ponzi and Honeypot scams under similar settings, and is potentially useful to detect new Phishing smart contracts.