Lazy Contracts: Alleviating High Gas Costs by Secure and Trustless Off-chain Execution of Smart Contracts

09/20/2023
by   Soroush Farokhnia, et al.
0

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

READ FULL TEXT
research
10/23/2019

The Economics of Smart Contracts

Ethereum is a distributed blockchain that can execute smart contracts, w...
research
08/12/2020

GasMet: Profiling Gas Leaks in the Deployment of Solidity Smart Contracts

Nowadays, blockchain technologies are increasingly adopted for different...
research
12/18/2017

An Adaptive Gas Cost Mechanism for Ethereum to Defend Against Under-Priced DoS Attacks

The gas mechanism in Ethereum charges the execution of every operation t...
research
04/19/2021

Off-chain Execution and Verification of Computationally Intensive Smart Contracts

We propose a novel framework for off-chain execution and verification of...
research
11/11/2019

GRuB: Gas-Efficient Blockchain Storage via Workload-Adaptive Data Replication

Modern Blockchains support the execution of user programs, called smart ...
research
08/21/2021

Hop-by-hop Accounting and Rewards for Packet dIspAtching

Community networks are prone to free-riders, i.e., participants who take...
research
09/16/2019

Broken Metre: Attacking Resource Metering in EVM

Metering is an approach developed to assign cost to smart contract execu...

Please sign up or login with your details

Forgot password? Click here to reset