Detecting Rug-Pull: Analyzing Smart Contract Backdoor Codes in Ethereum
Source abstract
Abstract
Smart contracts enable autonomous execution between contracting parties without a centralized authority, thereby reducing contract management costs and enhancing the transparency and reliability of contracts. However, the absence of such a certification authority increases the risk of fraud. Rug-pull, a typical form of fraud, involves developers hiding backdoor codes in smart contracts to steal funds under certain conditions, causing significant damage to users. A Rug-pull list warns users of potential fraud, but it only identifies risks after damage has occurred. Additionally, existing backdoor code analysis tools are limited in their ability to detect backdoor codes hidden through modifications to existing patterns or suffer from low accuracy because they rely on comparisons with predefined backdoor codes. Therefore, this paper proposes a balance-tracking-based backdoor code detection model to identify backdoor codes in smart contracts. The proposed model detects backdoor codes by extracting functions from Ethereum bytecodes and inspecting the extracted functions to track balance changes. This approach allows for the detection of balance changes even when backdoor codes are concealed. Experimental results verifying the effectiveness of this model demonstrate 98% accuracy, 0.96 recall, and 0.98 precision. These results are expected to contribute significantly to effectively reducing fraud risks such as Rug-pull.
Source: crossref · Quality: baseline
Research context
OpenAlex topics: Blockchain Technology Applications and Security · Auction Theory and Applications · Crime, Illicit Activities, and Governance
SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.
Affiliations
Department of IT Convergence, Gachon University, Seongnam-si 13120, Republic of Korea
Department of Computer Engineering, Gachon University, Seongnam-si 13120, Republic of Korea
Funding
Gachon University
References (30)
Show source-provided references
1. Nakamoto, S. (2008). Bitcoin: A peer-to-peer electronic cash system. Decentralized Bus. Rev., 21260.
2. Buterin, V. (2024, November 26). Ethereum Whitepaper. Available online: https://ethereum.org/en/whitepaper/.
3. Blockchain smart contracts: Applications, challenges, and future trends10.1007/s12083-021-01127-0 ↗
4. Dissecting Ponzi schemes on Ethereum: Identification, analysis, and impact10.1016/j.future.2019.08.014 ↗
5. CoinDesk (2024, November 26). Squid Game Token Crashes. Available online: https://www.coindesk.com/markets/2021/11/01/squid-game-token-crashes-developers-say-theyve-left-the-project/.
6. De.Fi (2024, November 26). Rekt Database. Available online: https://de.fi/rekt-database.
7. Uniswap (2024, November 26). Unsupported Tokens on Uniswap. Available online: https://unsupportedtokens.uniswap.org/.
8. Uniswap (2024, November 26). What Are Token Warnings?. Available online: https://support.uniswap.org/hc/en-us/articles/8723118437133-What-are-token-warnings.
9. Finance, C. (2024, November 26). Risks, Security & Audits. Available online: https://resources.curve.fi/risks-security/risks/pool/.
10. Etherscan (2024, November 26). Verified Contracts on Etherscan. Available online: https://etherscan.io/contractsVerified.
11. GoPlus-Labs (2024, November 26). GoPlus Network Whitepaper. Available online: https://whitepaper.gopluslabs.io/goplus-network.
12. Chaliasos, S., Charalambous, M.A., Zhou, L., Galanopoulou, R., Gervais, A., Mitropoulos, D., and Livshits, B. (2024, January 14–20). Smart Contract and DeFi Security Tools: Do They Meet the Needs of Practitioners?. Proceedings of the 46th IEEE/ACM International Conference on Software Engineering, Lisbon, Portugal.10.1145/3597503.3623302 ↗
13. Smart contracts and decentralized finance10.1146/annurev-financial-110921-022806 ↗
14. Ethereum: A secure decentralised generalised transaction ledger
15. Yano, M., Dai, C., Masuda, K., and Kishimoto, Y. (2020). Ethereum, Smart Contracts, DApps. Blockchain and Crypto Currency, Springer.10.1007/978-981-15-3376-1 ↗
16. Ranganthan, V.P., Dantu, R., Paul, A., Mears, P., and Morozov, K. (2018, January 18–20). A decentralized marketplace application on the ethereum blockchain. Proceedings of the IEEE 4th International Conference on Collaboration and Internet Computing, Philadelphia, PA, USA.10.1109/CIC.2018.00023 ↗
17. Disentangling decentralized finance (DeFi) compositions10.1145/3532857 ↗
18. (2024, November 26). Uniswap. Available online: https://app.uniswap.org/.
19. Sok: Decentralized exchanges (DEX) with automated market maker (AMM) protocols
20. Alamsyah, A., and Salsabila, N. (2024, January 7–8). Exploring the Mechanisms of Decentralized Finance (DeFi) Using Blockchain Technology. Proceedings of the 2024 3rd International Conference on Creative Communication and Innovative Technology, Tangerang, Indonesia.10.1109/ICCIT62134.2024.10701148 ↗
21. Zhou, Y., Sun, J., Ma, F., Chen, Y., Yan, Z., and Jiang, Y. (2024, January 14–20). Stop pulling my rug: Exposing rug pull risks in crypto token to investors. Proceedings of the 46th International Conference on Software Engineering: Software Engineering in Practice, New York, NY, USA.10.1145/3639477.3639722 ↗
22. Sun, D., Ma, W., Nie, L., and Liu, Y. (2024). SoK: Comprehensive Analysis of Rug Pull Causes, Datasets, and Detection Tools in DeFi. arXiv.
23. Qian, P., Cao, R., Liu, Z., Li, W., Li, M., Zhang, L., Xu, Y., Chen, J., and He, Q. (2023). Empirical review of smart contract and defi security: Vulnerability detection and automated repair. arXiv.
24. Cernera, F., La Morgia, M., Mei, A., and Sassi, F. (2023, January 9–11). Token Spammers, Rug Pulls, and Sniper Bots: An Analysis of the Ecosystem of Tokens in Ethereum and in the Binance Smart Chain (BNB). Proceedings of the 32nd USENIX Security Symposium, Anaheim, CA, USA.
25. Li, X., Yang, J., Chen, J., Tang, Y., and Gao, X. (2024, January 13–17). Characterizing Ethereum Upgradable Smart Contracts and Their Security Implications. Proceedings of the ACM on Web Conference 2024, New York, NY, USA.10.1145/3589334.3645640 ↗
26. Angels or demons: Investigating and detecting decentralized financial traps on ethereum smart contracts10.1007/s10515-024-00459-4 ↗
27. Pied-piper: Revealing the backdoor threats in ethereum erc token contracts10.1145/3560264 ↗
28. Kolinko, T. (2024, November 26). Panoramix Decompiler. Available online: https://pypi.org/project/panoramix-decompiler.
29. Bitfly (2024, November 26). Ethereum Signature Database. Available online: https://www.4byte.directory.
30. Vogelsteller, F., and Buterin, V. (2024, November 26). ERC-20: Token Standard. Available online: https://eips.ethereum.org/EIPS/eip-20.