Abstract
We discuss the design principles of Stipula, a domain specific language that can assists lawyers in programming legal contracts through specific software patterns. The language is based on a small set of primitives, that precisely correspond to the distinctive elements of legal contracts, and that are amenable to be prototyped on both centralized or distributed systems. We also outline two formal techniques to reason about Stipula contracts: a type inference system that allows to derive types for fields, assets and contract’s functions, and an analyzer of liquidity that pinpoints those contracts that do not freeze any asset forever.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
For simplicity, this code requires Better1 to place its bet before Better2. It is easy to extend the code to let the two bets be placed in any order.
References
Cardano Documentation (2020). https://docs.cardano.org/
Bartoletti, M., Zunino, R.: Verifying liquidity of bitcoin contracts. In: Nielson, F., Sands, D. (eds.) POST 2019. LNCS, vol. 11426, pp. 222–247. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-17138-4_10
Basu, S., Mohan, A., Grimmelmann, J., Foster, N.: Legal calculi. Technical report, ProLaLa 2022 ProLaLa Programming Languages and the Law (2022). https://popl22.sigplan.org/details/prolala-2022-papers/6/Legal-Calculi
Biryukov, A., Khovratovich, D., Tikhomirov, S.: Findel: secure derivative contracts for ethereum. In: Brenner, M., et al. (eds.) FC 2017. LNCS, vol. 10323, pp. 453–467. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-70278-0_28
Coblenz, M.J., Aldrich, J., Myers, B.A., Sunshine, J.: Can advanced type systems be usable? an empirical study of ownership, assets, and typestate in obsidian. In: Proceedings of ACM Programming Language, vol. 4, no. OOPSLA, pp. 132:1–132:28 (2020)
Coblenz, M.J., et al.: Obsidian: typestate and assets for safer blockchain programming. ACM Trans. Program. Lang. Syst. 42(3), 14:1–14:82 (2020)
Crafa, S., Laneve, C., Sartor, G.: Pacta sunt servanda: legal contracts in Stipula. Technical report, arXiv:2110.11069, October 2021
Lexon Foundation. Lexon Home Page (2019). http://www.lexon.tech
Peyton Jones, S.L., Eber, J.-M., Seward, J.: Composing contracts: an adventure in financial engineering, functional pearl. In: Proceedings of the Fifth ACM SIGPLAN International Conference on Functional Programming (ICFP 2000), Montreal, Canada, 18–21 September 2000, pp. 280–292. ACM (2000)
Pierce, B.C.: Types and Programming Languages. The MIT Press, Cambridge (2002)
Open Source Contributors. The Accord Project (2018). https://accordproject.org
Research Group on EC Private Law (Acquis Group) Study Group on a European Civil Code. Principles, Definitions and Model Rules of European Private Law: Draft Common Frame of Reference (DCFR), Outline Edition. Sellier (2009)
Wright, A., Roon, D., ConsenSys, A.G.: OpenLaw web site (2019). https://www.openlaw.io
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 Springer Nature Switzerland AG
About this chapter
Cite this chapter
Crafa, S., Laneve, C. (2022). Programming Legal Contracts. In: Ahrendt, W., Beckert, B., Bubel, R., Johnsen, E.B. (eds) The Logic of Software. A Tasting Menu of Formal Methods. Lecture Notes in Computer Science, vol 13360. Springer, Cham. https://doi.org/10.1007/978-3-031-08166-8_7
Download citation
DOI: https://doi.org/10.1007/978-3-031-08166-8_7
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-08165-1
Online ISBN: 978-3-031-08166-8
eBook Packages: Computer ScienceComputer Science (R0)