Flint for Safer Smart Contracts

Franklin Schrans, Daniel Hails, Alexander Harkness, Sophia Drossopoulou, Susan Eisenbach
4/13/2019
cs.PLcs.CR

Official code: flintlang/flint (245 stars, MIT, last commit 2022-12-04).

Abstract

The Ethereum blockchain platform supports the execution of decentralised applications or smart contracts. These typically hold and transfer digital currency to other parties on the platform; however, they have been subject to numerous attacks due to the unintentional introduction of bugs. Over a billion dollars worth of currency has been stolen since its release in July 2015. As smart contracts cannot be updated after deployment, it is imperative that the programming language supports the development of robust contracts. We propose Flint, a new statically-typed programming language specifically designed for writing robust smart contracts. Flint's features enforce the writing of safe and predictable code. To encourage good practices, we introduce protection blocks. Protection blocks restrict who can run code and when (using typestate) it can be executed. To prevent vulnerabilities relating to the unintentional loss of currency, Flint Asset traits provide safe atomic operations, ensuring the state of contracts is always consistent. Writes to state are restricted, simplifying reasoning about smart contracts.

View on arXivView PDF

Code Implementations(1)

flintlang/flintOfficial100%
MIT

The Flint Programming Language for Smart Contracts

24518Rust, ShellDec 19, 20173 years agoMIT
caller-protectionscompilerecosystemethereumflint+6 more

Cite this paper

@article{schrans2019flint,
  title  = {Flint for Safer Smart Contracts},
  author = {Franklin Schrans and Daniel Hails and Alexander Harkness and Sophia Drossopoulou and Susan Eisenbach},
  year   = {2019},
  eprint = {1904.06534},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1904.06534}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1904.06534.svg)](https://codeofpaper.com/paper/1904.06534)

Discussion