ÐArcher: Detecting On-Chain-Off-Chain Synchronization Bugs in Decentralized Applications

06/17/2021
by   Wuqi Zhang, et al.
0

Since the emergence of Ethereum, blockchain-based decentralized applications (DApps) have become increasingly popular and important. To balance the security, performance, and costs, a DApp typically consists of two layers: an on-chain layer to execute transactions and store crucial data on the blockchain and an off-chain layer to interact with users. A DApp needs to synchronize its off-chain layer with the on-chain layer proactively. Otherwise, the inconsistent data in the off-chain layer could mislead users and cause undesirable consequences, e.g., loss of transaction fees. However, transactions sent to the blockchain are not guaranteed to be executed and could even be reversed after execution due to chain reorganization. Such non-determinism in the transaction execution is unique to blockchain. DApp developers may fail to perform the on-chain-off-chain synchronization accurately due to their lack of familiarity with the complex transaction lifecycle. In this work, we investigate the challenges of synchronizing on-chain and off-chain data in Ethereum-based DApps. We present two types of bugs that could result in inconsistencies between the on-chain and off-chain layers. To help detect such on-chain-off-chain synchronization bugs, we introduce a state transition model to guide the testing of DApps and propose two effective oracles to facilitate the automatic identification of bugs. We build the first testing framework, DArcher, to detect on-chain-off-chain synchronization bugs in DApps. We have evaluated DArcher on 11 popular real-world DApps. DArcher achieves high precision (99.3 significantly outperforms the baseline methods. It has found 15 real bugs in the 11 DApps. So far, six of the 15 bugs have been confirmed by the developers, and three have been fixed. These promising results demonstrate the usefulness of DArcher.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/21/2022

Using SGX for Meta-Transactions Support in Ethereum DApps

Decentralized applications (DApps) gained traction in the context of the...
research
05/06/2019

Charactering and Detecting CUDA Program Bugs

While CUDA has become a major parallel computing platform and programmin...
research
11/27/2018

Sapiens Chain: A Blockchain-based Cybersecurity Framework

Recently, cybersecurity becomes more and more important due to the rapid...
research
11/12/2020

Golden Grain: Building a Secure and Decentralized Model Marketplace for MLaaS

ML-as-a-service (MLaaS) becomes increasingly popular and revolutionizes ...
research
10/07/2022

Enabling Cost-Effective Blockchain Applications via Workload-Adaptive Transaction Execution

As transaction fees skyrocket today, blockchains become increasingly exp...
research
04/08/2022

Matrix Syncer – A Multi-chain Data Aggregator For Supporting Blockchain-based Metaverses

Due to the rising complexity of the metaverse's business logic and the l...
research
09/25/2019

Novel method for handling Ethereum attack

Block-chain world is very dynamic and there is need for strong governanc...

Please sign up or login with your details

Forgot password? Click here to reset