Skip to main content

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

  • Conference paper
  • First Online:
Formal Methods. FM 2019 International Workshops (FM 2019)

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

Included in the following conference series:

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.

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 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.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

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

    ChapterĀ  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

    ArticleĀ  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

    ArticleĀ  MathSciNetĀ  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

    ChapterĀ  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

    BookĀ  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

    ArticleĀ  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

Check for updates. 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: Sekerinski, E., 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)

Publish with us

Policies and ethics