Investigating Similarities Across Decentralized Financial (DeFi) Services
Junliang Luo, Stefan Kitzler, Pietro Saggese
TL;DR
The paper addresses automatically categorizing DeFi services by analyzing DeFi building blocks derived from Ethereum transaction graphs. It adopts graph representation learning (graph2vec) to map each building block to a vector, followed by agglomerative clustering to group blocks by financial functionality categories and by protocol labels. The results show high purity for functional categories (up to 0.888) and strong protocol-level separation (purity up to 0.864, V-measure 0.571), with notable proximity between forked protocols like Uniswap and Sushiswap. This approach provides a scalable, automated method to map and compare DeFi services across protocols, supporting interoperability and insight into common design patterns, while acknowledging temporal and data limitations and suggesting avenues for richer features and temporal analyses.
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.
