Malicious Transaction Detection in Web 3.0
摘要
Web 3.0 has made significant strides forward, marked by a notable rise in the total value locked in Decentralized Finance (DeFi) applications. However, adversaries are keen to exploit even the most minute logic vulnerabilities for malevolent activities, including flash loan assaults and price manipulation tactics. Notably absent from the current toolkit are methods for detecting vulnerabilities arising from the interaction of divergent protocols, as well as the characterization and interception of DeFi attacks that exploit these logic vulnerabilities. To address this gap, this chapter puts forth an innovative approach, anchored in deep learning. To better emphasize the role of Web 3.0 in this context, it would be useful to consider the method as a manifestation of the principles elaborated in Web 3.0 technology. The method is essentially a decentralized attack detection system replete with a neural network that integrates a global and a local model, as well as a fusion of these models; the intent being to encapsulate the complexity of DeFi attacks. Initially, unstructured events emitted from smart contracts—an integral component of dApps in Web 3.0 context—are efficiently normalized. Subsequently, with the aid of the global model, the transaction-related aspects of these normalized events are enriched. The local model is summoned for extracting the semantic features thereof. The final stage—encapsulation—involves merging the transactional and semantic features of the emitted events using the fusion model. To address the challenge of lacking ground truth, we collect massive real-world DeFi transactions on Ethereum to construct a reliable ground-truth dataset.