Abstract
Decentralized Finance (DeFi) has brought about decentralized applications which allow untrusted users to lend, borrow and exchange crypto-assets. Many of such applications fulfill the role of markets or market makers, featuring complex, highly parametric incentive mechanisms to equilibrate interest rates and prices. This complexity makes the behaviour of DeFi applications difficult to understand: indeed, ill-designed incentive mechanisms could potentially lead to emergent unwanted behaviours. We argue that theories, techniques and tools rooted in formal methods can provide useful instruments to better understand, specify and analyze DeFi systems. We summarize in this paper our first steps towards a theory of DeFi based on formal methods, and we overview the open challenges and opportunities for formal methods in DeFi.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
ERC-20 token standard (2015). https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
Uniswap oracle template (2020). https://github.com/Uniswap/uniswap-v2-periphery/blob/dda62473e2da448bc9cb8f4514dadda4aeede5f4/contracts/examples/ExampleOracleSimple.sol
Starkware (2021). https://starkware.co/
Tornado (2021). https://tornado.cash/
Angeris, G., Evans, A., Chitra, T.: When does the tail wag the dog? Curvature and market making. arXiv preprint arXiv:2012.08040 (2020)
Arusoaie, A.: Certifying findel derivatives for blockchain. J. Logical Algebraic Methods Program. 121 (2021). https://doi.org/10.1016/j.jlamp.2021.100665
Bartoletti, M., Chiang, J.H., Lluch-Lafuente, A.: SoK: lending pools in decentralized finance. In: 5th Workshop on Trusted Smart Contracts (2021). (to appear). https://arxiv.org/abs/2012.13230
Bartoletti, M., Chiang, J.H., Lluch-Lafuente, A.: A theory of automated market makers in defi. arXiv preprint arXiv:2102.11350 (2021)
Bartoletti, M., Zunino, R.: BitML: a calculus for Bitcoin smart contracts. ACM CCS (2018). https://doi.org/10.1145/3243734.3243795
Cao, Y., Zou, C., Cheng, X.: Flashot: a snapshot of flash loan attack on DeFi ecosystem. arXiv preprint arXiv:2102.00626 (2021)
Baum, C., David, B., Frederiksen, T.: P2DEX: privacy-preserving decentralized cryptocurrency exchange. Cryptology ePrint Archive, Report 2021/283 (2021). https://eprint.iacr.org/2021/283
Cecchetti, E., Yao, S., Ni, H., Myers, A.C.: Compositional security for reentrant applications. arXiv preprint arXiv:2103.08577 (2021)
Daian, P., et al.: Flash boys 2.0: frontrunning in decentralized exchanges, miner extractable value, and consensus instability. In: IEEE Symposium on Security and Privacy, pp. 910–927. IEEE (2020). https://doi.org/10.1109/SP40000.2020.00040
Dolev, D., Yao, A.: On the security of public key protocols. IEEE Trans. Inf. Theory 29(2), 198–208 (1983)
Evans, A., Angeris, G., Chitra, T.: Optimal fees for geometric mean market makers (2021). https://web.stanford.edu/~guillean/papers/g3m-optimal-fee.pdf
Gudgeon, L., Werner, S., Perez, D., Knottenbelt, W.J.: Defi protocols for loanable funds: interest rates, liquidity and market efficiency. In: ACM Conference on Advances in Financial Technologies, pp. 92–112 (2020). https://doi.org/10.1145/3419614.3423254
Kao, H.T., Chitra, T., Chiang, R., Morrow, J.: An analysis of the market risk to participants in the compound protocol. https://scfab.github.io/2020/FAB2020_p5.pdf
Qin, K., Zhou, L., Gervais, A.: Quantifying blockchain extractable value: how dark is the forest? (2021). https://arxiv.org/pdf/2101.05511
Qin, K., Zhou, L., Livshits, B., Gervais, A.: Attacking the DeFi ecosystem with flash loans for fun and profit. In: Financial Cryptography (2021). (to appear). https://arxiv.org/pdf/2003.03810
Lamela Seijas, P., Thompson, S.: Marlowe: financial contracts on blockchain. In: Margaria, T., Steffen, B. (eds.) ISoLA 2018. LNCS, vol. 11247, pp. 356–375. Springer, Cham (2018). https://doi.org/10.1007/978-3-030-03427-6_27
Tolmach, P., Li, Y., Lin, S.W., Liu, Y.: Formal analysis of composable DeFi protocols. In: 1st Workshop on Decentralized Finance (2021). (to appear). https://arxiv.org/abs/2103.00540
Vandin, A., Giachini, D., Lamperti, F., Chiaromonte, F.: Automated and distributed statistical analysis of economic agent-based models. arXiv preprint arXiv:2102.05405 (2021)
Wang, D., et al.: Towards understanding flash loan and its applications in DeFi ecosystem. arXiv preprint arXiv:2010.12252 (2020)
Werner, S.M., Perez, D., Gudgeon, L., Klages-Mundt, A., Harz, D., Knottenbelt, W.J.: SoK: decentralized finance (DeFi) (2021)
Zhao, W., Li, H., Yuan, Y.: (2021). (to appear). https://arxiv.org/abs/2101.08423
Zhou, L., Qin, K., Torres, C.F., Le, D.V., Gervais, A.: High-frequency trading on decentralized on-chain exchanges. arXiv preprint arXiv:2009.14021 (2020)
Acknowledgements
The second author is supported by the PhD School of DTU Compute. The third author is partially supported by the EU H2020-SU-ICT-03-2018 Project No. 830929 CyberSec4Europe (cybersec4europe.eu).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 International Financial Cryptography Association
About this paper
Cite this paper
Bartoletti, M., Chiang, J.Hy., Lafuente, A.L. (2021). Towards a Theory of Decentralized Finance. In: Bernhard, M., et al. Financial Cryptography and Data Security. FC 2021 International Workshops. FC 2021. Lecture Notes in Computer Science(), vol 12676. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-63958-0_20
Download citation
DOI: https://doi.org/10.1007/978-3-662-63958-0_20
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-662-63957-3
Online ISBN: 978-3-662-63958-0
eBook Packages: Computer ScienceComputer Science (R0)