skip to main content
research-article

DeFi Survival Analysis: Insights Into the Emerging Decentralized Financial Ecosystem

Published: 18 March 2024 Publication History

Abstract

We propose a survival analysis approach for discovering and characterizing user behavior and risks for lending protocols in decentralized finance (DeFi). We demonstrate how to gather and prepare DeFi transaction data for survival analysis. We illustrate our approach using transactions in Aave, one of the largest lending protocols. We develop a DeFi survival analysis pipeline that first prepares transaction data for survival analysis through the selection of different index events (or transactions) and associated outcome events. Then we apply survival analysis statistical and visualization methods modified for competing risks when appropriate, such as Kaplan–Meier survival curves, cumulative incidence functions, Cox hazard regression, and Fine-Gray models for sub-distribution hazards to gain insights into usage patterns and risks within the protocol. We show how, by varying the index and outcome events as well as covariates, we can use DeFi survival analysis to answer questions like “How does loan size affect the repayment schedule of the loan?”; “How does loan size affect the likelihood that an account gets liquidated?”; “How does user behavior vary between Aave markets?”; “How has user behavior in Aave varied from quarter to quarter?” The proposed DeFi survival analysis can easily be generalized to other DeFi lending protocols. By defining appropriate index and outcome events, DeFi survival analysis can be applied to any cryptocurrency protocol with transactions.

References

[1]
Antonio Juliano. 2017. dYdX: A Standard for Decentralized Margin Trading and Derivatives. Technical Report. Retrieved from https://whitepaper.dydx.exchange/
[2]
Massimo Bartoletti, James Hsin-yu Chiang, and Alberto Lluch Lafuente. 2021. SoK: Lending pools in decentralized finance. In International Conference on Financial Cryptography and Data Security. Springer, 553–578.
[3]
Kristin P. Bennett. 2019. Artificial intelligence for public health. In 2019 IEEE International Conference on Bioinformatics and Biomedicine (BIBM). 1–2. DOI:
[4]
Boado, Ernesto. 2020. AAVE Protocol Whitepaper. Technical Report. Retrieved from https://www.cryptocompare.com/media/38553941/aave_protocol_whitepaper_v1_0.pdf
[5]
Boado, Ernesto. 2020. AAVE Protocol Whitepaper V2.0. Technical Report. Retrieved from https://cryptorating.eu/whitepapers/Aave/aave-v2-whitepaper.pdf
[6]
Vitalik Buterin. 2014. Ethereum: A Next-generation Smart Contract and Decentralized Application Platform. Retrieved from https://github.com/ethereum/wiki/wiki/White-Paper
[7]
Sang-Min Choi, Jiho Park, Quan Nguyen, and Andre Cronje. 2018. Fantom: A scalable framework for asynchronous distributed systems. DOI:
[8]
Brian Ciochetti, Yongheng Deng, Bin Gao, and Rui Yao. 2002. The termination of commercial mortgage contracts through prepayment and default: A proportional hazard approach with competing risks. Real Estate Economics 30, 4 (02 2002), 595–633. DOI:
[9]
Taane G. Clark, Michael J. Bradburn, Sharon B. Love, and Douglas G. Altman. 2003. Survival analysis part I: Basic concepts and first analyses. British Journal of Cancer 89, 2 (2003), 232–238.
[10]
D. R. Cox. 1972. Regression models and life-tables. Journal of the Royal Statistical Society. Series B (Methodological) 34, 2 (1972), 187–220. Retrieved fromhttp://www.jstor.org/stable/2985181
[11]
Emilio Frangella, Lasse Herskind. 2022. AAVE V3 Technical Paper. Technical Report. Retrieved from https://github.com/aave/aave-v3-core/blob/master/techpaper/Aave_V3_Technical_Paper.pdf
[12]
Jason P. Fine and Robert J. Gray. 1999. A proportional hazards model for the subdistribution of a competing risk. J. Amer. Statist. Assoc. 94, 446 (1999), 496–509. DOI:
[13]
Adrian Gepp and Kuldeep Kumar. 2008. The role of survival analysis in financial distress prediction. International Research Journal of Finance and Economics 16, 16 (2008), 13–34.
[14]
Dennis Glennon and Peter Nigro. 2005. Measuring the default risk of small business loans: A survival analysis approach. Journal of Money, Credit and Banking 37, 5 (2005), 923–947. Retrieved from http://www.jstor.org/stable/3839153
[15]
Anurag Arjun Jaynti Kanani, Sandeep Nailwal. 2020. Matic Network Whitepaper. Retrieved from https://github.com/maticnetwork/whitepaper
[16]
Harry A. Kalodner, Steven Goldfeder, Xiaoqi Chen, S. Matthew Weinberg, and Edward W. Felten. 2018. Arbitrum: Scalable, private smart contracts. In USENIX Security Symposium.
[17]
E. L. Kaplan and Paul Meier. 1958. Nonparametric estimation from incomplete observations. J. Amer. Statist. Assoc. 53, 282 (1958), 457–481. Retrieved fromhttp://www.jstor.org/stable/2281868
[18]
Alboukadel Kassambara, Marcin Kosinski, and Przemyslaw Biecek. 2021. survminer: Drawing Survival Curves using ’ggplot2’. Retrieved from https://CRAN.R-project.org/package=survminerR package version 0.4.9.
[19]
Roman Kozhan and Ganesh Viswanath-Natraj. 2021. Decentralized stablecoins and collateral risk. WBS Finance Group Research Paper, Available at SSRN: https://ssrn.com/abstract=3866975 or
[20]
William R. Lane, Stephen W. Looney, and James W. Wansley. 1986. An application of the cox proportional hazards model to bank failure. Journal of Banking and Finance 10, 4 (1986), 511–531. DOI:
[21]
Zhiyong Li, Aimin Li, Anthony Bellotti, and Xiao Yao. 2023. The profitability of online loans: A competing risks analysis on default and prepayment. European Journal of Operational Research 306, 2 (2023), 968–985. DOI:
[22]
MakerDAO. 2017. The Maker Protocol: MakerDAO’s Multi-Collateral Dai (MCD) System. Technical Report. Retrieved from https://makerdao.com/en/whitepaper/#abstract
[23]
Luís Meira-Machado, Jacobo de Uña-Álvarez, Carmen Cadarso-Suárez, and Per K. Andersen. 2009. Multi-state models for the analysis of time-to-event data. Statistical Methods in Medical Research 18, 2 (2009), 195–222. DOI:.
[24]
Daniel Perez, Sam M. Werner, Jiahua Xu, and Benjamin Livshits. 2021. Liquidations: DeFi on a knife-edge. In International Conference on Financial Cryptography and Data Security. Springer, 457–476.
[25]
Kaihua Qin, Liyi Zhou, Pablo Gamito, Philipp Jovanovic, and Arthur Gervais. 2021. An empirical study of defi liquidations: Incentives, risks, and instabilities. In Proceedings of the 21st ACM Internet Measurement Conference. 336–350.
[26]
R. Core Team. 2022. R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria. Retrieved from https://www.R-project.org/
[27]
Robert Leshner, Geoffrey Hayes. 2019. Compound: The Money Market Protocol. Technical Report. Retrieved from https://compound.finance/documents/Compound.Whitepaper.pdf
[28]
Patrick Royston and Mahesh K. B. Parmar. 2013. Restricted mean survival time: An alternative to the hazard ratio for the design and analysis of randomized trials with a time-to-event outcome. BMC Medical Research Methodology 13, 1 (Dec. 2013). DOI:
[29]
Michal Rychnovský. 2018. Survival analysis as a tool for better probability of default prediction. Acta Oeconomica Pragensia 2018, 1 (2018), 34–46. DOI:
[30]
Kevin Sekniqi, Daniel Laine, Stephen Buttolph, and Emin Gün Sirer. 2020. Avalanche Platform. Retrieved from https://assets.website-files.com/5d80307810123f5ffbb34d6e/6008d7bbf8b10d1eb01e7e16_Avalanche%20Platform%20Whitepaper.pdf
[31]
Xiao Shou, Tian Gao, Dharmashankar Subramanian, and Kristin P. Bennett. 2023. Multi-Label Event Prediction in Continuous Time. To appear.
[32]
Xiao Shou, Georgios Mavroudeas, Alexander New, Kofi Arhin, Jason N. Kuruzovich, Malik Magdon-Ismail, and Kristin P. Bennett. 2019. Supervised mixture models for population health. In 2019 IEEE International Conference on Bioinformatics and Biomedicine (BIBM). 1057–1064. DOI:
[33]
Daniel D. Sjoberg and Teng Fei. 2022. tidycmprsk: Competing Risks Estimation. Retrieved from https://CRAN.R-project.org/package=tidycmprskR package version 0.2.0.
[34]
Harmony Team. 2020. Harmony Technical Whitepaper. Retrieved from https://harmony.one/whitepaper.pdf
[35]
Terry M. Therneau and Patricia M. Grambsch. 2000. Modeling Survival Data: Extending the Cox Model. Springer, New York.
[36]
Terry M. Therneau. 2022. A Package for Survival Analysis in R. Retrieved from https://CRAN.R-project.org/package=survivalR package version 3.4-0.
[37]
Mark Tyneway. 2020. Optimism. Retrieved from https://github.com/ethereum-optimism/optimism
[38]
Abraham Wald. 1943. Tests of statistical hypotheses concerning several parameters when the number of observations is large. Trans. Amer. Math. Soc. 54, 3 (1943), 426–482. Retrieved fromhttp://www.jstor.org/stable/1990256

Index Terms

  1. DeFi Survival Analysis: Insights Into the Emerging Decentralized Financial Ecosystem

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image Distributed Ledger Technologies: Research and Practice
      Distributed Ledger Technologies: Research and Practice  Volume 3, Issue 1
      March 2024
      136 pages
      EISSN:2769-6480
      DOI:10.1145/3613522
      Issue’s Table of Contents

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 18 March 2024
      Online AM: 08 January 2024
      Accepted: 07 December 2023
      Revised: 05 November 2023
      Received: 17 January 2023
      Published in DLT Volume 3, Issue 1

      Check for updates

      Author Tags

      1. Decentralized finance
      2. aave
      3. survival analysis
      4. competing risks
      5. financial technologies
      6. fintech
      7. economics
      8. data analytics

      Qualifiers

      • Research-article

      Funding Sources

      • NSF IUCRC CRAFT
      • Rensselaer Institute for Data Exploration and Applications

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • 0
        Total Citations
      • 202
        Total Downloads
      • Downloads (Last 12 months)202
      • Downloads (Last 6 weeks)22
      Reflects downloads up to 22 Jan 2025

      Other Metrics

      Citations

      View Options

      Login options

      Full Access

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      Full Text

      View this article in Full Text.

      Full Text

      Media

      Figures

      Other

      Tables

      Share

      Share

      Share this Publication link

      Share on social media