Verification assisted gas reduction for smart contracts
Smart contracts are computerized transaction protocols built on top of blockchain networks. Users are charged with fees, a.k.a. gas in Ethereum, when they create, deploy or execute smart contracts. Since smart contracts may contain vulnerabilities which may result in huge financial loss, developers...
Saved in:
Main Authors: | , , , , , |
---|---|
Format: | text |
Language: | English |
Published: |
Institutional Knowledge at Singapore Management University
2021
|
Subjects: | |
Online Access: | https://ink.library.smu.edu.sg/sis_research/6718 https://ink.library.smu.edu.sg/context/sis_research/article/7721/viewcontent/sOptimize.pdf |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
Institution: | Singapore Management University |
Language: | English |
id |
sg-smu-ink.sis_research-7721 |
---|---|
record_format |
dspace |
spelling |
sg-smu-ink.sis_research-77212022-01-27T11:14:31Z Verification assisted gas reduction for smart contracts GAO, Bo SHEN, Siyuan SHI, Ling LI, Jiaying SUN, Jun BU, Lei Smart contracts are computerized transaction protocols built on top of blockchain networks. Users are charged with fees, a.k.a. gas in Ethereum, when they create, deploy or execute smart contracts. Since smart contracts may contain vulnerabilities which may result in huge financial loss, developers and smart contract compilers often insert codes for security checks. The trouble is that those codes consume gas every time they are executed. Many of the inserted codes are however redundant. In this work, we present sOptimize, a tool that optimizes smart contract gas consumption automatically without compromising functionality or security. sOptimize works on smart contract bytecode, statically identifies 3 kinds of code patterns, and further removes them through verification-assisted techniques. The resulting code is guaranteed to be equivalent to the original one and can be directly deployed on blockchain. We evaluate sOptimize on a collection of 1,152 real-world smart contracts and show that it optimizes 43% of them, and the reduction on gas consumption is about 2.0% while in deployment and 1.2% in transactions, the amount can be as high as 954,201 gas units per contract. 2021-12-01T08:00:00Z text application/pdf https://ink.library.smu.edu.sg/sis_research/6718 https://ink.library.smu.edu.sg/context/sis_research/article/7721/viewcontent/sOptimize.pdf http://creativecommons.org/licenses/by-nc-nd/4.0/ Research Collection School Of Computing and Information Systems eng Institutional Knowledge at Singapore Management University smart contract optimization gas reduction Software Engineering |
institution |
Singapore Management University |
building |
SMU Libraries |
continent |
Asia |
country |
Singapore Singapore |
content_provider |
SMU Libraries |
collection |
InK@SMU |
language |
English |
topic |
smart contract optimization gas reduction Software Engineering |
spellingShingle |
smart contract optimization gas reduction Software Engineering GAO, Bo SHEN, Siyuan SHI, Ling LI, Jiaying SUN, Jun BU, Lei Verification assisted gas reduction for smart contracts |
description |
Smart contracts are computerized transaction protocols built on top of blockchain networks. Users are charged with fees, a.k.a. gas in Ethereum, when they create, deploy or execute smart contracts. Since smart contracts may contain vulnerabilities which may result in huge financial loss, developers and smart contract compilers often insert codes for security checks. The trouble is that those codes consume gas every time they are executed. Many of the inserted codes are however redundant. In this work, we present sOptimize, a tool that optimizes smart contract gas consumption automatically without compromising functionality or security. sOptimize works on smart contract bytecode, statically identifies 3 kinds of code patterns, and further removes them through verification-assisted techniques. The resulting code is guaranteed to be equivalent to the original one and can be directly deployed on blockchain. We evaluate sOptimize on a collection of 1,152 real-world smart contracts and show that it optimizes 43% of them, and the reduction on gas consumption is about 2.0% while in deployment and 1.2% in transactions, the amount can be as high as 954,201 gas units per contract. |
format |
text |
author |
GAO, Bo SHEN, Siyuan SHI, Ling LI, Jiaying SUN, Jun BU, Lei |
author_facet |
GAO, Bo SHEN, Siyuan SHI, Ling LI, Jiaying SUN, Jun BU, Lei |
author_sort |
GAO, Bo |
title |
Verification assisted gas reduction for smart contracts |
title_short |
Verification assisted gas reduction for smart contracts |
title_full |
Verification assisted gas reduction for smart contracts |
title_fullStr |
Verification assisted gas reduction for smart contracts |
title_full_unstemmed |
Verification assisted gas reduction for smart contracts |
title_sort |
verification assisted gas reduction for smart contracts |
publisher |
Institutional Knowledge at Singapore Management University |
publishDate |
2021 |
url |
https://ink.library.smu.edu.sg/sis_research/6718 https://ink.library.smu.edu.sg/context/sis_research/article/7721/viewcontent/sOptimize.pdf |
_version_ |
1770576053403648000 |