Translation Certification for Smart Contracts

Publication date

2022

Authors

Krijnen, Jacco O.G.ISNI 0000000512545654
Chakravarty, Manuel
Keller, GabrieleORCID 0000-0003-1442-5387ISNI 0000000353696972
Swierstra, WouterORCID 0000-0002-0295-7944ISNI 0000000426852359

Editors

Hanus, Michael
Igarashi, Atsushi

Advisors

Supervisors

Document Type

Part of book
Open Access logo

License

taverne

Abstract

Compiler correctness is an old problem, but with the emergence of smart contracts on blockchains that problem presents itself in a new light. Smart contracts are self-contained pieces of software that control (valuable) assets in an adversarial environment; once committed to the blockchain, these smart contracts cannot be modified. Smart contracts are typically developed in a high-level contract language and compiled to low-level virtual machine code before being committed to the blockchain. For a smart contract user to trust a given piece of low-level code on the blockchain, they must convince themselves that (a) they are in possession of the matching source code and (b) that the compiler has correctly translated the source code to the given low-level code. Classic approaches to compiler correctness tackle the second point. We argue that translation certification also squarely addresses the first. We describe the proof architecture of a novel translation certification framework, implemented in Coq, for a functional smart contract language. We demonstrate that we can model the compilation pipeline as a sequence of translation relations that facilitate a modular verification methodology and are robust in the face of an evolving compiler implementation.

Keywords

compilers, verification, Smart contracts, blockchain, Taverne, Theoretical Computer Science, General Computer Science

Citation

Krijnen, J, Chakravarty, M, Keller, G & Swierstra, W 2022, Translation Certification for Smart Contracts. in M Hanus & A Igarashi (eds), Functional and Logic Programming : 16th International Symposium, FLOPS 2022, Kyoto, Japan, May 10–12, 2022, Proceedings. Lecture Notes in Computer Science (LNCS), vol. 13215, Springer, pp. 94-111, 16th International Symposium on Functional and Logic Programming (FLOPS 2022), 10/05/22. https://doi.org/10.1007/978-3-030-99461-7_6, conference