# Disentangling Decentralized Finance (DeFi) Compositions

**Authors:** Stefan Kitzler, Friedhelm Victor, Pietro Saggese, Bernhard Haslhofer  
**arXiv:** [2111.11933](https://arxiv.org/abs/2111.11933)  
**Date:** 2021-11-05  
**Summary page:** https://www.summarizepaper.com/en/paper/2111.11933v2/

## Key points

- Comprehensive analysis of compositions in the field of Decentralized Finance (DeFi) protocols
- Focus on understanding interactions and relationships among DeFi protocols and their smart contracts
- Utilization of a dataset consisting of 23 labeled DeFi protocols and 10,663,881 Ethereum accounts
- Decentralized exchanges and lending protocols have high degrees and centrality values in the network
- Interactions among protocol nodes primarily occur within a strongly connected component
- Algorithm proposed to decompose protocol calls into nested building blocks
- Swaps identified as the most frequently used building blocks in the dataset
- Visualizations of composition trees provided for deeper inspections across multiple DeFi protocols
- Case study conducted on stablecoin dependencies inspired by the collapse of UST stablecoin in Terra ecosystem
- Contributions include providing a manually curated ground truth dataset, studying intertwined DeFi protocols from macroscopic and microscopic perspectives, proposing an algorithm for extracting building blocks, presenting an overall picture of DeFi compositions, conducting a case study on stablecoin dependencies.
- Limitations include reliance on available data in the ground truth dataset and potential incompleteness due to rapidly evolving DeFi landscape.
- Suggestion for future research to extend seed data and observation period to analyze temporal evolution in these protocols.

## Summary

In this study, we present a comprehensive analysis of compositions in the field of Decentralized Finance (DeFi) protocols. DeFi protocols aim to disrupt traditional finance by offering services on distributed ledgers like Ethereum. Our research focuses on understanding the interactions and relationships among these protocols and their associated smart contracts. To conduct our analysis, we utilize a dataset consisting of 23 labeled DeFi protocols and 10,663,881 Ethereum accounts. From a network perspective, we observe that decentralized exchanges and lending protocols have high degrees and centrality values. We also find that interactions among protocol nodes primarily occur within a strongly connected component. We further investigate the composition of individual DeFi protocols by proposing an algorithm to decompose protocol calls into nested building blocks. By applying this algorithm to our ground truth dataset, we identify swaps as the most frequently used building blocks. We provide visualizations of composition trees for deeper inspections and extract the entire nested building block structure across multiple DeFi protocols. Additionally, we demonstrate the practicality of our approach through a case study inspired by the collapse of the UST stablecoin in the Terra ecosystem. Assuming a similar fate for USD Tether stablecoin, we analyze which building blocks and DeFi protocols would be affected. Our contributions include providing a manually curated ground truth dataset of addresses from various DeFi protocols, studying intertwined DeFi protocols from both macroscopic and microscopic perspectives, proposing an algorithm for extracting building blocks, presenting an overall picture of DeFi compositions across multiple protocols, and conducting a case study on stablecoin dependencies. While our results offer valuable insights into understanding the composition of DeFi protocols, it is important to acknowledge some limitations. Our findings are based on the data available in our ground truth dataset and may not capture all compositions in rapidly evolving DeFi landscape. Future research can extend our seed data and observation period to analyze temporal evolution in these protocols. Overall, our work contributes to a better understanding of the complex interactions and compositions within DeFi protocols. Our methods can be applied to assess individual protocol compositions and reveal how these protocols are interconnected.
