Pattern matching algorithms in Blockchain for network fees reduction

07/29/2022
by   Robert Susik, et al.
0

Blockchain received a vast amount of attention in recent years and is still growing. The second generation of blockchain, such as Ethereum, allows execution of almost any program in Ethereum Virtual Machine (EVM), making it a global protocol for distributed applications. The code deployment and each operation performed in EVM cost the network fee called gas, which price varies and can be significant. That is why code optimization and well-chosen algorithms are crucial in programming on the blockchain. This paper evaluates the gas usage of several exact pattern matching algorithms on the Ethereum Virtual Machine. We also propose an efficient implementation of the algorithms in the Solidity/YUL language. We evaluate the gas fees of all the algorithms for different parameters (such as pattern length, alphabet size, and text size). We show a significant gas fee and execution time reduction with up to 22-fold lower gas usage and 55-fold speed-up comparing to StringUtils (a popular Solidity string library).

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/23/2019

The Economics of Smart Contracts

Ethereum is a distributed blockchain that can execute smart contracts, w...
research
11/22/2018

GASTAP: A Gas Analyzer for Smart Contracts

Gas is a measurement unit of the computational effort that it will take ...
research
02/06/2020

BatPay: a gas efficient protocol for the recurrent micropayment of ERC20 tokens

BatPay is a proxy scaling solution for the transfer of ERC20 tokens. It ...
research
09/16/2019

Broken Metre: Attacking Resource Metering in EVM

Metering is an approach developed to assign cost to smart contract execu...
research
03/07/2023

MEV in fixed gas price blockchains: Terra Classic as a case of study

Maximum extractable value (MEV) has been extensively studied. In most pa...
research
05/10/2018

EthIR: A Framework for High-Level Analysis of Ethereum Bytecode

Analyzing Ethereum bytecode, rather than the source code from which it w...
research
05/07/2021

Stochastic Properties of EIP-1559 Basefees

EIP-1559 is a new proposed pricing mechanism for the Ethereum protocol d...

Please sign up or login with your details

Forgot password? Click here to reset