<div class="csl-bib-body">
<div class="csl-entry">Brandstätter, T. (2020). <i>Optimization of solidity smart contracts</i> [Diploma Thesis, Technische Universität Wien]. reposiTUm. https://doi.org/10.34726/hss.2020.66465</div>
</div>
-
dc.identifier.uri
https://doi.org/10.34726/hss.2020.66465
-
dc.identifier.uri
http://hdl.handle.net/20.500.12708/1428
-
dc.description.abstract
Smart contracts are computer programs that are deployed on the blockchain and can then be executed. Fees in form of gas have to be paid for deploying a smart contract on the blockchain, depending on the size of the byte code. Additional fees have to be paid, whenever a function of a smart contract is executed, depending on the needed computational steps and required storage space. On the Ethereum blockchain, millions of USD are paid in form of gas fees every single day. Since gas cost can increase if a contract is not well-implemented, there is a lot of incentive to reduce these gas cost in order to save money. We identified 19 optimization strategies from the field of software engineering, which can be applied to Solidity smart contracts in order to reduce the required gas cost. To show how these rules can be used to optimize smart contracts, we developed a prototype. The prototype detects rule violations from 9 of these rules and in addition automatically optimizes 6 of them. The prototype analyzed 3,018 verified open source smart contracts from etherscan.io. We found 471 rule violations in our test data set spread across 204 different contract files. That means, roundabout 6.8% of the data set violated at least one of the rules. We deployed the automatically optimized contracts in a test environment before and after the optimization, to compare the gas usage. We were on average able to save 1,213 gas for deploying an optimized contract version compared to the initial one. For calling an optimized function once, we were able to save on average 123 gas, compared to the initial function call.
en
dc.language
English
-
dc.language.iso
en
-
dc.rights.uri
http://rightsstatements.org/vocab/InC/1.0/
-
dc.subject
Blockchain
de
dc.subject
Solidity
de
dc.subject
Ethereum
de
dc.subject
Smart Contract
de
dc.subject
Optimierung
de
dc.subject
Blockchain
en
dc.subject
Solidity
en
dc.subject
Ethereum
en
dc.subject
Smart Contract
en
dc.subject
Optimization
en
dc.title
Optimization of solidity smart contracts
en
dc.type
Thesis
en
dc.type
Hochschulschrift
de
dc.rights.license
In Copyright
en
dc.rights.license
Urheberrechtsschutz
de
dc.identifier.doi
10.34726/hss.2020.66465
-
dc.contributor.affiliation
TU Wien, Österreich
-
dc.rights.holder
Tamara Brandstätter
-
dc.publisher.place
Wien
-
tuw.version
vor
-
tuw.thesisinformation
Technische Universität Wien
-
tuw.publication.orgunit
E194 - Institut für Information Systems Engineering