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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Szabo, N.: The idea of smart contracts. Nick Szabo’s Papers and Concise Tutorials, vol. 6 (1997)
Nakamoto, S.: Bitcoin: a peer-to-peer electronic cash system (2008). https://bitcoin.org/bitcoin.pdf
Wood, G.: Ethereum: a secure decentralised generalised transaction ledger. Ethereum Project Yellow Paper 151, pp. 1–32 (2014)
Lopp, J.: Unspent transactions outputs in Bitcoin (2016). http://statoshi.info/dashboard/db/unspent-transaction-output-set. Accessed 7 Nov 2016
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
Cook, M.: A concrete view of Rule 110 computation. Electron. Proc. Theor. Comput. Sci. 1, 31–55 (2009)
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
Ergoscript, a cryptocurrency scripting language supporting noninteractive zero-knowledge proofs, March 2019. https://docs.ergoplatform.com/ErgoScript.pdf
Damgård, I.: On \(\varSigma \)-Protocols (2010). http://www.cs.au.dk/~ivan/Sigma.pdf
Advanced ErgoScript tutorial, March 2019. https://docs.ergoplatform.com/sigmastate_protocols.pdf
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)
The Ethereum Wiki. ERC20 token standard (2018). https://theethereum.wiki/w/index.php/ERC20_Token_Standard
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
Chepurnoy, A.: An ICO example on top of Ergo (2019). https://ergoplatform.org/en/blog/2019_04_10-ico-example/
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
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)