Automated Execution of Financial Contracts on Blockchains

Abstract

The paper investigates financial contract management on distributed ledgers and provides a working solution implemented on the Ethereum blockchain. The system is based on a domain-specific language for financial contracts that is capable of expressing complex multi-party derivatives and is conducive to automated execution. The authors propose an architecture for separating contractual terms from contract execution: a contract evaluator encapsulates the syntax and semantics of financial contracts without actively performing contractual actions; such actions are handled by user-definable contract managers that administer strategies for the execution of contracts. Hosting contracts and contract managers on a distributed ledger, side-by-side with digital assets, facilitates automated settlement of commitments without the need for an intermediary. The paper discusses how the proposed technology may change the way financial institutions, regulators, and individuals interact in a financial system based on distributed ledgers.

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

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12

Notes

  1. 1.

    The term blockchain arises from the technique of sequencing blocks of atomic payments between pseudonymous participants into tamper-resistant verified (implicit) asset balances, which underlies Bitcoin, an unstructured peer-to-peer system with its own virtual currency. We use the term more generally here for peer-to-peer systems without central control, but varying performance, privacy and authentication mechanisms, and for the applications conceived for and made possible by such technology.

  2. 2.

    The term contract is polysemic within the context of this paper, as it ranges over (1) legal contracts, natural language descriptions of legally binding rights and obligations, including financial contracts, (2) formal contracts, rights and obligations described in formal syntax with an unambiguous semantics facilitating mathematical reasoning, which are not necessarily legally binding, (3) smart contracts, programs irrevocably executed on a distributed ledger.

  3. 3.

    This is rather common already and thus hardly controversial: ownership of real estate, shares, bonds, and (bank account) money is in many countries legally determined by the state of various (nondistributed) ledgers. In Denmark, for example, the legally definitive ledgers for these assets are in electronic form rather than paper form.

  4. 4.

    The source code of our implementation, including technical documentation, is available at https://github.com/bem7/ledger-contracts/.

  5. 5.

    A smart contract (and indeed the entire ledger) can be thought of as a state machine whose state and execution is replicated across a peer-to-peer network, supported by a suitable protocol to ensure observable consensus on the state.

  6. 6.

    If coded in a Turing-complete programming language, contract manager code analysis ultimately incurs arbitrarily high computational cost, though.

  7. 7.

    A token is a smart contract that acts as an account manager, keeping track of different actors’ balances of a specific unit of value. This tracking is often represented as a mapping from users to amounts. These smart contracts conventionally have functions for transferring funds and allowing other actors (usually other smart contracts) to transfer funds on the permitter’s behalf.

  8. 8.

    Our implementation runs on a private test-net where the cost of gas is not a concern.

References

  1. Andersen J, Elsborg E, Henglein F, Simonsen JG, Stefansen C (2006) Compositional specification of commercial contracts. Int J Softw Tools Technol Transf 8(6):485–516

    Article  Google Scholar 

  2. Andersen J, Bahr P, Henglein F, Hvitved T (2014) Domain-specific languages for enterprise systems. In: Margaria T, Steffen B (eds) Leveraging applications of formal methods, verification and validation. Technologies for mastering change, vol 8802. LNCS. Springer, Berlin, pp 73–95

    Google Scholar 

  3. Arnold B, Van Deursen A, Res M (1995) An algebraic specification of a language for describing financial products. In: ICSE-17 workshop on formal methods application in software engineering. pp 6–13

  4. Bahr P, Berthold J, Elsman M (2015) Certified symbolic management of financial multi-party contracts. In: Proceedings of the 20th ACM SIGPLAN international conference on functional programming, ACM. pp 315–327

  5. Bank of England (2015) Digital currencies. https://goo.gl/BvHbRU. Accessed 5 Nov 2017

  6. Buterin V (2014) SchellingCoin: a minimal-trust universal data feed. https://goo.gl/w2aJwu. Accessed 5 Nov 2017

  7. Buterin V (2016) Critical update re: DAO vulnerability. https://goo.gl/Ojh8i1. Accessed 5 Nov 2017

  8. Clack CD, Bakshi VA, Braine L (2016) Smart contract templates: foundations, design landscape and research directions. arXiv:1608.00771

  9. European Commission (2016) Financial stability: new EU rules on central clearing for certain credit derivative contracts. https://goo.gl/676Hz8. Accessed 5 Nov 2017

  10. Frankau S, Spinellis D, Nassuphis N, Burgard C (2009) Commercial uses: going functional on exotic trades. J Funct Program 19(1):27–45

    Article  Google Scholar 

  11. Hearn M (2016) Corda: a distributed ledger. https://goo.gl/KzAmDR. Accessed 5 Nov 2017

  12. Henglein F, Stefansen C, Simonsen J, Larsen K (2009) Poets: process-oriented enterprise transaction systems. J Logic Algebraic Program 78(5):381–401

    Article  Google Scholar 

  13. Hvitved T (2010) A survey of formal languages for contracts. In: Fourth workshop on formal languages and analysis of contract–oriented software. pp 29–32

  14. Hvitved T, Bahr P, Andersen J (2011) Domain-specific languages for enterprise systems. Department of Computer Science, University of Copenhagen, Tech. rep

  15. Hvitved T, Klaedtke F, Zalinescu E (2012) A trace-based model for multiparty contracts. J Logic Algebraic Program 81(2):72–98

    Article  Google Scholar 

  16. Hyperledger Project (2016) Hyperledger fabric: protocol specification. https://goo.gl/Z2PDHd. Accessed 5 Nov 2017

  17. Jensen MV, Pedersen LH (2016) Early option exercise: never say never. J Financ Econ 121(2):278–299

    Article  Google Scholar 

  18. Jones SP, Eber JM (2003) How to write a financial contract. In: Gibbons J, de Moor O (eds) The fun of programming. Palgrave Macmillan

  19. Jones SP, Eber JM, Seward J (2000) Composing contracts: an adventure in financial engineering (functional pearl). In: Proceedings of the 20th ACM SIGPLAN international conference on functional programming, ACM. pp 280–292

  20. Luu L, Chu DH, Olickel H, Saxena P, Hobor A (2016) Making smart contracts smarter. In: Proceedings of the 2016 ACM SIGSAC conference on computer and communications security, ACM, New York, NY, USA, CCS ’16. pp 254–269. https://doi.org/10.1145/2976749.2978309.

  21. Merton RC (1973) Theory of rational option pricing. Bell J Econ Manag Sci 4(1):141–183

    Article  Google Scholar 

  22. Mortensen S (2016) Universal contracts. https://goo.gl/u64skF. Accessed 5 Nov 2017

  23. Moyano JP, Ross O (2017) KYC optimization using distributed ledger technology. Bus Inf Syst Eng. https://doi.org/10.1007/s12599-017-0504-2

    Google Scholar 

  24. Nakamoto S (2009) Bitcoin: a peer-to-peer electronic cash system. https://goo.gl/wXWfP. Accessed 5 Nov 2017

  25. R3 (2016) IRS demo. https://goo.gl/miGCVa. Accessed 5 Nov 2017

  26. Rice HG (1953) Classes of recursively enumerable sets and their decision problems. Trans Am Math Soc 74:358–366

    Article  Google Scholar 

  27. Santander Innoventures, Oliver Wyman (2015) The fintech 2.0 paper: rebooting financial services. https://goo.gl/xMXtks. Accessed 5 Nov 2017

  28. Schneider J, Blostein A, Lee B, Kent S, Groer I, Beardsley E (2016) Blockchain-putting theory into practice. http://www.finyear.com/attachment/690548/. Accessed 25 Nov 2017

  29. Schuldenzucker S (2014) Decomposing contracts. Master’s thesis, University of Bonn

  30. Wood G (2016) Ethereum: a secure decentralised generalised transaction ledger. https://goo.gl/0R6Slw, accessed 5 November 2017

Download references

Acknowledgements

We thank Sofus Mortensen for suggesting the topic of financial contracts on distributed ledgers.

Author information

Affiliations

Authors

Corresponding author

Correspondence to Omri Ross.

Additional information

Accepted after two revisions by the editors of the special issue.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Egelund-Müller, B., Elsman, M., Henglein, F. et al. Automated Execution of Financial Contracts on Blockchains. Bus Inf Syst Eng 59, 457–467 (2017). https://doi.org/10.1007/s12599-017-0507-z

Download citation

Keywords

  • Blockchain
  • Domain specific language
  • Financial services
  • Distributed ledger