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 which Ponzi, Honeypot and Phishing are the prominent ones. Formal verification and symbolic analysis have been employed to combat these destructive scams by analyzing the codes and function calls, yet the vulnerability of each \emph{individual} scam should be predefined discreetly. 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 to learn from the \emph{N-gram bytecode} patterns, and determines 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 of code analysis skills. Secondly, the inference of SCSGuard is faster than the code analysis by several order of magnitudes. Thirdly, experimental results manifest that SCSGuard achieves high accuracy (0.92$\sim$0.94), precision (0.94$\sim$0.96\%) and recall (0.97$\sim$0.98) for both Ponzi and Honeypot scams under similar settings, and is potentially useful to detect new Phishing smart contracts.
翻译:智能合同是能够实现自动同行交易和分散服务的连锁系统的基石。 随着智能合同越来越受欢迎, 连锁系统, 特别是 Etierum, 成为了多功能欺诈活动的“ 分化 ”, Ponzi、 Honebot 和 Phishing 是其中最突出的。 正式的核查和象征性分析已经用来通过分析代码和功能调用来打击这些破坏性骗局, 但每个\ emph{ 个人骗局的脆弱性应该预先谨慎界定。 在这项工作中, 我们展示了SCSGuard, 是一个新的深层次学习骗局检测框架, 利用智能合同自动提取的字码。 我们设计了一个GRUR网络, 其关注机制可以从\emph{N- gram bytecodection}模式中学习。 我们的框架在三个方面比基线算法更有利。 首先, SCS&Guard为不同的骗局提供了一种有用的解决方案, 从而减轻了对代码分析技能的需求。 其次, SCSCSGuard 的判断, 类似价格的精确度比S940 的精确度要快, 。 以若干级的实验级分析。 。 。 Sladeal 。 的精确值 。 。 。 S914 的精确度为 。