Lazy Contracts: Alleviating High Gas Costs by Secure and Trustless Off-chain Execution of Smart Contracts
- URL: http://arxiv.org/abs/2309.11317v1
- Date: Wed, 20 Sep 2023 13:41:45 GMT
- Title: Lazy Contracts: Alleviating High Gas Costs by Secure and Trustless Off-chain Execution of Smart Contracts
- Authors: Soroush Farokhnia,
- Abstract summary: In most programmable blockchains, the notion of gas is introduced to prevent DoS attacks.
A fixed cost to each atomic operation, and the initiator of a function call pays the total gas cost as a transaction fee.
This thesis proposes "lazy contracts" as a solution to alleviate these costs.
- Score: 0.0
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Smart contracts are programs that are executed on the blockchain and can hold, manage and transfer assets in the form of cryptocurrencies. The contract's execution is then performed on-chain and is subject to consensus, i.e. every node on the blockchain network has to run the function calls and keep track of their side-effects. In most programmable blockchains, such as Ethereum, the notion of gas is introduced to prevent DoS attacks by malicious parties who might try to slow down the network by performing heavy computations. A fixed cost to each atomic operation, and the initiator of a function call pays the total gas cost as a transaction fee. This helps prevent DoS attacks, but the resulting fees are extremely high. For example, in 2022, on Ethereum alone, there has been a total gas usage of 1.77 Million ETH ~ 4.3 Billion USD. This thesis proposes "lazy contracts" as a solution to alleviate these costs. Our solution moves most of the computation off-chain, ensuring that each function call incurs only a tiny amount of gas usage, while preserving enough data on-chain to guarantee an implicit consensus about the state of the contract variables and ownership of funds. A complete on-chain execution of the functions will only be triggered in case two parties to the contract are in disagreement about the current state, which in turn can only happen if at least one party is dishonest. In such cases, our protocol can identify the dishonest party and penalize them by having them pay for the entire gas usage. Hence, no rational party has an incentive to act dishonestly. Finally, we perform extensive experiments over 160,735 real-world Solidity contracts that were involved in 9,055,492 transactions in January 2022--January 2023 on Ethereum and show that our approach reduces the overall gas usage by 55.4%, which amounts to an astounding saving of 109.9 Million USD in gas fees.
Related papers
- How To Save Fees in Bitcoin Smart Contracts: a Simple Optimistic Off-chain Protocol [0.40964539027092906]
We consider the execution of smart contracts on Bitcoin.
We introduce a protocol that moves most of the execution of a Bitcoin contract off-chain.
arXiv Detail & Related papers (2024-03-14T21:20:36Z) - Secure compilation of rich smart contracts on poor UTXO blockchains [0.8192907805418581]
We present ILLUM, an Intermediate-Level Language for the UTXO Model.
We define a compiler from ILLUM to a bare-bone UTXO blockchain with loop-free scripts.
We exploit covenants, a mechanism for preserving scripts along chains of transactions.
arXiv Detail & Related papers (2023-05-16T15:40:18Z) - Blockchain Large Language Models [65.7726590159576]
This paper presents a dynamic, real-time approach to detecting anomalous blockchain transactions.
The proposed tool, BlockGPT, generates tracing representations of blockchain activity and trains from scratch a large language model to act as a real-time Intrusion Detection System.
arXiv Detail & Related papers (2023-04-25T11:56:18Z) - TxAllo: Dynamic Transaction Allocation in Sharded Blockchain Systems [37.22526235663589]
This paper focuses on the transaction allocation problem to reduce the number of cross-shard transactions.
A deterministic and fast allocation scheme TxAllo is proposed to dynamically infer the allocation of accounts.
For a blockchain with 60 shards, TxAllo reduces the cross-shard transaction ratio from 98% to about 12%.
arXiv Detail & Related papers (2022-12-22T10:22:31Z) - Refined Bitcoin Security-Latency Under Network Delay [35.16231062731263]
We study how secure a block is after it becomes $k$-deep in the chain.
We analyze the race between adversarial and honest chains in three different phases.
We find the probability distribution of the growth of the adversarial chains under models similar to those in [Guo, Ren; AFT 2022] when a target block becomes $k$-deep in the chain.
arXiv Detail & Related papers (2022-12-02T18:54:30Z) - Token Spammers, Rug Pulls, and SniperBots: An Analysis of the Ecosystem of Tokens in Ethereum and in the Binance Smart Chain (BNB) [50.888293380932616]
We study the ecosystem of the tokens and liquidity pools.
We find that about 60% of tokens are active for less than one day.
We estimate that 1-day rug pulls generated $240 million in profits.
arXiv Detail & Related papers (2022-06-16T14:20:19Z) - Light Clients for Lazy Blockchains [12.330989180881701]
We devise a protocol that enables the creation of efficient light clients for lazy blockchains.
Our construction is based on a bisection game that traverses the Merkle tree containing the ledger of all - valid or invalid - transactions.
arXiv Detail & Related papers (2022-03-30T00:58:40Z) - Quantum-resistance in blockchain networks [46.63333997460008]
This paper describes the work carried out by the Inter-American Development Bank, the IDB Lab, LACChain, Quantum Computing (CQC), and Tecnologico de Monterrey to identify and eliminate quantum threats in blockchain networks.
The advent of quantum computing threatens internet protocols and blockchain networks because they utilize non-quantum resistant cryptographic algorithms.
arXiv Detail & Related papers (2021-06-11T23:39:25Z) - Quantum Multi-Solution Bernoulli Search with Applications to Bitcoin's
Post-Quantum Security [67.06003361150228]
A proof of work (PoW) is an important cryptographic construct enabling a party to convince others that they invested some effort in solving a computational task.
In this work, we examine the hardness of finding such chain of PoWs against quantum strategies.
We prove that the chain of PoWs problem reduces to a problem we call multi-solution Bernoulli search, for which we establish its quantum query complexity.
arXiv Detail & Related papers (2020-12-30T18:03:56Z) - Profiling Gas Consumption in Solidity Smart Contracts [3.0378875015087567]
We propose GasMet, a suite of metrics for statically evaluating the code quality of a smart contract from the gas consumption perspective.
An experiment involving 2,186 smart contracts demonstrates that the proposed metrics have direct associations with deployment costs.
arXiv Detail & Related papers (2020-08-12T17:26:55Z) - BatPay: a gas efficient protocol for the recurrent micropayment of ERC20
tokens [0.35132824436572674]
BatPay is a proxy scaling solution for the transfer of ERC20 tokens.
It is suitable for micropayments in one-to-many and few-to-many scenarios.
arXiv Detail & Related papers (2020-02-06T15:43:52Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.