Advertisement

An Empirical Analysis of Smart Contracts: Platforms, Applications, and Design Patterns

  • Massimo BartolettiEmail author
  • Livio Pompianu
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10323)

Abstract

Smart contracts are computer programs that can be consistently executed by a network of mutually distrusting nodes, without the arbitration of a trusted authority. Because of their resilience to tampering, smart contracts are appealing in many scenarios, especially in those which require transfers of money to respect certain agreed rules (like in financial services and in games). Over the last few years many platforms for smart contracts have been proposed, and some of them have been actually implemented and used. We study how the notion of smart contract is interpreted in some of these platforms. Focussing on the two most widespread ones, Bitcoin and Ethereum, we quantify the usage of smart contracts in relation to their application domain. We also analyse the most common programming patterns in Ethereum, where the source code of smart contracts is available.

Notes

Acknowledgments

This work is partially supported by Aut. Reg. of Sardinia project P.I.A. 2013 “NOMAD”.

References

  1. 1.
    Bitcoin contract. https://en.bitcoin.it/wiki/Contract. Accessed 14 Jan 2017
  2. 2.
    Bitcoin OP_RETURN wiki page. https://en.bitcoin.it/wiki/OP_RETURN. Accessed 14 Jan 2017
  3. 3.
    Dgx website. https://www.dgx.io/. Accessed 14 Jan 2017
  4. 4.
    Ethereum hard fork 20 July 2016. https://blog.ethereum.org/2016/07/20/hard-fork-completed/. Accessed 14 Jan 2017
  5. 5.
    Ethereum request for comment 20. https://github.com/ethereum/wiki/wiki/Standardized_Contract_APIs. Accessed 14 Jan 2017
  6. 6.
    Lisk. https://lisk.io/. Accessed 14 Jan 2017
  7. 7.
    Making sense of blockchain smart contracts. http://www.coindesk.com/making-sense-smart-contracts/. Accessed 14 Jan 2017
  8. 8.
    Monax. https://monax.io/. Accessed 14 Jan 2017
  9. 9.
    Smart contracts: The good, the bad and the lazy. http://www.multichain.com/blog/2015/11/smart-contracts-good-bad-lazy/. Accessed 14 Jan 2017
  10. 10.
    Stellar. https://www.stellar.org/. Accessed 14 Jan 2017
  11. 11.
    The Stellar consensus protocol. https://www.stellar.org/papers/stellar-consensus-protocol.pdf. Accessed 14 Jan 2017
  12. 12.
    Thinking about smart contract security. https://blog.ethereum.org/2016/06/19/thinking-smart-contract-security/. Accessed 14 Jan 2017
  13. 13.
    Understanding the DAO attack. http://www.coindesk.com/understanding-dao-hack-journalists/. Accessed 14 Jan 2017
  14. 14.
    Another bug in the ens, you can win with an unlimited high bid without paying for it (2017). https://www.reddit.com/r/ethereum/comments/5zctus/another_bug_in_the_ens_you_can_win_with_an/. Accessed 17 Mar 2017
  15. 15.
    Anderson, L., Holz, R., Ponomarev, A., Rimba, P., Weber, I.: New kids on the block: an analysis of modern blockchains. CoRR abs/1606.06530 (2016)Google Scholar
  16. 16.
    Andrychowicz, M., Dziembowski, S., Malinowski, D., Mazurek, L.: Secure multiparty computations on Bitcoin. In: IEEE S & P, pp. 443–458 (2014)Google Scholar
  17. 17.
    Andrychowicz, M., Dziembowski, S., Malinowski, D., Mazurek, L.: Secure ultiparty computations on Bitcoin. Commun. ACM 59(4), 76–84 (2016). http://doi.acm.org/10.1145/2896386 CrossRefGoogle Scholar
  18. 18.
    Atzei, N., Bartoletti, M., Cimoli, T.: A survey of attacks on ethereum smart contracts (SoK). In: Maffei, M., Ryan, M. (eds.) POST 2017. LNCS, vol. 10204, pp. 164–186. Springer, Heidelberg (2017).  https://doi.org/10.1007/978-3-662-54455-6_8 CrossRefGoogle Scholar
  19. 19.
    Back, A., Bentov, I.: Note on fair coin toss via Bitcoin (2013). http://www.cs.technion.ac.il/~idddo/cointossBitcoin.pdf
  20. 20.
    Banasik, W., Dziembowski, S., Malinowski, D.: Efficient zero-knowledge contingent payments in cryptocurrencies without scripts. In: Askoxylakis, I., Ioannidis, S., Katsikas, S., Meadows, C. (eds.) ESORICS 2016. LNCS, vol. 9879, pp. 261–280. Springer, Cham (2016).  https://doi.org/10.1007/978-3-319-45741-3_14 CrossRefGoogle Scholar
  21. 21.
    Baqer, K., Huang, D.Y., McCoy, D., Weaver, N.: Stressing out: Bitcoin “stress testing”. In: Clark, J., Meiklejohn, S., Ryan, P.Y.A., Wallach, D., Brenner, M., Rohloff, K. (eds.) FC 2016. LNCS, vol. 9604, pp. 3–18. Springer, Heidelberg (2016).  https://doi.org/10.1007/978-3-662-53357-4_1 CrossRefGoogle Scholar
  22. 22.
    Bartoletti, M., Carta, S., Cimoli, T., Saia, R.: Dissecting Ponzi schemes on Ethereum: identification, analysis, and impact. CoRR abs/1703.03779 (2017). https://arxiv.org/abs/1703.03779
  23. 23.
    Bartoletti, M., Pompianu, L.: An analysis of Bitcoin OP_RETURN metadata. CoRR abs/1702.01024 (2016). To appear in Bitcoin Workshop 2017. https://arxiv.org/abs/1702.01024
  24. 24.
    Bentov, I., Kumaresan, R.: How to use Bitcoin to design fair protocols. In: Garay, J.A., Gennaro, R. (eds.) CRYPTO 2014. LNCS, vol. 8617, pp. 421–439. Springer, Heidelberg (2014).  https://doi.org/10.1007/978-3-662-44381-1_24 CrossRefGoogle Scholar
  25. 25.
    Bhargavan, K., Delignat-Lavaud, A., Fournet, C., Gollamudi, A., Gonthier, G., Kobeissi, N., Rastogi, A., Sibut-Pinote, T., Swamy, N., Zanella-Beguelin, S.: Formal verification of smart contracts. In: PLAS (2016)Google Scholar
  26. 26.
    Bonneau, J., Miller, A., Clark, J., Narayanan, A., Kroll, J.A., Felten, E.W.: SoK: research perspectives and challenges for Bitcoin and cryptocurrencies. In: IEEE S & P, pp. 104–121 (2015)Google Scholar
  27. 27.
    Brown, R.G., Carlyle, J., Grigg, I., Hearn, M.: Corda: an introduction (2016). http://r3cev.com/s/corda-introductory-whitepaper-final.pdf
  28. 28.
    Buterin, V.: Ethereum: a next generation smart contract and decentralized application platform (2013). https://github.com/ethereum/wiki/wiki/White-Paper
  29. 29.
    Churyumov, A.: Byteball: a decentralized system for transfer of value (2016). https://byteball.org/Byteball.pdf
  30. 30.
    Clack, C.D., Bakshi, V.A., Braine, L.: Smart contract templates: foundations, design landscape and research directions. CoRR abs/1608.00771 (2016)Google Scholar
  31. 31.
    Delmolino, K., Arnett, M., Kosba, A., Miller, A., Shi, E.: Step by step towards creating a safe smart contract: lessons and insights from a cryptocurrency lab. In: Clark, J., Meiklejohn, S., Ryan, P.Y.A., Wallach, D., Brenner, M., Rohloff, K. (eds.) FC 2016. LNCS, vol. 9604, pp. 79–94. Springer, Heidelberg (2016).  https://doi.org/10.1007/978-3-662-53357-4_6 CrossRefGoogle Scholar
  32. 32.
    Dermody, R., Krellenstein, A., Slama, O., Wagner, E.: Counterparty: Protocol specification (2014). http://counterparty.io/docs/protocol_specification/. Accessed 14 Jan 2017
  33. 33.
    Frantz, C.K., Nowostawski, M.: From institutions to code: towards automated generation of smart contracts. In: Workshop on Engineering Collective Adaptive Systems (eCAS) (2016)Google Scholar
  34. 34.
    Glaser, F., Zimmermann, K., Haferkorn, M., Weber, M.C.: Bitcoin - asset or currency? revealing users’ hidden intentions. In: European Conference on Information Systems (ECIS) (2014)Google Scholar
  35. 35.
    Grau, P.: Lessons learned from making a chess game for Ethereum (2016). https://medium.com/@graycoding/lessons-learned-from-making-a-chess-game-for-ethereum-6917c01178b6#.fwtdwly6e. Accessed 14 Jan 2017
  36. 36.
    Kumaresan, R., Moran, T., Bentov, I.: How to use Bitcoin to play decentralized poker. In: ACM CCS, pp. 195–206 (2015)Google Scholar
  37. 37.
    Luu, L., Chu, D.H., Olickel, H., Saxena, P., Hobor, A.: Making smart contracts smarter. In: ACM CCS (2016). http://eprint.iacr.org/2016/633
  38. 38.
    Marino, B., Juels, A.: Setting standards for altering and undoing smart contracts. In: Alferes, J.J.J., Bertossi, L., Governatori, G., Fodor, P., Roman, D. (eds.) RuleML 2016. LNCS, vol. 9718, pp. 151–166. Springer, Cham (2016).  https://doi.org/10.1007/978-3-319-42019-6_10 CrossRefGoogle Scholar
  39. 39.
    Möser, M., Böhme, R.: Trends, tips, tolls: a longitudinal study of Bitcoin transaction fees. In: Brenner, M., Christin, N., Johnson, B., Rohloff, K. (eds.) FC 2015. LNCS, vol. 8976, pp. 19–33. Springer, Heidelberg (2015).  https://doi.org/10.1007/978-3-662-48051-9_2 CrossRefGoogle Scholar
  40. 40.
    Nakamoto, S.: Bitcoin: a peer-to-peer electronic cash system (2008). https://bitcoin.org/bitcoin.pdf
  41. 41.
    Nomura Research Institute: Survey on blockchain technologies and related services. http://www.meti.go.jp/english/press/2016/pdf/0531_01f.pdf
  42. 42.
    Popejoy, S.: The Pact smart contract language (2016). http://kadena.io/pact
  43. 43.
    Reid, F., Harrigan, M.: An analysis of anonymity in the Bitcoin system. In: Altshuler, Y., Elovici, Y., Cremers, A., Aharony, N., Pentland, A. (eds.) Security and Privacy in Social Networks, pp. 197–223. Springer, Heidelberg (2013).  https://doi.org/10.1007/978-1-4614-4139-7_10 CrossRefGoogle Scholar
  44. 44.
    Ron, D., Shamir, A.: Quantitative analysis of the full Bitcoin transaction graph. In: Sadeghi, A.-R. (ed.) FC 2013. LNCS, vol. 7859, pp. 6–24. Springer, Heidelberg (2013).  https://doi.org/10.1007/978-3-642-39884-1_2 CrossRefGoogle Scholar
  45. 45.
    Seijas, P.L., Thompson, S., McAdams, D.: Scripting smart contracts for distributed ledger technology. Cryptology ePrint Archive, Report 2016/1156 (2016). http://eprint.iacr.org/2016/1156
  46. 46.
    Sompolinsky, Y., Zohar, A.: Secure high-rate transaction processing in Bitcoin. In: Böhme, R., Okamoto, T. (eds.) FC 2015. LNCS, vol. 8975, pp. 507–527. Springer, Heidelberg (2015).  https://doi.org/10.1007/978-3-662-47854-7_32 CrossRefGoogle Scholar
  47. 47.
    Szabo, N.: Formalizing and securing relationships on public networks. First Monday 2(9) (1997). http://firstmonday.org/htbin/cgiwrap/bin/ojs/index.php/fm/article/view/548
  48. 48.
    UK Government Chief Scientific Adviser: Distributed ledger technology: beyond block chain. https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/492972/gs-16-1-distributed-ledger-technology.pdf
  49. 49.
    Wood, G.: Ethereum: a secure decentralised generalised transaction ledger (2014). http://gavwood.com/paper.pdf

Copyright information

© International Financial Cryptography Association 2017

Authors and Affiliations

  1. 1.Università degli Studi di CagliariCagliariItaly

Personalised recommendations