Prisma: A Tierless Language for Enforcing Contract-Client Protocols in Decentralized Applications (Extended Version)

05/16/2022
by   David Richter, et al.
0

Decentralized applications (dApps) consist of smart contracts that run on blockchains and clients that model collaborating parties. dApps are used to model financial and legal business functionality. Today, contracts and clients are written as separate programs – in different programming languages – communicating via send and receive operations. This makes distributed program flow awkward to express and reason about, increasing the potential for mismatches in the client-contract interface, which can be exploited by malicious clients, potentially leading to huge financial losses. In this paper, we present Prisma, a language for tierless decentralized applications, where the contract and its clients are defined in one unit and pairs of send and receive actions that "belong together" are encapsulated into a single direct-style operation, which is executed differently by sending and receiving parties. This enables expressing distributed program flow via standard control flow and renders mismatching communication impossible. We prove formally that our compiler preserves program behavior in presence of an attacker controlling the client code. We systematically compare Prisma with mainstream and advanced programming models for dApps and provide empirical evidence for its expressiveness and performance.

READ FULL TEXT
research
07/14/2022

Multi: a Formal Playground for Multi-Smart Contract Interaction

Blockchains are maintained by a network of participants that run algorit...
research
09/30/2021

A formal model for ledger management systems based on contracts and temporal logic

A key component of blockchain technology is the ledger, viz., a database...
research
12/16/2020

Extracting Smart Contracts Tested and Verified in Coq

We implement extraction of Coq programs to functional languages based on...
research
09/26/2018

Towards Safer Smart Contracts: A Survey of Languages and Verification Methods

With a market capitalisation of over USD 205 billion in just under ten y...
research
04/30/2018

Temporal Aspects of Smart Contracts for Financial Derivatives

Implementing smart contracts to automate the performance of high-value o...
research
08/12/2020

Compiling a Higher-Order Smart Contract Language to LLVM

Scilla is a higher-order polymorphic typed intermediate level language f...
research
11/02/2022

Executable Models and Instance Tracking for Decentralized Applications – Towards an Architecture Based on Blockchains and Cloud Platforms

The execution of decentralized applications on blockchains is limited to...

Please sign up or login with your details

Forgot password? Click here to reset