Declarative Smart Contracts

07/27/2022
by   Haoxian Chen, et al.
0

This paper presents DeCon, a declarative programming language for implementing smart contracts and specifying contract-level properties. Driven by the observation that smart contract operations and contract-level properties can be naturally expressed as relational constraints, DeCon models each smart contract as a set of relational tables that store transaction records. This relational representation of smart contracts enables convenient specification of contract properties, facilitates run-time monitoring of potential property violations, and brings clarity to contract debugging via data provenance. Specifically, a DeCon program consists of a set of declarative rules and violation query rules over the relational representation, describing the smart contract implementation and contract-level properties, respectively. We have developed a tool that can compile DeCon programs into executable Solidity programs, with instrumentation for run-time property monitoring. Our case studies demonstrate that DeCon can implement realistic smart contracts such as ERC20 and ERC721 digital tokens. Our evaluation results reveal the marginal overhead of DeCon compared to the open-source reference implementation, incurring 14 overhead for run-time verification.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/01/2022

Finding smart contract vulnerabilities with ConCert's property-based testing framework

We provide three detailed case studies of vulnerabilities in smart contr...
research
05/24/2020

Tezla, an Intermediate Representation for Static Analysis of Michelson Smart Contracts

This paper introduces Tezla, an intermediate representation of Michelson...
research
06/07/2019

Smart Contract Design Meets State Machine Synthesis: Case Studies

Modern blockchain systems support creation of smart contracts -- statefu...
research
02/01/2020

An Open Source Solution for Smart Contract-based Parking

This paper discusses an open source solution to smart-parking in highly ...
research
11/28/2019

Securing Smart Contract On The Fly

We present Solythesis, a source to source Solidity compiler which takes ...
research
03/31/2023

Pacti: Scaling Assume-Guarantee Reasoning for System Analysis and Design

Contract-based design is a method to facilitate modular system design. W...
research
02/29/2020

Renegotiation and recursion in Bitcoin contracts

BitML is a process calculus to express smart contracts that can be run o...

Please sign up or login with your details

Forgot password? Click here to reset