Skip to main content

A Systematic Investigation of DeFi Compositions in Ethereum

  • Conference paper
  • First Online:
Financial Cryptography and Data Security. FC 2022 International Workshops (FC 2022)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13412))

Included in the following conference series:

Abstract

The rapid growth of the Ethereum ecosystem since 2020 has been driven by the proliferation of several DeFi protocols [10], which are application-layer programs that provide Decentralized Finance (DeFi) services [14, 16] such as the exchange of cryptoassets on decentralized exchanges (DEXs) [2, 7, 15], their lending and borrowing [1, 4, 8], or the creation and trade of related derivative contracts [11].

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 79.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 99.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Bartoletti, M., Chiang, J.H.-Y., Lafuente, A.L.: SoK: lending pools in decentralized finance. In: Bernhard, M., et al. (eds.) FC 2021. LNCS, vol. 12676, pp. 553–578. Springer, Heidelberg (2021). https://doi.org/10.1007/978-3-662-63958-0_40

  2. Capponi, A., Jia, R.: The adoption of blockchain-based decentralized exchanges. In: Tokenomics ’21, arxiv preprint arXiv:2103.08842 (2021)

  3. Engel, D., Herlihy, M.: Composing networks of automated market makers. In: Proceedings of the 3rd ACM Conference on Advances in Financial Technologies, pp. 15–28 (2021). https://doi.org/10.1145/3479722.3480987

  4. Gudgeon, L., Werner, S., Perez, D., Knottenbelt, W.J.: DeFi protocols for loanable funds: interest rates, liquidity and market efficiency. In: Proceedings of the 2nd ACM Conference on Advances in Financial Technologies, pp. 92–112 (2020). https://doi.org/10.1145/3419614.3423254

  5. Harvey, C.R., Ramachandran, A., Santoro, J.: DeFi and the Future of Finance. John Wiley & Sons, Hoboken (2021). ISBN: 978-1119836018

    Google Scholar 

  6. Kitzler, S., Victor, F., Saggese, P., Haslhofer, B.: Disentangling decentralized finance (DeFi) compositions. ACM Trans. Web 17(2), 1–26 (2023). https://doi.org/10.1145/3532857

    Article  Google Scholar 

  7. Lehar, A., Parlour, C.A.: Decentralized exchanges. Available at SSRN 3905316 (2021)

    Google Scholar 

  8. Qin, K., Zhou, L., Gamito, P., Jovanovic, P., Gervais, A.: An empirical study of DeFi liquidations: incentives, risks, and instabilities. In: Proceedings of the 21st ACM Internet Measurement Conference, pp. 336–350 (2021). https://doi.org/10.1145/3487552.3487811

  9. Saengchote, K.: Where do defi stablecoins go? A closer look at what defi composability really means. Technical report, Puey Ungphakorn Institute for Economic Research (2021)

    Google Scholar 

  10. Schär, F.: Decentralized finance: on blockchain-and smart contract-based financial markets. FRB of St. Louis Review (2021). https://doi.org/10.1145/3487552.3487811

  11. Soska, K., Dong, J.D., Khodaverdian, A., Zetlin-Jones, A., Routledge, B., Christin, N.: Towards understanding cryptocurrency derivatives: a case study of BitMEX. In: Proceedings of the Web Conference 2021 (WWW ’21), April 2021. https://doi.org/10.1145/3442381.3450059

  12. Tolmach, P., Li, Y., Lin, S.-W., Liu, Y.: Formal analysis of composable DeFi protocols. In: Bernhard, M., et al. (eds.) FC 2021. LNCS, vol. 12676, pp. 149–161. Springer, Heidelberg (2021). https://doi.org/10.1007/978-3-662-63958-0_13

    Chapter  Google Scholar 

  13. von Wachter, V., Jensen, J.R., Ross, O.: Measuring asset composability as a proxy for DeFi integration. In: Bernhard, M., et al. (eds.) Financial Cryptography and Data Security. FC 2021 International Workshops. FC 2021. LNCS, vol. 12676, pp. 109–114. Springer, Berlin, Heidelberg (2021). https://doi.org/10.1007/978-3-662-63958-0_9

  14. Werner, S.M., Perez, D., Gudgeon, L., Klages-Mundt, A., Harz, D., Knottenbelt, W.J.: Sok: decentralized finance (DeFi). arXiv preprint arXiv:2101.08778 (2021)

  15. Xu, J., Paruch, K., Cousaert, S., Feng, Y.: Sok: Decentralized exchanges (DEX) with automated market maker (AMM) protocols. ACM Comput. Surv. 55(11), 1–50 (2023). https://doi.org/10.1145/3570639

  16. Zetzsche, D.A., Arner, D.W., Buckley, R.P.: Decentralized finance. J. Financ. Regul. 6(2), 172–203 (2020). https://doi.org/10.1093/jfr/fjaa010

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Pietro Saggese .

Editor information

Editors and Affiliations

A Visualization Tool

A Visualization Tool

In the main body of the work we focused on the Uniswap “swap” building block to describe the concept of composability in the DeFi Ethereum ecosystem. However, the nested structures and the extracted building blocks are often much more complex. In this Appendix we describe a visualization tool that we implemented to allow a more systematic investigation of the nested structures identified within our dataset. The visualization tool can be found at the following link: https://github.com/PietroSaggese/Visualize_DeFi_compositions.

Fig. 5.
figure 5

Main interface of the visualization tool. Transactions are grouped by protocol called in the external transaction.

Figure 5 shows the main interface. Each rectangle corresponds to a protocol, and the size is proportional to the number of external transactions directed to it. Uniswap is by far the largest protocol in terms of external calls directed to protocol-specific CAs. It is possible to browse the rectangles to observe what is the fraction of protocol-specific transactions that contain nested building blocks (i.e., that contain internal compositions) in subsequent levels of depth, and what protocols are further called. This operation is repeated for all levels, until the end of the execution tree of all transactions is reached.

Figure 6a shows 1inch as an example. Each rectangle represents the fraction of transactions that contain further building blocks in the next level of depth. As one can see, a large fraction of calls contains building blocks induced by CAs related to Uniswap and to other DEX protocols. We explore one of the rectangles in Fig. 6b. We investigate the fraction of 1inch transactions that call DeFi CAs of four protocols (curvefinance, sushiswap, synthetix, uniswap) in the next level of depth. The structure is complex, and other building blocks can be found in a repeatedly nested structure. Our second example is the Instadapp protocol. It is reported in Fig. 7 in order to show that nested structures can appear also in deeper levels of the tree structure. We browse the structure up to the fourth level of nestedness (Figs. 7a to 7e) and observe in Fig. 7f that a large fraction of the transactions contain calls to several other protocols (Aave, 1inch, Dydx, Compound, ...). In summary, these two examples show that building blocks are heavily nested, also in deeper levels of the transaction execution trees, thus being a sign that internal compositions exist, and can be systematically investigated with our visualization tool.

Fig. 6.
figure 6

1inch nested building blocks.

Fig. 7.
figure 7

Instadapp nested building blocks.

Rights and permissions

Reprints and permissions

Copyright information

© 2023 International Financial Cryptography Association

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Kitzler, S., Victor, F., Saggese, P., Haslhofer, B. (2023). A Systematic Investigation of DeFi Compositions in Ethereum. In: Matsuo, S., et al. Financial Cryptography and Data Security. FC 2022 International Workshops. FC 2022. Lecture Notes in Computer Science, vol 13412. Springer, Cham. https://doi.org/10.1007/978-3-031-32415-4_18

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-32415-4_18

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-32414-7

  • Online ISBN: 978-3-031-32415-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics