Building Executable Secure Design Models for Smart Contracts with Formal Methods

12/09/2019
by   Weifeng Xu, et al.
0

Smart contracts are appealing because they are self-executing business agreements between parties with the predefined and immutable obligations and rights. However, as with all software, smart contracts may contain vulnerabilities because of design flaws, which may be exploited by one of the parties to defraud the others. In this paper, we demonstrate a systematic approach to building secure design models for smart contracts using formal methods. To build the secure models, we first model the behaviors of participating parties as state machines, and then, we model the predefined obligations and rights of contracts, which specify the interactions among state machines for achieving the business goal. After that, we illustrate executable secure model design patterns in TLA+ (Temporal Logic of Actions) to against well-known smart contract vulnerabilities in terms of state machines and obligations and rights at the design level. These vulnerabilities are found in Ethereum contracts, including Call to the unknown, Gasless send, Reentrancy, Lost in the transfer, and Unpredictable state. The resultant TLA+ specifications are called secure models. We illustrate our approach to detect the vulnerabilities using a real-estate contract example at the design level.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
11/26/2017

Designing Secure Ethereum Smart Contracts: A Finite State Machine Based Approach

The adoption of blockchain-based distributed computation platforms is gr...
research
05/14/2023

CLawK: Monitoring Business Processes in Smart Contracts

Smart contracts embody complex business processes that can be difficult ...
research
07/16/2018

Private Data Objects: an Overview

We present Private Data Objects (PDOs), a technology that enables mutual...
research
03/17/2021

Assessing Smart Contracts Security Technical Debts

Smart contracts are self-enforcing agreements that are employed to excha...
research
05/12/2022

Reactive Synthesis of Smart Contract Control Flows

Smart contracts are small but highly error-prone programs that implement...
research
07/10/2022

A Decentralised Real Estate Transfer Verification Based on Self-Sovereign Identity and Smart Contracts

Since its first introduction in late 90s, the use of marketplaces has co...
research
09/15/2021

JUBILEE: Secure Debt Relief and Forgiveness

JUBILEE is a securely computed mechanism for debt relief and forgiveness...

Please sign up or login with your details

Forgot password? Click here to reset