Skip to main content

Mi-Cho-Coq, a Framework for Certifying Tezos Smart Contracts

Part of the Lecture Notes in Computer Science book series (LNPSE,volume 12232)

Abstract

Tezos is a blockchain launched in June 2018. It is written in OCaml and supports smart contracts. Its smart contract language is called Michelson and it has been designed with formal verification in mind. In this article, we present Mi-Cho-Coq, a Coq framework for verifying the functional correctness of Michelson smart contracts. As a case study, we detail the certification of a Multisig contract with the Mi-Cho-Coq framework.

Keywords

  • Certified programming
  • Programming languages
  • Blockchains
  • Smart contracts

This is a preview of subscription content, access via your institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • DOI: 10.1007/978-3-030-54994-7_28
  • Chapter length: 12 pages
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
eBook
USD   79.99
Price excludes VAT (USA)
  • ISBN: 978-3-030-54994-7
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
Softcover Book
USD   99.99
Price excludes VAT (USA)
Fig. 1.

Notes

  1. 1.

    i.e. the parameter of the contract is a sum type branching two elements, cf. Sect. 2.2.

References

  1. Michelson: the language of Smart Contracts in Tezos. https://tezos.gitlab.io/whitedoc/michelson.html

  2. Proof-of-stake in Tezos. https://tezos.gitlab.io/whitedoc/proof_of_stake.html

  3. Tezos code repository. https://gitlab.com/tezos/tezos

  4. An introduction to the zen protocol. https://www.zenprotocol.com/files/zen_protocol_white_paper.pdf (2017)

  5. Ahman, D., et al.: Dijkstra monads for free. CoRR abs/1608.06499 (2016). http://arxiv.org/abs/1608.06499

  6. Barthe, G., Dupressoir, F., Grégoire, B., Kunz, C., Schmidt, B., Strub, P.-Y.: EasyCrypt: a tutorial. In: Aldini, A., Lopez, J., Martinelli, F. (eds.) FOSAD 2012-2013. LNCS, vol. 8604, pp. 146–166. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-10082-1_6

    CrossRef  Google Scholar 

  7. Bhargavan, K., et al.: Formal verification of smart contracts: short paper, pp. 91–96. PLAS 2016. ACM, New York (2016). https://doi.org/10.1145/2993600.2993611

  8. Blanchet, B.: Modeling and verifying security protocols with the applied pi calculus and proverif. Found. Trends Priv. Secur. 1(1–2), 1–135 (2016). https://doi.org/10.1561/3300000004

    CrossRef  Google Scholar 

  9. Breitman, A.: Multisig contract in Michelson. https://github.com/murbard/smart-contracts/blob/master/multisig/michelson/generic_multisig.tz

  10. Charguéraud, A.: Characteristic formulae for the verification of imperative programs. In: ICFP 2011, pp. 418–430. ACM, New York (2011)

    Google Scholar 

  11. Claret, G.: Program in Coq. Theses, Université Paris Diderot - Paris 7, September 2018. https://hal.inria.fr/tel-01890983

  12. Dijkstra, E.W.: Guarded commands, nondeterminacy and formal derivation of programs. Commun. ACM 18(8), 453–457 (1975). https://doi.org/10.1145/360933.360975

    MathSciNet  CrossRef  MATH  Google Scholar 

  13. Filliâtre, Jean-Christophe, Paskevich, Andrei: Why3—where programs meet provers. In: Felleisen, Matthias, Gardner, Philippa (eds.) ESOP 2013. LNCS, vol. 7792, pp. 125–128. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-37036-6_8. https://hal.inria.fr/hal-00789533

  14. Grishchenko, Ilya, Maffei, Matteo, Schneidewind, Clara: A semantic framework for the security analysis of ethereum smart contracts. In: Bauer, Lujo, Küsters, Ralf (eds.) POST 2018. LNCS, vol. 10804, pp. 243–269. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-89722-6_10

    CrossRef  Google Scholar 

  15. Hildenbrandt, E., et al.: KEVM: a complete semantics of the ethereum virtual machine. In: 2018 IEEE 31st Computer Security Foundations Symposium, pp. 204–217. IEEE (2018)

    Google Scholar 

  16. Leroy, X., Doligez, D., Frisch, A., Garrigue, J., Rémy, D., Vouillon, J.: The OCaml system release 4.08: documentation and user’s manual. User manual, Inria, June 2019. http://caml.inria.fr/pub/docs/manual-ocaml/

  17. Nipkow, Tobias, Wenzel, Markus, Paulson, Lawrence C. (eds.): Isabelle/HOL: A Proof Assistant forHigher-Order Logic. LNCS, vol. 2283. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45949-9

    CrossRef  MATH  Google Scholar 

  18. Pessaux, F.: FoCaLiZe: inside an F-IDE. In: Workshop F-IDE 2014. Proceedings F-IDE 2014, Grenoble, France, May 2014. https://doi.org/10.4204/EPTCS.149.7

  19. Sergey, I., Kumar, A., Hobor, A.: Scilla: a smart contract intermediate-level language. CoRR abs/1801.00687 (2018). http://arxiv.org/abs/1801.00687

  20. Sergey, I., Nagaraj, V., Johannsen, J., Kumar, A., Trunov, A., Hao, K.C.G.: Safer smart contract programming with scilla. PACMPL 3(OOPSLA), 185:1–185:30 (2019). https://doi.org/10.1145/3360611

    CrossRef  Google Scholar 

  21. Swamy, N., et al.: Dependent types and multi-monadic effects in F*. In: POPL, pp. 256–270. ACM, January 2016. https://www.fstar-lang.org/papers/mumon/

  22. The Coq development team: The Coq Reference Manual, version 8.9, November 2018. http://coq.inria.fr/doc

  23. Zinzindohoué, J.K., Bhargavan, K., Protzenko, J., Beurdouche, B.: HACL*: a verified modern cryptographic library. Cryptology ePrint Archive, Report 2017/536

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Julien Tesson .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and Permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Verify currency and authenticity via CrossMark

Cite this paper

Bernardo, B., Cauderlier, R., Hu, Z., Pesin, B., Tesson, J. (2020). Mi-Cho-Coq, a Framework for Certifying Tezos Smart Contracts. In: , et al. Formal Methods. FM 2019 International Workshops. FM 2019. Lecture Notes in Computer Science(), vol 12232. Springer, Cham. https://doi.org/10.1007/978-3-030-54994-7_28

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-54994-7_28

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-54993-0

  • Online ISBN: 978-3-030-54994-7

  • eBook Packages: Computer ScienceComputer Science (R0)