Resource Analysis in Blockchain Transactions: An Opcode-Driven Multilayer Graph Approach

  • Inas Hasnaoui
    Laboratory for Research in Intelligent and Durable Technologies (LarTID), National School of Applied Sciences, Cadi Ayyad University, Marrakech, 40 000, Morocco inas.hasnaoui[at]ced.uca.ma
  • Maria Zrikem
    Laboratory for Research in Intelligent and Durable Technologies (LarTID), National School of Applied Sciences, Cadi Ayyad University, Marrakech, 40 000, Morocco
  • Raja Elassali
    Laboratory for Research in Intelligent and Durable Technologies (LarTID), National School of Applied Sciences, Cadi Ayyad University, Marrakech, 40 000, Morocco

Abstract

Blockchain technology has experienced significant growth across various industries. However, challenges such as scalability, high transaction fees, and resource inefficiencies continue to limit its full potential. This paper presents a novel approach using a multilayer graph to model and analyze blockchain transactions, with a focus on resource consumption—specifically opcode execution and gas usage. By categorizing accounts into distinct layers—Externally Owned Accounts (EOAs), smart contracts, oracles, and cross-chain bridges—the graph-based model captures interactions across these account types. Through transaction trace analysis, we extract opcode usage and gas consumption, applying graph-theoretical metrics such as node scoring and edge weighting to identify critical nodes and resource-intensive transactions. Our findings provide new insights into resource-heavy behaviors, revealing optimization opportunities to reduce transaction costs and improve scalability. Additionally, the approach aids in anomaly detection and smart contract optimization, enhancing the cost-effectiveness and performance of blockchain systems.
  • Referencias
  • Cómo citar
  • Del mismo autor
  • Métricas
Almi’ani, K., Lee, Y.-C., Alrawashdeh, T., & Pasdar, A. (2023). Graph-Based Profiling of Blockchain Oracles. IEEE Access, 11, 24995–25007. https://doi.org/10.1109/ACCESS.2023.3254535.

Antonopoulos, A., & Wood, G. (2018). Mastering Ethereum: Building Smart Contracts and DApps. O’Reilly Media, Incorporated.

Azzolini, D., Riguzzi, F., & Lamma, E. (2019). Studying Transaction Fees in the Bitcoin Blockchain with Probabilistic Logic Programming. Information, 10(11), 335. https://doi.org/10.3390/info10110335.

Belchior, R., Süßenguth, J., Feng, Q., Hardjono, T., Vasconcelos, A., & Correia, M. (2023). A Brief History of Blockchain Interoperability. TechRxiv. License: CC BY-NC-SA 4.0.

Bistarelli, S., Mazzante, G., Micheletti, M., & Mostarda, L. (2019). Analysis of Ethereum Smart Contracts and Opcodes. In Proceedings of the 2nd Distributed Ledger Technology Workshop (DLT 2019).

Brunet, S. C., Ribeca, P., Doyle, P., & Mattavelli, M. (2021). Networks of Ethereum Non-Fungible Tokens: A graph-based analysis of the ERC-721 ecosystem.

Capponi, A., Jia, R., & Wang, Y. (2022). The Evolution of Blockchain: From Lit to Dark. RePEc:arx:papers:2202.05779.

Chen, T., Li, Z., Zhu, Y., Chen, J., Luo, X., Lui, J., Lin, X., & Zhang, X. (2020a). Understanding Ethereum via Graph Analysis. ACM Transactions on Internet Technology, 20(2), 1–32. https://doi.org/10.1145/3381036.

Chen, W., Zhang, T., Chen, Z., Zheng, Z., & Lu, Y. (2020b). Traveling the token world: A graph analysis of Ethereum ERC20 token ecosystem. In Proceedings of The Web Conference 2020 (WWW ’20). https://doi.org/10.1145/3366423.3380215.

Cortes-Goicoechea, M., & Bautista-Gomez, L. (2021). Discovering the Ethereum2 P2P Network. In 2021 Third International Conference on Blockchain Computing and Applications (BCCA), IEEE. https://doi.org/10.1109/BCCA53669.2021.9657041.

Crytic. An Assembler and Disassembler Library for the Ethereum Virtual Machine (pyevmasm). Datasets, B., a. Geth Ethereum. https://geth.ethereum.org.

Datasets, B., b. Universal blockchain explorer and search engine. https://blockchair.com/ethereum.

Ethereum. Solidity Documentation, 2021.

Ethereum Foundation, R. I. G. (2021). EIP 1559: A transaction fee market proposal. https://ethereum.github.io/abm1559/notebooks/eip1559.html.

Ethereum.org. Ethereum official page.

evm.codes, (2021). An Ethereum Virtual Machine Opcodes Interactive Reference.

Hasnaoui, I., Zrikem, M., & Elassali, R. (2024). AI-Driven Opcode-Based Smart Contract Classification. In 2024 IEEE 12th International Symposium on Signal, Image, Video and Communications (ISIVC), 1–6. https://doi.org/10.1109/ISIVC61350.2024.10577927.

Hu, W., Fan, Z., & Gao, Y. (2019). Research on Smart Contract Optimization Method on Blockchain. IT Professional, 21(5), 33–38. https://doi.org/10.1109/MITP.2019.2923604.

Jeyakumar, S., Hou, Z., Yugarajah, A., Palaniswami, M., & Muthukkumarasamy, V. (2023). Visualizing Blockchain Transaction Behavioural Pattern: A Graph-based Approach. https://doi.org/10.36227/techrxiv.22329889.

Khan, M., Sarwar, H., & Awais, M. (2021). Gas consumption analysis of Ethereum blockchain transactions. Concurrency and Computation: Practice and Experience (CCPE). https://doi.org/10.1002/cpe.6679.

Kiffer, L., Levin, D., & Mislove, A. (2018). Analyzing Ethereum’s Contract Topology. In Proceedings of the Internet Measurement Conference 2018 (IMC 2018), 494–499. https://doi.org/10.1145/3278532.3278573.

Kim, J., Lee, S., Kim, Y., Ahn, S., & Cho, S. (2023). Graph Learning-Based Blockchain Phishing Account Detection with a Heterogeneous Transaction Graph. Sensors, 23(1), 463. https://doi.org/10.3390/s23010463.

Kim, S., Kwon, Y., & Cho, S. (2018). A Survey of Scalability Solutions on Blockchain. In Proceedings of the 2018 International Conference on Information and Communication Technology Convergence (ICTC), 1–5. https://doi.org/10.1109/ICTC.2018.8539529.

Mammadzada, K., Iqbal, M., Milani, F., García-Bañuelos, L., & Matulevičius, R. (2020). Blockchain Oracles: A Framework for Blockchain-Based Applications. In Business Process Management: Blockchain and Robotic Process Automation Forum (BPM 2020 Blockchain and RPA Forum), 19–34. https://doi.org/10.1007/978-3-030-58779-6_2.

Marstein, K.-E., Chiriac, A., Riley, L., Hardjono, T., & Verdian, G. (2023). Implementing Secure Bridges: Learnings from the Secure Asset Transfer Protocol.

Nakamoto, S. (2018). Bitcoin: A Peer-to-Peer Electronic Cash System.

Nelaturu, K., Beillahi, S. M., Long, F., & Veneris, A. (2021). Smart Contracts Refinement for Gas Optimization. In 2021 3rd Conference on Blockchain Research & Applications for Innovative Networks and Services (BRAINS), 229–236. https://doi.org/10.1109/BRAINS52497.2021.9569819.

Ofori-Boateng, D., Dominguez, I. S., Akcora, C., Kantarcioglu, M., & Gel, Y. (2021). Topological Anomaly Detection in Dynamic Multilayer Blockchain Networks. In Machine Learning and Knowledge Discovery in Databases, 12975, 788–804. Springer.

Pérez, V., Khan, M. A., Sarwar, H., & Awais, M. (2021). Cost Analysis of Smart Contracts Via Parametric Resource Analysis. Lecture Notes in Computer Science, 12389, 7–31. https://doi.org/10.1007/978-3-030-82979-5_2.

Qiao, L., Dang, S., Shihada, B., Alouini, M.-S., Nowak, R., & Lv, Z. (2022). Can blockchain link the future? Digital Communications and Networks, 8(5), 687–694. https://doi.org/10.1016/j.dcan.2021.07.004.

Solomon, M. (n.d.). evmdiff: Opcodes comparison. Retrieved in 2024 from https://www.evmdiff.com/features?feature=opcodes.

Sui, J., Chu, L., & Bao, H. (2023). An Opcode-Based Vulnerability Detection of Smart Contracts. Applied Sciences, 13(13), 7721. https://doi.org/10.3390/app13137721.

Tolmach, P., Li, Y., Lin, S., Liu, Y., & Li, Z. (2021). A Survey of Smart Contract Formal Specification and Verification. ACM Computing Surveys, 54(7), 1–38. https://doi.org/10.1145/3464421.

Buterin, V., Conner, E., Dudley, R., Slipper, M., Norden, I., & Bakhta, A. (2019). EIP-1559: Fee market change for ETH 1.0 chain. Ethereum Improvement Proposals, (1559). Retrieved from https://eips.ethereum.org/EIPS/eip-1559.

Wang, T., Zhao, C., Yang, Q., Zhang, S., & Liew, S. C. (2021). Ethna: Analyzing the Underlying Peer-to-Peer Network of Ethereum Blockchain. IEEE Transactions on Network Science and Engineering, 8(3), 2131–2146. https://doi.org/10.1109/TNSE.2021.3078181.

Wood, G. (2018). Ethereum: A Secure Decentralised Generalised Transaction Ledger.

Wu, K. (2019). An Empirical Study of Blockchain-based Decentralized Applications. Available at: https://arxiv.org/abs/1902.04969.

Wu, K., Ma, Y., Huang, G., & Liu, X. (2021). A first look at blockchain-based decentralized applications. Software: Practice and Experience, 51(10), 2033–2050. https://doi.org/10.1002/spe.2751.

Yuan, H., Fei, S., & Yan, Z. (2023). Technologies of Blockchain Interoperability: A Survey. Digital Communications and Networks. In Press, Journal Pre-proof. https://doi.org/10.1016/j.dcan.2023.07.008.

Yue, K., Zhang, Y., Chen, Y., Li, Y., Zhao, L., Rong, C., & Chen, L. (2021). A survey of decentralizing applications via blockchain: The 5G and beyond perspective. IEEE Communications Surveys & Tutorials, 23(4), 2191–2217. https://doi.org/10.1109/COMST.2021.3116109.
Hasnaoui, I., Zrikem, M., & Elassali, R. (2025). Resource Analysis in Blockchain Transactions: An Opcode-Driven Multilayer Graph Approach. ADCAIJ: Advances in Distributed Computing and Artificial Intelligence Journal, 14, e31609. https://doi.org/10.14201/adcaij.31609

Downloads

Download data is not yet available.
+