Selin Sezer, Clemens Eyhoff, Wolfgang Prinz, Thomas Rose
Due to the increase in smart contracts in Ethereum, a need for proper classification has emerged. Although the smart contracts are accessible due to the open nature of the Blockchain, readability is still an issue with respect to the smart contract bytecode. We propose an automated approach for classifying smart contracts that utilize popular text classification methods on the opcode translation of the smart contract bytecode in order to overcome this limitation. Our experiments indicate that the decision-tree-based techniques like Random Forest and Xgboost outmatch the traditional classification tools like Naïve Bayes, Logistic Regression, and SVM once the opcode input is presented as n-gram tf-idf vectors.
Ethereum smart contracts are distributed programs running on top of the Ethereum blockchain. Since program flaws can cause significant monetary losses and can hardly be fixed due to the immutable nature of the blockchain, there is a strong need of automated analysis tools which provide formal security guarantees. Designing such analyzers, however, proved to be challenging and error-prone. We review the existing approaches to automated, sound, static analysis of Ethereum smart contracts and highlight prevalent issues in the state of the art. Finally, we overview eThor, a recent static analysis tool that we developed following a principled design and implementation approach based on rigorous semantic foundations to overcome the problems of past works.
We implement two versions of a simple but illustrative smart contract: one in Solidity on the Ethereum blockchain platform, and one in Plutus on the Cardano platform, with annotated code excerpts and with source code attached. We get a clearer view of the Cardano programming model in particular by introducing a novel mathematical abstraction which we call Idealised EUTxO. For each version of the contract, we trace how the architectures of the underlying platforms and their mathematics affects the natural programming styles and natural classes of errors. We prove some simple but novel results about alpha-conversion and observational equivalence for Cardano, and explain why Ethereum does not have them. We conclude with a wide-ranging and detailed discussion in the light of the examples, mathematical model, and mathematical results so far.
Elvira Albert, Pablo Gordillo, Albert Rubio, Maria A. Schett
With the advent of smart contracts that execute on the blockchain ecosystem, a new mode of reasoning is required for developers that must pay meticulous attention to the gas spent by their smart contracts, as well as for optimization tools that must be capable of effectively reducing the gas required by the smart contracts. Super-optimization is a technique which attempts to find the best translation of a block of code by trying all possible sequences of instructions that produce the same result. This paper presents a novel approach for super-optimization of smart contracts based on Max-SMT which is split into two main phases: (i) the extraction of a stack functional specification from the basic blocks of the smart contract, which is simplified using rules that capture the semantics of the arithmetic, bit-wise, relational operations, etc. (ii) the synthesis of optimized blocks which, by means of an efficient Max-SMT encoding, finds the bytecode blocks with minimal gas cost whose stack functional specification is equal (modulo commutativity) to the extracted one. Our experimental results are very promising: we are able to optimize 55.41 % of the blocks, and prove that 34.28 % were already optimal, for more than 61000 blocks from the most called 2500 Ethereum contracts.
More than eight million smart contracts have been deployed into Ethereum, which is the most popular blockchain that supports smart contract. However, less than 1% of deployed smart contracts are open-source, and it is difficult for users to understand the functionality and internal mechanism of those closed-source contracts. Although a few decompilers for smart contracts have been recently proposed, it is still not easy for users to grasp the semantic information of the contract, not to mention the potential misleading due to decompilation errors. In this paper, we propose the first system named STAN to generate descriptions for the bytecodes of smart contracts to help users comprehend them. In particular, for each interface in a smart contract, STAN can generate four categories of descriptions, including functionality description, usage description, behavior description, and payment description, by leveraging symbolic execution and NLP (Natural Language Processing) techniques. Extensive experiments show that STAN can generate adequate, accurate, and readable descriptions for contract's bytecodes, which have practical value for users.
One of the most important innovations brought by digitalization is crypto money known as virtual money. Cryptocurrencies, which have been discussed in recent years and especially a new portfolio for investors, are very popular. Bitcoin is the most well-known of these cryptographic systems, which do not depend on a central authority and have maximum reliability. The effects of various financial indicators on cryptoparas were examined in this study. The model includes a daily database in between April 3, 2018 to December 31, 2019. Initially stationarity is tested with unit root tests. Then cointegration and causality tests are employed. Impulse response is also implemented and analysed.
Distributed ledger technology (DLT) stands to benefit industries such as financial services with transparency and censorship resistance. DLT systems need to be scalable to handle mass user adoption. Mass user adoption is required to demonstrate the true value of DLT. This dissertation first analyses scalability in ethereum and EOS. Currently, ethereum 1.0 uses proof of work (PoW) and handles only 14 transactions per second (tps) compared to Visa's peak 47 000 tps. Ethereum 2.0, known as Serenity, introduces sharding, proof of stake (Casper), plasma and state channels in and effort to scale the system. EOS uses a delegated proof of stake (DPoS) protocol, where 21 super-nodes, termed ‘block producers' (BPs), facilitate consensus, bringing about significant scalability improvements (4000 tps). The trade-off is decentralisation. EOS is not sufficiently decentralised because the BPs yield significant power, but are not diverse. This dissertation conducts an empirical analysis using unsupervised machine learning to show that there is a high probability collusion is occurring between certain BPs. It then suggests possible protocol alterations such as inverse vote weighting that could curb adverse voting behaviour in DPoS. It further analyses whether universities are suitable BP's before mapping out required steps for universities to become block producers (leading to improved decentralisation in EOS)
Mohammad Madine, Ammar Battah, Ibrar Yaqoob, Khaled Salah · 8 authors
Personal health records (PHRs) are valuable assets to individuals because they enable them to integrate and manage their medical data. A PHR is an electronic application through which patients can manage their health information. Giving patients control over their medical data offers an advantageous realignment of the doctor-patient dynamic. However, today's PHR management systems fall short of giving reliable, traceable, trustful, and secure patients control over their medical data, which poses serious threats to their authenticity and accuracy. Moreover, most of the current approaches and systems leveraged for managing PHR are centralized that not only make medical data sharing difficult but also poses a risk of single point of failure problem. In this paper, we propose Ethereum blockchain-based smart contracts to give patients control over their data in a manner that is decentralized, immutable, transparent, traceable, trustful, and secure. The proposed system employs decentralized storage of interplanetary file systems (IPFS), proxy re-encryption, and trusted reputation-based oracles to securely fetch, store, and share patients' medical data. We present algorithms along with their full implementation details. We evaluate the proposed smart contracts using two important performance metrics, such as cost and correctness. Furthermore, we provide security analysis and discuss the generalization aspects of our solution. We outline the limitations of the proposed approach. We make the smart contract source code publicly available on Github.
Mazin Debe, Khaled Salah, Muhammad Habib ur Rehman, Davor Svetinović
Public fog nodes can be deployed in public places closer to the edge where many personal and commercial devices (e.g., a sensor, an application, or a device) can connect to. These public fog nodes can provide real-time and localized services for networking, computing, storage and content delivery to the connected devices. The monetization and payment of such services is typically manual, centralized, and lacks the necessary trust. The providers of the public fog nodes typically offer fixed pricing models for their services, and the customers manually select and pay for the used services, with little or no transparency and trust in the provided service in terms of the used time, network bandwidth, and quality of service (QoS). This paper presents a novel scheme to enable blockchain-based monetization and automated payment in cryptocurrency for services provided by public fog nodes. The proposed scheme is decentralized, trustworthy, automated, and with certain guarantees for QoS, customer satisfaction, and dispute resolutions through a reputation system. The proposed solution uses the Ethereum blockchain and its native smart contract features to govern the interactions between devices and fog nodes. The proposed solution is implemented, tested and evaluated to show correct behavior and functionality. We also provide cost and security analysis and show that our solution is resilient against major security attacks. Our smart contract is made publicly available on Github1.
Mauro C. Argañaraz, Mario Berón, Maria João Varanda Pereira, Pedro Rangel Henriques
Ethereum is the principal ecosystem based on blockchain that provides a suitable environment for coding and executing smart contracts, which have been receiving great attention due to the commercial apps and among the scientific community. The process of writing secure and well performing contracts in the Ethereum platform is a major challenge for developers. It consists of the application of non-conventional programming paradigms due to the inherent characteristics of the execution of distributed computing programs. Furthermore, the errors in the deployed contracts could have serious consequences because of the immediate linkage between the contract code and the financial transactions. The direct handling of the assets means that the errors can be more relevant for security and have greater economic consequences than a mistake in the conventional apps. In this paper, we propose a tool for the detection of vulnerabilities in high-level languages based on automatized static analysis.
With advancement in computer technology, financial technology has also evolved. Blockchain technology has evolved over the past decade; however, this has also resulted in some malicious attacks. To earn mining rewards of a blockchain, a new type of attack, called cryptojacking, has emerged in the online world. This attack uses the computer resources of a victim to obtain mining rewards without user confirmation. However, this monetization model was originally intended to replace advertising as a source of revenue for a website. To resolve such problems, a storage verification architecture based on smart contracts was proposed in the study. The decentralized system of blockchain enables users to identify and participate in verification of mining sites through Ethereum smart contracts.
Open access
Blockchain Technology Applications and Security
Advanced Steganography and Watermarking Techniques
Being the most popular permissionless blockchain that supports smart contracts, Ethereum allows any user to create accounts on it. However, not all accounts matter. For example, the accounts due to attacks can be removed. In this paper, we conduct the first investigation on erasable accounts that can be removed to save system resources and even users' money (i.e., ETH or gas). In particular, we propose and develop a novel tool named GLASER, which analyzes the State DataBase of Ethereum to discover five kinds of erasable accounts. The experimental results show that GLASER can accurately reveal 508,482 erasable accounts and these accounts lead to users wasting more than 106 million dollars. GLASER can help stop further economic loss caused by these detected accounts. Moreover, GLASER characterizes the attacks/behaviors related to detected erasable accounts through graph analysis.
Blockchain technology has been an essential aspect for research due to its, peer to peer nature, distributed nature, and decentralization, some of its applications are Supply chain, Healthcare System, Real state, etc. Ethereum is a distributed public blockchain network that focuses on running the code of any decentralized application. A smart contract is a computer program having self-verifying, self-executing, tamper-resistant properties. Initial Coin Offering (ICO) is a process similar to crowdfunding, in which companies raise funds from investors, who, in exchange receive tokens or digital assets. This paper deals by explaining the proposed model, different functions of ERC20 standard, the different tasks performed by each function and implementing various functionalities of ERC20 Token in Solidity.
In this article we forecast daily closing price series of Bitcoin, Litecoin and Ethereum cryptocurrencies, using data on prices and volumes of prior days. Cryptocurrencies price behaviour is still largely unexplored, presenting new opportunities for researchers and economists to highlight similarities and differences with standard financial prices. We compared our results with various benchmarks: one recent work on Bitcoin prices forecasting that follows different approaches, a well-known paper that uses Intel, National Bank shares and Microsoft daily NASDAQ closing prices spanning a 3-year interval and another, more recent paper which gives quantitative results on stock market index predictions. We followed different approaches in parallel, implementing both statistical techniques and machine learning algorithms: the Simple Linear Regression (SLR) model for uni-variate series forecast using only closing prices, and the Multiple Linear Regression (MLR) model for multivariate series using both price and volume data. We used two artificial neural networks as well: Multilayer Perceptron (MLP) and Long short-term memory (LSTM). While the entire time series resulted to be indistinguishable from a random walk, the partitioning of datasets into shorter sequences, representing different price "regimes", allows to obtain precise forecast as evaluated in terms of Mean Absolute Percentage Error(MAPE) and relative Root Mean Square Error (relativeRMSE). In this case the best results are obtained using more than one previous price, thus confirming the existence of time regimes different from random walks. Our models perform well also in terms of time complexity, and provide overall results better than those obtained in the benchmark studies, improving the state-of-the-art.
Blockchain technology is found to have its applicability in almost every domain because of its advantages such as crypto-security, transparency, immutability, decentralized data network. In present times, a smart healthcare system with a blockchain data network and healthcare 4.0 processes provides transparency, easy and faster accessibility, security, efficiency, etc. Healthcare 4.0 trends include industry 4.0 processes such as the internet of things (IoT), industrial IoT (IIoT), cognitive computing, artificial intelligence, cloud computing, fog computing, edge computing, etc. The goal of this work is to design a smart healthcare system and it is found to be possible through integration and interoperability of Blockchain 3.0 and Healthcare 4.0 in consideration with healthcare ground-realities. Here, healthcare 4.0 processes used for data accessibility are targeted to be validated through statistical simulation-optimization methods and algorithms. The blockchain is implemented in the Ethereum network, and with associated programming languages, tools, and techniques such as solidity, web3.js, Athena, etc. Further, this work prepares a comparative and comprehensive survey of state-of-the-art blockchain-based smart healthcare systems. The comprehensive survey includes methodology, applications, requirements, outcomes, future directions, etc. A list of groups, organizations, and enterprises are prepared that are working in electronic health records (EHR), electronic medical records (EMR) or electronic personal records (EPR) mainly, and a comparative analysis is drawn concerning adopting the blockchain technology in their processes. This work has explored optimization algorithms applicable to Healthcare 4.0 trends and improves the performance of blockchain-based decentralized applications for the smart healthcare system. Further, smart contracts and their designs are prepared for the proposed system to expedite the trust-building and payment systems. This work has considered simulation and implementation to validate the proposed approach. Simulation results show that the Gas value required (indicating block size and expenditure) lies within current Etherum network Gas limits. The proposed system is active because block utilization lies above 80%. Automated smart contract execution is below 20 seconds. A good number (average 3 per simulation time) is generated in the network that indicates a health competition. Although there is error observed in simulation and implementation that lies between 0.55% and 4.24%, these errors are not affecting overall system performance because simulated and actual (taken in state-of-the-art) data variations are negligible.
Bin Yu, Ping Zhan, Ming Lei, Fang Zhou · 5 authors
Currently, food quality has become a major concern for the food industry. To efficiently detect food quality problems during the production process, food enterprises must build quality monitoring systems. However, in a traditional quality monitoring system, data tampering and centralized storage have become barriers to reliability. In addition, due to lack of sufficient automation, traditional quality monitoring approaches are usually inefficient. Fortunately, blockchain is a promising technology that is tamper-proof and decentralized. Moreover, smart contracts, which are executable codes on the blockchain platform, are able to conduct transactions between mutually untrusted parties and are self-executing and self-verifying. By combining smart contracts and quality evaluation models, this paper presents an intelligent quality monitoring system for fruit juice production. This system has the characteristics of high automation and high reliability. In this system, response surface models are established based on preproduction data, and the optimal production condition for each stage is identified. During the actual production process, smart contracts are executed to record production data on a blockchain. These data serve as the inputs for evaluation models. Based on the evaluation outcome, smart contracts will decide whether the production process can be resumed or not. To evaluate the feasibility of the presented system, a prototype version of the quality monitoring system for flat peach juice production is implemented based on the Ethereum platform and executed in the Remix IDE.
Ilhaam A. Omar, Raja Jayaraman, Khaled Salah, Mazin Debe · 5 authors
Supply chain networks have grown in complexity and size due to increased globalization leading to a variety of challenges and opportunities for improvement. Optimizing inventory levels and adjusting replenishment policies have significant effects on the operational performance and profitability of supply chains. Vendor Managed Inventory (VMI) is a mutually beneficial arrangement between supplier and buyer, where the supplier is responsible for making inventory and replenishment decisions based on buyers' inventory status. Potential benefits of VMI include reducing inventories, enabling information sharing, eliminating safety stock, and reducing purchasing related costs across the supply chain. In today's supply chains, VMI operations face critical challenges related to data integrity, transparency, traceability, and single point of failure due to its centralized architecture. Blockchain technology is a distributed ledger that ensures a transparent, safe, and secure exchange of data among supply chain stakeholders. The advantages of adopting blockchain technology for VMI operations in a supply chain include decentralized control, security, traceability, and auditable time-stamped transactions. In this paper, we present a blockchain-based approach using smart contracts to transform VMI supply chain operations. We propose a generic framework using Ethereum smart contracts and decentralized storage systems to automate the processes and information exchange and detailed algorithms that capture the interactions among supply chain stakeholders. The smart contract code was developed and tested in Remix environment. We present cost and security analysis incurred by the stakeholders in the supply chain. Adopting a blockchain-based solution to VMI operations in supply chains is economically viable and provides a streamlined, secure, trusted, and transparent mode of communication among various stakeholders.
Serkan Seven, Gang Yao, Ahmet Soran, Ahmet Önen · 5 authors
A novel Peer-to-peer (P2P) energy trading scheme for a Virtual Power Plant (VPP) is proposed by using Smart Contracts on Ethereum Blockchain Platform. The P2P energy trading is the recent trend the power society is keen to adopt carrying out several trial projects as it eases to generate and share the renewable energy sources in a distributed manner inside local community. Blockchain and smart contracts are the up-and-coming phenomena in the scene of the information technology used to be considered as the cutting-edge research topics in power systems. Earlier works on P2P energy trading including and excluding blockchain technology were focused mainly on the optimization algorithm, Information and Communication Technology, and Internet of Things. Therefore, the financial aspects of P2P trading in a VPP framework is focused and in that regard a P2P energy trading mechanism and bidding platform are developed. The proposed scheme is based on public blockchain network and auction is operated by smart contract addressing both cost and security concerns. The smart contract implementation and execution in a VPP framework including bidding, withdrawal, and control modules developments are the salient feature of this work. The proposed architecture is validated using realistic data with the Ethereum Virtual Machine (EVM) environment of Ropsten Test Network.
Guglielmo Maria Caporale, Woo-Young Kang, Fabio Spagnolo, Nicola Spagnolo
This paper examines mean and volatility spillovers between three major cryptocurrencies (Bitcoin, Litecoin and Ethereum) and the role played by cyber-attacks. Specifically, trivariate GARCH-BEKK models are estimated which include suitably defined dummies corresponding to different types, targets and number per day of cyber-attacks. Significant dynamic linkages (interdependence) between the three cryptocurrencies under investigation are found in most cases when cyber-attacks are taken into account, Bitcoin appearing to be the dominant cryptocurrency. Further, Wald tests for parameter shifts during episodes of turbulence resulting from cyber-attacks provide evidence that the latter affect the transmission mechanism between cryptocurrency returns and volatilities (contagion). More precisely, cyber-attacks appear to strengthen cross-market linkages, thereby reducing portfolio diversification opportunities for cryptocurrency investors. Finally, the conditional correlation analysis confirms the previous findings.