IDEAS home Printed from https://ideas.repec.org/a/spr/fininn/v10y2024i1d10.1186_s40854-023-00572-5.html
   My bibliography  Save this article

Detecting DeFi securities violations from token smart contract code

Author

Listed:
  • Arianna Trozze

    (University College London
    University College London)

  • Bennett Kleinberg

    (University College London
    Tilburg University)

  • Toby Davies

    (University College London
    School of Law, The Liberty Building, University of Leeds)

Abstract

Decentralized Finance (DeFi) is a system of financial products and services built and delivered through smart contracts on various blockchains. In recent years, DeFi has gained popularity and market capitalization. However, it has also been connected to crime, particularly various types of securities violations. The lack of Know Your Customer requirements in DeFi poses challenges for governments trying to mitigate potential offenses. This study aims to determine whether this problem is suited to a machine learning approach, namely, whether we can identify DeFi projects potentially engaging in securities violations based on their tokens’ smart contract code. We adapted prior works on detecting specific types of securities violations across Ethereum by building classifiers based on features extracted from DeFi projects’ tokens’ smart contract code (specifically, opcode-based features). Our final model was a random forest model that achieved an 80% F-1 score against a baseline of 50%. Notably, we further explored the code-based features that are the most important to our model’s performance in more detail by analyzing tokens’ Solidity code and conducting cosine similarity analyses. We found that one element of the code that our opcode-based features can capture is the implementation of the SafeMath library, although this does not account for the entirety of our features. Another contribution of our study is a new dataset, comprising (a) a verified ground truth dataset for tokens involved in securities violations and (b) a set of legitimate tokens from a reputable DeFi aggregator. This paper further discusses the potential use of a model like ours by prosecutors in enforcement efforts and connects it to a wider legal context.

Suggested Citation

  • Arianna Trozze & Bennett Kleinberg & Toby Davies, 2024. "Detecting DeFi securities violations from token smart contract code," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 10(1), pages 1-35, December.
  • Handle: RePEc:spr:fininn:v:10:y:2024:i:1:d:10.1186_s40854-023-00572-5
    DOI: 10.1186/s40854-023-00572-5
    as

    Download full text from publisher

    File URL: http://link.springer.com/10.1186/s40854-023-00572-5
    File Function: Abstract
    Download Restriction: no

    File URL: https://libkey.io/10.1186/s40854-023-00572-5?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:spr:fininn:v:10:y:2024:i:1:d:10.1186_s40854-023-00572-5. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Sonal Shukla or Springer Nature Abstracting and Indexing (email available below). General contact details of provider: http://www.springer.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.