Paper: arXiv 2404.00034

Authors: Junliang Luo, Stefan Kitzler, Pietro Saggese

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.

Complexity vs Empirical Score

  • Math Complexity: 7.0/10
  • Empirical Rigor: 6.0/10
  • Quadrant: Holy Grail — high math complexity, high empirical rigor

Why this score: The paper employs advanced graph representation learning and agglomerative clustering, representing substantial mathematical complexity. It demonstrates empirical rigor by using real-world Ethereum transaction data and evaluating clustering performance with established metrics like purity and V-measure, though it lacks explicit backtesting for trading strategies.

Research Flowchart

  flowchart TD
  Start(["Research Goal"]) -->|"Investigate similarities<br>in DeFi services"| Methodology
  Methodology["Proposed Methodology"] --> Data["Data: Ethereum Transactions"]
  Data -->|"Identify"| Blocks["DeFi Building Blocks"]
  Data -->|"Extract"| Attributes["Smart Contract Attributes"]
  Data -->|"Construct"| Graph["Contract Call Graph"]
  Blocks --> Embeddings["Graph Representation Learning"]
  Attributes --> Embeddings
  Graph --> Embeddings
  Embeddings --> Clustering["Agglomerative Clustering"]
  Clustering --> Evaluation["Evaluation Purity .888"]
  Clustering --> Protocol["Protocol Labels Purity .864"]
  Evaluation --> Outcomes(["Key Findings"])
  Protocol --> Outcomes
  Outcomes -->|"Categorizes products<br>Automates detection"| Conclusion

Evidence Card

What the authors claim, on what data, and who has checked it. Read from the paper's own text by a language model: every quote is verbatim, nothing was re-run. How to read this card

Proposes

The paper proposes a method that uses graph representation learning to embed DeFi building blocks and agglomerative clustering to group them by smart contract attributes and call graph structure.

Source sentence
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.

Assumes 2

  • Ethereum transaction data adequately captures DeFi building blocks and their financial functionalities. data
    Source sentence
    Following existing literature, we use Ethereum transaction data to identify the DeFi building blocks.
  • The extracted building blocks (edge‑induced subtrees) correctly represent protocol‑specific smart contract interactions. model
    Source sentence
    The algorithm extracts the building blocks by mapping the transactions into edge‑induced subtrees, subsequently hashed based on a combination of their execution order, target nodes’ outdegrees, and associated method.

Data

  • Top 10,000 DeFi building blocks · Ethereum blockchain crypto-onchain public
    2021-01-01 to 2021-08-05 · 23 DeFi protocols
    Source sentence
    extracted utilizing all Ethereum transactions from January 1, 2021 (block 11,565,019) to August 5, 2021 (block 12,964,999) and involve 23 DeFi protocols

Recognised sources: The Graph (subgraphs)

Costs

Not applicable The paper reports no trading or execution result.

Finds 2

  • When evaluated with the financial functionality category label, the clustering achieves a maximum purity of .888 but a low V‑Measure of .239. performance
    Source sentence
    When evaluating the results using the ‘financial functionality category’ label, we find that the outcomes yielded the highest value among all specifications for purity with .888, but a relatively low V‑Measure (.239).
  • Using the protocol label, purity is comparable at .864 while V‑Measure improves to .571. performance
    Source sentence
    When evaluating the results using the ‘protocol’ label, we find that the values for purity are comparable (.864 for the best‑performing specification), and higher V‑Measure (.571).

Checked by others

No other paper in the archive has been found to support or contradict these findings (compared with 13 related papers). Coverage is partial, so this is neither replication nor refutation.

Code

No repository by the authors found in the paper.

Extracted 2026-11-14 · same card as JSON · A language model chose these items: check the source sentence before relying on one.

Cited References (45)

  1. graph2vec: Learning distributed representations of graphs (2017) — link
  2. Centralized and decentralized finance: Coexistence or convergence? (2023)
  3. DeFi protocol risks: the paradox of DeFi (2021)
  4. Decentralised finance (DeFi): a functional approach (2023)
  5. Anatomy of a Stablecoin’s failure: The Terra-Luna case (2023)
  6. The collapse of FTX: The end of cryptocurrency’s age of innocence (2022)
  7. Top 10 defi hacks you should know (2022) — link
  8. Disentangling decentralized finance (defi) compositions (2022)
and 37 more
  1. Understanding ethereum via graph analysis (2020)
  2. Detecting and quantifying wash trading on decentralized cryptocurrency exchanges (2021)
  3. On the just-in-time discovery of profit-generating transactions in defi protocols (2021)
  4. A classification framework for stablecoin designs (2019) — link
  5. Formal analysis of composable DeFi protocols (2021)
  6. A reduction of a graph to a canonical form and an algebra arising during this reduction (1968)
  7. Weisfeiler-lehman graph kernels. (2011)
  8. Efficient Estimation of Word Representations in Vector Space (2013) — link
  9. Contract ABI Specification - Solidity 0.5.3 documentation (2023) — link
  10. Tokens, types, and standards: identification and utilization in Ethereum (2020)
  11. Gl2vec: Graph embedding enriched by line graphs with edge features (2019)
  12. TUDataset: A collection of benchmark datasets for learning with graphs (2020) — link
  13. Cryptocurrencies and decentralized finance (DeFi) (2022)
  14. Towards understanding governance tokens in liquidity mining: a case study of decentralized exchanges (2023)
  15. The Technology of Decentralized Finance (DeFi) (2023)
  16. Sok: Decentralized exchanges (dex) with automated market maker (amm) protocols (2023)
  17. Graph-based Management and Mining of Blockchain Data (2022)
  18. SoK : Decentralized Exchanges ( DEX ) with Automated Market Maker ( AMM ) Protocols (2022) — link
  19. Decentralized Exchanges (2021) — link
  20. A systematic investigation of DeFi compositions in ethereum (2022)
  21. Systemic risk in decentralized finance (defi)-an investigation of smart contract interdependencies (2022)
  22. The Economics of Automated Market Makers (2022) — link
  23. Short Squeeze in DeFi Lending Market: Decentralization in Jeopardy? — → 2302.04068
  24. Risks and Returns of Uniswap V3 Liquidity Providers (2022)
  25. From Banks to DeFi : the Evolution of the Lending Market (2022) — link
  26. Liquidity Risks in Lending Protocols : Evidence from Aave Protocol (2022) — link
  27. Measuring Asset Composability as a Proxy for DeFi Integration (2021) — link
  28. Leverage Staking with Liquid Staking Derivatives ( LSDs ): Opportunities and Risks — → 2401.08610
  29. Decentralized Finance: On Blockchain- and Smart Contract-Based Financial Markets (2021) — link
  30. DeFi and the Future of Finance (2021)
  31. SoK: Decentralized Finance (DeFi) (2021) — link
  32. Managing Risk in DeFi (2020) — link
  33. TTAGN: Temporal transaction aggregation graph network for ethereum phishing scams detection (2022)
  34. Detecting anomalous cryptocurrency transactions: An AML/CFT application of machine learning-based forensics (2023)
  35. MT 2 AD: multi-layer temporal transaction anomaly detection in ethereum networks with GNN (2023)
  36. Anti-Money Laundering in Bitcoin: Experimenting with Graph Convolutional Networks for Financial Forensics (2019)
  37. Ward’s hierarchical agglomerative clustering method: which algorithms implement Ward’s criterion? (2014)

2 of 45 cited works are in the corpus; resolved via arXiv source bundles, Semantic Scholar and OpenAlex. Corpus-wide: 2596 linked papers.