Investigating Similarities Across Decentralized Financial (DeFi) Services (2404.00034v1)
Abstract: We explore the adoption of graph representation learning (GRL) algorithms to investigate similarities across services offered by Decentralized Finance (DeFi) protocols. Following existing literature, we use Ethereum transaction data to identify the DeFi building blocks. These are sets of protocol-specific smart contracts that are utilized in combination within single transactions and encapsulate the logic to conduct specific financial services such as swapping or lending cryptoassets. We propose a method to categorize these blocks into clusters based on their smart contract attributes and the graph structure of their smart contract calls. We employ GRL to create embedding vectors from building blocks and agglomerative models for clustering them. To evaluate whether they are effectively grouped in clusters of similar functionalities, we associate them with eight financial functionality categories and use this information as the target label. We find that in the best-case scenario purity reaches .888. We use additional information to associate the building blocks with protocol-specific target labels, obtaining comparable purity (.864) but higher V-Measure (.571); we discuss plausible explanations for this difference. In summary, this method helps categorize existing financial products offered by DeFi protocols, and can effectively automatize the detection of similar DeFi services, especially within protocols.
- The Technology of Decentralized Finance (DeFi) (Bank for International Settlements, Monetary and Economic Department, 2023).
- Sok: Decentralized exchanges (dex) with automated market maker (amm) protocols. ACM Computing Surveys 55, 1–50 (2023).
- A systematic investigation of defi compositions in ethereum. In International Conference on Financial Cryptography and Data Security, 272–279 (Springer, 2022).
- Towards understanding governance tokens in liquidity mining: a case study of decentralized exchanges. World Wide Web 26, 1181–1200 (2023).
- Disentangling decentralized finance (defi) compositions. ACM Transactions on the Web (TWEB) (2022).
- Graph-based management and mining of blockchain data. In Proceedings of the 31st ACM International Conference on Information & Knowledge Management, 5140–5143 (2022).
- SoK: Decentralized Exchanges (DEX) with Automated Market Maker (AMM) Protocols. arXiv:2103.12732 [cs, q-fin] (2022). URL http://arxiv.org/abs/2103.12732. ArXiv: 2103.12732.
- Parlour, C. A. Decentralized Exchanges. SSRN Scholarly Paper ID 3905316, Rochester, NY (2021). URL https://papers.ssrn.com/abstract=3905316.
- Risks and Returns of Uniswap V3 Liquidity Providers. In 4th ACM Conference on Advances in Financial Technologies (AFT), Cambridge, Massachusetts, USA (2022).
- The Economics of Automated Market Makers. Tech. Rep. (2022). URL http://arxiv.org/abs/2206.04634. ArXiv:2206.04634 [econ, q-fin] type: article.
- Short Squeeze in DeFi Lending Market: Decentralization in Jeopardy? In 3rd Workshop on Decentralized Finance (DeFi), Bol, Brac;, Croatia (2023).
- Sun, X. Liquidity Risks in Lending Protocols: Evidence from Aave Protocol. SSRN Electronic Journal (2022). URL http://arxiv.org/abs/2206.11973. ArXiv:2206.11973 [cs, q-fin] type: article.
- From Banks to DeFi: the Evolution of the Lending Market. 53–66 (2022).
- Leverage Staking with Liquid Staking Derivatives (LSDs): Opportunities and Risks (2023). URL https://eprint.iacr.org/2023/1842. Publication info: Preprint.
- Schär, F. Decentralized finance: On blockchain- and smart contract-based financial markets. Federal Reserve Bank of St. Louis Review 2, 153–74 (2021).
- DeFi and the Future of Finance (John Wiley & Sons, 2021).
- Systemic risk in decentralized finance (defi)-an investigation of smart contract interdependencies. In 11th International Conference on Complex Networks and Their Applications, 233–235 (2022).
- Werner, S. M. et al. Sok: Decentralized finance (defi) (2021). 2101.08778.
- Managing risk in defi. In 5th Workshop on Managed Complexity (2020). URL http://ceur-ws.org/Vol-2749/short3.pdf.
- A classification framework for stablecoin designs. arXiv preprint arXiv:1910.10098 (2019).
- Formal analysis of composable defi protocols. In Financial Cryptography and Data Security. FC 2021 International Workshops: CoDecFin, DeFi, VOTING, and WTSC, Virtual Event, March 5, 2021, Revised Selected Papers 25, 149–161 (Springer, 2021).
- Measuring Asset Composability as a Proxy for DeFi Integration. arXiv:2102.04227 [cs] (2021). URL http://arxiv.org/abs/2102.04227. ArXiv: 2102.04227.
- Weber, M. et al. Anti-money laundering in bitcoin: Experimenting with graph convolutional networks for financial forensics. In ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (2019).
- Li, S. et al. Ttagn: Temporal transaction aggregation graph network for ethereum phishing scams detection. In Proceedings of the ACM Web Conference 2022, 661–669 (2022).
- Detecting anomalous cryptocurrency transactions: An aml/cft application of machine learning-based forensics. Electronic Markets 33, 37 (2023).
- Mt 2 ad: multi-layer temporal transaction anomaly detection in ethereum networks with gnn. Complex & Intelligent Systems 1–14 (2023).
- Narayanan, A. et al. graph2vec: Learning distributed representations of graphs. arXiv preprint arXiv:1707.05005 (2017).
- A reduction of a graph to a canonical form and an algebra arising during this reduction. Nauchno-Technicheskaya Informatsiya 2, 12–16 (1968).
- Weisfeiler-lehman graph kernels. Journal of Machine Learning Research 12 (2011).
- Contract abi specification - solidity 0.5.3 documentation (2023). URL https://docs.soliditylang.org/en/v0.5.3/abi-spec.html#function-selector.
- Tokens, types, and standards: identification and utilization in ethereum. In 2020 IEEE International Conference on Decentralized Applications and Infrastructures (DAPPS), 1–10 (IEEE, 2020).
- Ward’s hierarchical agglomerative clustering method: which algorithms implement ward’s criterion? Journal of classification 31, 274–295 (2014).
- URL https://docs.sushi.com/docs/Ecosystem/Whitepaper.