Papers2 providers Ā· 2 records
January 1, 2024Ā· SSRN Electronic Journal
preprint
Open access

Reputation Oracles: Determining Smart Contract Reputability via Transfer Learning

Authors:Tadhg LooramLucas Nuzzi *Kyle Waters

Abstract

In this paper, we introduce the concept of Reputation Oracles: programs that can predict whether a given smart contract is reputable, or malicious. Our approach to classification combines state-of-the-art deep learning techniques with one of the least-explored types of onchain data: decompiled smart contract bytecode. To get a baseline for reputation, we trained our model on thousands of smart contracts representing not only reputable applications, such as leading DeFi protocols, but also malicious contracts that implement scam functionality like rug pulls, phishing, or spoofing. Remarkably, the resulting model boasts 94% test accuracy, outperforming a naive baseline model in specificity, negative predictive value, and overall accuracy. Under the hood, the model leverages transfer learning by applying the encoder portion of a transformer for feature representation, followed by a specifically trained feed-forward neural network (FFN) layer for the classification of smart contracts. Although initially applied to reputation prediction, our findings indicate that decompiled bytecode preserves enough relevant information from the original source code to be effectively used for various other classification tasks, thereby enabling better contextualization of smart contracts and the primitives they implement.

Community

0 comments
Use Connect Wallet in the navigation

No discussion yet

Be the first to share a question or observation.