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
    ---><---

    References listed on IDEAS

    as
    1. Fan Fang & Carmine Ventre & Michail Basios & Leslie Kanthan & David Martinez-Rego & Fan Wu & Lingbo Li, 2022. "Cryptocurrency trading: a comprehensive survey," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 8(1), pages 1-59, December.
    2. Min Xu & Xingtong Chen & Gang Kou, 2019. "A systematic review of blockchain," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 5(1), pages 1-14, December.
    3. Helder Sebastião & Pedro Godinho, 2021. "Forecasting and trading cryptocurrencies with machine learning under changing market conditions," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 7(1), pages 1-30, December.
    4. Fan Fang & Carmine Ventre & Michail Basios & Leslie Kanthan & Lingbo Li & David Martinez-Regoband & Fan Wu, 2020. "Cryptocurrency Trading: A Comprehensive Survey," Papers 2003.11352, arXiv.org, revised Jan 2022.
    5. Qingquan Xin & Jing Zhou & Fang Hu, 2018. "The economic consequences of financial fraud: evidence from the product market in China," China Journal of Accounting Studies, Taylor & Francis Journals, vol. 6(1), pages 1-23, January.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Husam Rjoub & Tomiwa Sunday Adebayo & Dervis Kirikkaleli, 2023. "Blockchain technology-based FinTech banking sector involvement using adaptive neuro-fuzzy-based K-nearest neighbors algorithm," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 9(1), pages 1-23, December.
    2. Laurens Swinkels, 2023. "Empirical evidence on the ownership and liquidity of real estate tokens," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 9(1), pages 1-29, December.
    3. Jules Clement Mba, 2024. "Assessing portfolio vulnerability to systemic risk: a vine copula and APARCH-DCC approach," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 10(1), pages 1-36, December.
    4. Wujun Lv & Tao Pang & Xiaobao Xia & Jingzhou Yan, 2023. "Dynamic portfolio choice with uncertain rare-events risk in stock and cryptocurrency markets," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 9(1), pages 1-28, December.
    5. Walid Mensi & Mariya Gubareva & Hee-Un Ko & Xuan Vinh Vo & Sang Hoon Kang, 2023. "Tail spillover effects between cryptocurrencies and uncertainty in the gold, oil, and stock markets," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 9(1), pages 1-27, December.
    6. Riccardo Blasis & Luca Galati & Alexander Webb & Robert I. Webb, 2023. "Intelligent design: stablecoins (in)stability and collateral during market turbulence," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 9(1), pages 1-23, December.
    7. Waqas Hanif & Hee-Un Ko & Linh Pham & Sang Hoon Kang, 2023. "Dynamic connectedness and network in the high moments of cryptocurrency, stock, and commodity markets," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 9(1), pages 1-40, December.
    8. Danilo Bazzanella & Andrea Gangemi, 2023. "Bitcoin: a new proof-of-work system with reduced variance," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 9(1), pages 1-14, December.
    9. Mingbo Zheng & Gen-Fu Feng & Xinxin Zhao & Chun-Ping Chang, 2023. "The transaction behavior of cryptocurrency and electricity consumption," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 9(1), pages 1-18, December.
    10. Tina Linden & Tina Shirazi, 2023. "Markets in crypto-assets regulation: Does it provide legal certainty and increase adoption of crypto-assets?," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 9(1), pages 1-30, December.
    11. Zhiqi Feng & Yongli Li & Xiaochen Ma, 2023. "Blockchain-oriented approach for detecting cyber-attack transactions," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 9(1), pages 1-38, December.
    12. Khaled Mokni & Ghassen El Montasser & Ahdi Noomen Ajmi & Elie Bouri, 2024. "On the efficiency and its drivers in the cryptocurrency market: the case of Bitcoin and Ethereum," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 10(1), pages 1-25, December.
    13. Elie Bouri & Afees A. Salisu & Rangan Gupta, 2023. "The predictive power of Bitcoin prices for the realized volatility of US stock sector returns," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 9(1), pages 1-22, December.
    14. Haji Suleman Ali & Feiyan Jia & Zhiyuan Lou & Jingui Xie, 2023. "Effect of blockchain technology initiatives on firms’ market value," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 9(1), pages 1-35, December.
    15. Rubaiyat Ahsan Bhuiyan & Afzol Husain & Changyong Zhang, 2023. "Diversification evidence of bitcoin and gold from wavelet analysis," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 9(1), pages 1-36, December.
    16. Elie Bouri & Mahdi Ghaemi Asl & Sahar Darehshiri & David Gabauer, 2024. "Asymmetric connectedness between conventional and Islamic cryptocurrencies: Evidence from good and bad volatility spillovers," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 10(1), pages 1-26, December.
    17. Petar Radanliev, 2024. "The rise and fall of cryptocurrencies: defining the economic and social values of blockchain technologies, assessing the opportunities, and defining the financial and cybersecurity risks of the Metave," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 10(1), pages 1-34, December.
    18. Nuray Tosunoğlu & Hilal Abacı & Gizem Ateş & Neslihan Saygılı Akkaya, 2023. "Artificial neural network analysis of the day of the week anomaly in cryptocurrencies," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 9(1), pages 1-24, December.
    19. Ştefan Cristian Gherghina & Liliana Nicoleta Simionescu, 2023. "Exploring the asymmetric effect of COVID-19 pandemic news on the cryptocurrency market: evidence from nonlinear autoregressive distributed lag approach and frequency domain causality," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 9(1), pages 1-58, December.
    20. Ahmed BenSaïda, 2023. "The linkage between Bitcoin and foreign exchanges in developed and emerging markets," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 9(1), pages 1-27, December.

    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.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with 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.