IDEAS home Printed from https://ideas.repec.org/a/gam/jmathe/v10y2022i6p949-d772354.html
   My bibliography  Save this article

Do Not Rug on Me: Leveraging Machine Learning Techniques for Automated Scam Detection

Author

Listed:
  • Bruno Mazorra

    (Department of Information and Communications Technology, Pompeu Fabra University, Tanger Building, 08018 Barcelona, Spain
    These authors contributed equally to this work.)

  • Victor Adan

    (Faculty of Economics and Business, Universitat de Barcelona, 08034 Barcelona, Spain
    These authors contributed equally to this work.)

  • Vanesa Daza

    (Department of Information and Communications Technology, Pompeu Fabra University, Tanger Building, 08018 Barcelona, Spain)

Abstract

Uniswap, as with other DEXs, has gained much attention this year because it is a non-custodial and publicly verifiable exchange that allows users to trade digital assets without trusted third parties. However, its simplicity and lack of regulation also make it easy to execute initial coin offering scams by listing non-valuable tokens. This method of performing scams is known as rug pull, a phenomenon that already exists in traditional finance but has become more relevant in DeFi. Various projects have contributed to detecting rug pulls in EVM compatible chains. However, the first longitudinal and academic step to detecting and characterizing scam tokens on Uniswap was made. The authors collected all the transactions related to the Uniswap V2 exchange and proposed a machine learning algorithm to label tokens as scams. However, the algorithm is only valuable for detecting scams accurately after they have been executed. This paper increases their dataset by 20K tokens and proposes a new methodology to label tokens as scams. After manually analyzing the data, we devised a theoretical classification of different malicious maneuvers in the Uniswap protocol. We propose various machine-learning-based algorithms with new, relevant features related to the token propagation and smart contract heuristics to detect potential rug pulls before they occur. In general, the models proposed achieved similar results. The best model obtained accuracy of 0.9936, recall of 0.9540, and precision of 0.9838 in distinguishing non-malicious tokens from scams prior to the malicious maneuver.

Suggested Citation

  • Bruno Mazorra & Victor Adan & Vanesa Daza, 2022. "Do Not Rug on Me: Leveraging Machine Learning Techniques for Automated Scam Detection," Mathematics, MDPI, vol. 10(6), pages 1-24, March.
  • Handle: RePEc:gam:jmathe:v:10:y:2022:i:6:p:949-:d:772354
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/2227-7390/10/6/949/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/2227-7390/10/6/949/
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Van Vliet, Ben, 2018. "An alternative model of Metcalfe’s Law for valuing Bitcoin," Economics Letters, Elsevier, vol. 165(C), pages 70-72.
    2. Sam M. Werner & Daniel Perez & Lewis Gudgeon & Ariah Klages-Mundt & Dominik Harz & William J. Knottenbelt, 2021. "SoK: Decentralized Finance (DeFi)," Papers 2101.08778, arXiv.org, revised Sep 2022.
    3. Andreas A. Aigner & Gurvinder Dhaliwal, 2021. "UNISWAP: Impermanent Loss and Risk Profile of a Liquidity Provider," Papers 2106.14404, arXiv.org.
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Muneer M. Alshater & Mayank Joshipura & Rim El Khoury & Nohade Nasrallah, 2023. "Initial Coin Offerings: a Hybrid Empirical Review," Small Business Economics, Springer, vol. 61(3), pages 891-908, October.
    2. Vahidin Jeleskovic, 2024. "An Empirical Analysis of Scam Tokens on Ethereum Blockchain," Papers 2402.19399, arXiv.org, revised Mar 2024.
    3. José Luis Miralles-Quirós & María Mar Miralles-Quirós, 2022. "Mathematics, Cryptocurrencies and Blockchain Technology," Mathematics, MDPI, vol. 10(12), pages 1-2, June.

    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. Bruno Mazorra & Victor Adan & Vanesa Daza, 2022. "Do not rug on me: Zero-dimensional Scam Detection," Papers 2201.07220, arXiv.org.
    2. Christie Smith & Aaron Kumar, 2018. "Crypto‐Currencies – An Introduction To Not‐So‐Funny Moneys," Journal of Economic Surveys, Wiley Blackwell, vol. 32(5), pages 1531-1559, December.
    3. Jiahua Xu & Nikhil Vadgama, 2021. "From banks to DeFi: the evolution of the lending market," Papers 2104.00970, arXiv.org, revised Dec 2022.
    4. Kajtazi, Anton & Moro, Andrea, 2019. "The role of bitcoin in well diversified portfolios: A comparative global study," International Review of Financial Analysis, Elsevier, vol. 61(C), pages 143-157.
    5. Flori, Andrea, 2019. "News and subjective beliefs: A Bayesian approach to Bitcoin investments," Research in International Business and Finance, Elsevier, vol. 50(C), pages 336-356.
    6. Castro-Iragorri, C & Ramírez, J & Vélez, S, 2021. "Financial intermediation and risk in decentralized lending protocols," Documentos de Trabajo 19420, Universidad del Rosario.
    7. Şoiman, Florentina & Dumas, Jean-Guillaume & Jimenez-Garces, Sonia, 2023. "What drives DeFi market returns?," Journal of International Financial Markets, Institutions and Money, Elsevier, vol. 85(C).
    8. Canh, Nguyen Phuc & Wongchoti, Udomsak & Thanh, Su Dinh & Thong, Nguyen Trung, 2019. "Systematic risk in cryptocurrency market: Evidence from DCC-MGARCH model," Finance Research Letters, Elsevier, vol. 29(C), pages 90-100.
    9. Bennett, Donyetta & Mekelburg, Erik & Williams, T.H., 2023. "BeFi meets DeFi: A behavioral finance approach to decentralized finance asset pricing," Research in International Business and Finance, Elsevier, vol. 65(C).
    10. Koch, Sophia & Dimpfl, Thomas, 2023. "Attention and retail investor herding in cryptocurrency markets," Finance Research Letters, Elsevier, vol. 51(C).
    11. Matthias Hafner & Helmut Dietl, 2024. "Impermanent Loss Conditions: An Analysis of Decentralized Exchange Platforms," Papers 2401.07689, arXiv.org, revised Feb 2024.
    12. Niccol`o Bardoscia & Alessandro Nodari, 2023. "Liquidity Providers Greeks and Impermanent Gain," Papers 2302.11942, arXiv.org, revised Mar 2023.
    13. Yixin Cao & Chuanwei Zou & Xianfeng Cheng, 2021. "Flashot: A Snapshot of Flash Loan Attack on DeFi Ecosystem," Papers 2102.00626, arXiv.org.
    14. Carlos Castro-Iragorri & Julian Ramirez & Sebastian Velez, 2021. "Financial intermediation and risk in decentralized lending protocols," Papers 2107.14678, arXiv.org.
    15. Arturas Sabalionis & Wenbo Wang & Hail Park, 2021. "What affects the price movements in Bitcoin and Ethereum?," Manchester School, University of Manchester, vol. 89(1), pages 102-127, January.
    16. Lucy Huo & Ariah Klages-Mundt & Andreea Minca & Frederik Christian Munter & Mads Rude Wind, 2021. "Decentralized Governance of Stablecoins with Closed Form Valuation," Papers 2109.08939, arXiv.org, revised Jul 2022.
    17. Tobias Bitterli & Fabian Schar, 2023. "Decentralized Exchanges: The Profitability Frontier of Constant Product Market Makers," Papers 2302.05219, arXiv.org, revised Mar 2023.
    18. Andrea Flori, 2019. "Cryptocurrencies In Finance: Review And Applications," International Journal of Theoretical and Applied Finance (IJTAF), World Scientific Publishing Co. Pte. Ltd., vol. 22(05), pages 1-22, August.
    19. Akyildirim, Erdinç & Corbet, Shaen & Cumming, Douglas & Lucey, Brian & Sensoy, Ahmet, 2020. "Riding the Wave of Crypto-Exuberance: The Potential Misusage of Corporate Blockchain Announcements," Technological Forecasting and Social Change, Elsevier, vol. 159(C).
    20. Dimitrios Koutmos & Wang Chun Wei, 2023. "Nowcasting bitcoin’s crash risk with order imbalance," Review of Quantitative Finance and Accounting, Springer, vol. 61(1), pages 125-154, July.

    More about this item

    Keywords

    ethereum; DeFi; DEX; scam detection;
    All these keywords.

    Statistics

    Access and download statistics

    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:gam:jmathe:v:10:y:2022:i:6:p:949-:d:772354. 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: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.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.