A gas-efficient superlight Bitcoin client in solidity

Stelios Daveas, Kostis Karantias, Aggelos Kiayias, Dionysis Zindros

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

Superlight clients enable the verification of proof-of-work-based blockchains by checking only a small representative number of block headers instead of all the block headers as done in simplified payment verification (SPV). Such clients can be embedded within other blockchains by implementing them as smart contracts, allowing for cross-chain verification. One such interesting instance is the consumption of Bitcoin data within Ethereum by implementing a Bitcoin superlight client in Solidity. While such theoretical constructions have demonstrated security and efficiency in theory, no practical implementation exists. In this work, we put forth the first practical Solidity implementation of a superlight client which implements the NIPoPoW superblocks protocol. Contrary to previous work, our Solidity smart contract achieves sufficient gas-efficiency to allow a proof and counter-proof to fit within the gas limit of a block, making it practical. We provide extensive experimental measurements for gas consumption. The optimizations that enable gas-efficiency heavily leverage a novel technique which we term hash-and-resubmit, which almost completely eliminates persistent storage requirements, the most expensive operation of smart contracts in terms of gas. Instead, the contract asks contesters to resubmit data and checks their veracity by hashing it. Other optimizations include off-chain manipulation of proofs in order to remove expensive look-up structures, and the usage of an optimistic schema. We show that such techniques can be used to bring down gas costs significantly and may be of independent interest. Lastly, our implementation allows us to calculate concrete cryptoeconomic parameters for the superblocks NIPoPoWs protocol and in particular to make recommendations about the monetary value of the collateral parameters. We provide such parameter recommendations over a variety of liveness settings.
Original languageEnglish
Title of host publicationProceedings of the 2nd ACM Conference on Advances in Financial Technologies
PublisherACM
Pages132-144
Number of pages13
ISBN (Electronic)9781450381390
DOIs
Publication statusPublished - 26 Oct 2020
Event2nd ACM Conference on Advances in Financial Technologies - Virtual, Online
Duration: 21 Oct 202023 Oct 2020

Conference

Conference2nd ACM Conference on Advances in Financial Technologies
Abbreviated titleAFT 2020
CityVirtual, Online
Period21/10/2023/10/20

Keywords / Materials (for Non-textual outputs)

  • blockchain
  • design patterns
  • NIPoPoWs
  • solidity
  • superlight clients

Fingerprint

Dive into the research topics of 'A gas-efficient superlight Bitcoin client in solidity'. Together they form a unique fingerprint.

Cite this