Skip to main content

Multi-stage Contracts in the UTXO Model

  • Conference paper
  • First Online:
Data Privacy Management, Cryptocurrencies and Blockchain Technology (DPM 2019, CBT 2019)

Abstract

Smart contract platforms such as Bitcoin and Ethereum allow writing programs that run on a decentralized computer. Bitcoin uses short-lived immutable data structures called UTXOs for data manipulation. Ethereum, on the other hand uses, long-lived mutable data structures called accounts. UTXOs are easier to handle, less error prone and scale better because the only operation we can do with them is to create or destroy (i.e., spend) them. The code inside a UTXO is executed only once, when it is spent. Additionally, this code refers to only local context (i.e., it is stateless). In Ethereum’s account based system, there is a shared global context which each account can access and modify, thereby causing side affects. However, the benefit of persistent storage offered by accounts makes up for these drawbacks. In this work, we describe how to emulate persistent storage in UTXO based systems using a technique called transaction trees. This allows us to emulate the functionality of account-based systems such as Ethereum without the overhead of accounts. We demonstrate this via several examples which include contracts for a Rock-Paper-Scissors game, crowdfunding and an initial coin offering (ICO). The contracts are created in a UTXO based smart contract platform called Ergo that supports transaction trees.

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 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.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. Szabo, N.: The idea of smart contracts. Nick Szabo’s Papers and Concise Tutorials, vol. 6 (1997)

    Google Scholar 

  2. Nakamoto, S.: Bitcoin: a peer-to-peer electronic cash system (2008). https://bitcoin.org/bitcoin.pdf

  3. Wood, G.: Ethereum: a secure decentralised generalised transaction ledger. Ethereum Project Yellow Paper 151, pp. 1–32 (2014)

    Google Scholar 

  4. Lopp, J.: Unspent transactions outputs in Bitcoin (2016). http://statoshi.info/dashboard/db/unspent-transaction-output-set. Accessed 7 Nov 2016

  5. Chepurnoy, A., Kharin, V., Meshkov, D.: Self-reproducing coins as universal turing machine. In: Garcia-Alfaro, J., Herrera-Joancomartí, J., Livraga, G., Rios, R. (eds.) DPM/CBT 2018. LNCS, vol. 11025, pp. 57–64. Springer, Cham (2018). https://doi.org/10.1007/978-3-030-00305-0_4

    Chapter  Google Scholar 

  6. Cook, M.: A concrete view of Rule 110 computation. Electron. Proc. Theor. Comput. Sci. 1, 31–55 (2009)

    Article  MathSciNet  Google Scholar 

  7. Neary, T., Woods, D.: P-completeness of cellular automaton Rule 110. In: Bugliesi, M., Preneel, B., Sassone, V., Wegener, I. (eds.) ICALP 2006. LNCS, vol. 4051, pp. 132–143. Springer, Heidelberg (2006). https://doi.org/10.1007/11786986_13

    Chapter  Google Scholar 

  8. Ergoscript, a cryptocurrency scripting language supporting noninteractive zero-knowledge proofs, March 2019. https://docs.ergoplatform.com/ErgoScript.pdf

  9. Damgård, I.: On \(\varSigma \)-Protocols (2010). http://www.cs.au.dk/~ivan/Sigma.pdf

  10. Advanced ErgoScript tutorial, March 2019. https://docs.ergoplatform.com/sigmastate_protocols.pdf

  11. Delmolino, K., Arnett, M., Kosba, A.E., Miller, A., Shi, E.: Step by step towards creating a safe smart contract: lessons and insights from a cryptocurrency lab. IACR Cryptology ePrint Archive 2015:460 (2015)

    Google Scholar 

  12. The Ethereum Wiki. ERC20 token standard (2018). https://theethereum.wiki/w/index.php/ERC20_Token_Standard

  13. Reyzin, L., Meshkov, D., Chepurnoy, A., Ivanov, S.: Improving authenticated dynamic dictionaries, with applications to cryptocurrencies. In: Kiayias, A. (ed.) FC 2017. LNCS, vol. 10322, pp. 376–392. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-70972-7_21

    Chapter  Google Scholar 

  14. Chepurnoy, A.: An ICO example on top of Ergo (2019). https://ergoplatform.org/en/blog/2019_04_10-ico-example/

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Amitabh Saxena .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Chepurnoy, A., Saxena, A. (2019). Multi-stage Contracts in the UTXO Model. In: Pérez-Solà, C., Navarro-Arribas, G., Biryukov, A., Garcia-Alfaro, J. (eds) Data Privacy Management, Cryptocurrencies and Blockchain Technology. DPM CBT 2019 2019. Lecture Notes in Computer Science(), vol 11737. Springer, Cham. https://doi.org/10.1007/978-3-030-31500-9_16

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-31500-9_16

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-31499-6

  • Online ISBN: 978-3-030-31500-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics