Weiqin Zou, David Lo, Pavneet Singh Kochhar, Xuan-Bach Dinh Le · 8 authors
Smart contract, a term which was originally coined to refer to the automation of legal contracts in general, has recently seen much interest due to the advent of blockchain technology. Recently, the term is popularly used to refer to low-level code scripts running on a blockchain platform. Our study focuses exclusively on this subset of smart contracts. Such smart contracts have increasingly been gaining ground, finding numerous important applications (e.g., crowdfunding) in the real world. Despite the increasing popularity, smart contract development still remains somewhat a mystery to many developers largely due to its special design and applications. Are there any differences between smart contract development and traditional software development? What kind of challenges are faced by developers during smart contract development? Questions like these are important but have not been explored by researchers yet. In this paper, we performed an exploratory study to understand the current state and potential challenges developers are facing in developing smart contracts on blockchains, with a focus on Ethereum (the most popular public blockchain platform for smart contracts). Toward this end, we conducted this study in two phases. In the first phase, we conducted semi-structured interviews with 20 developers from GitHub and industry professionals who are working on smart contracts. In the second phase, we performed a survey on 232 practitioners to validate the findings from the interviews. Our interview and survey results revealed several major challenges developers are facing during smart contract development: (1) there is no effective way to guarantee the security of smart contract code; (2) existing tools for development are still very basic; (3) the programming languages and the virtual machines still have a number of limitations; (4) performance problems are hard to handle under resource constrained running environment; and (5) online resources (including advanced/updated documents and community support) are still limited. Our study suggests several directions that researchers and practitioners can work on to help improve developers’ experience on developing high-quality smart contracts.
A blockchain and smart contract enabled security mechanism for IoT applications has been reported recently for urban, financial, and network services. However, due to the power-intensive and a low-throughput consensus mechanism in existing blockchain, like Bitcoin and Ethereum, there are still challenges in integrating blockchain technology into resource-constrained IoT platforms. In this paper, Microchain, based on a hybrid Proof-of-Credit (PoC)-Voting-based Chain Finality (VCF) consensus protocol, is proposed to provide a secure, scalable and lightweight distributed ledger for IoT systems. By using a bias-resistant randomness protocol and a cryptographic sortition algorithm, a random subset of nodes are selected as a final committee to perform the consensus protocol. The hybrid consensus mechanism relies on PoC, a pure Proof of stake (PoS) protocol, to determine whether or not a participant is qualified to propose a block, given a fair initial distribution of the credit assignment. The voting-based chain finality protocol is responsible for finalizing a history of blocks by resolving conflicting checkpoint and selecting a unique chain. A proof-of-conception prototype is implemented and tested on a physical network environment. The experimental results verify that the Micorchain is able to offer a partially decentralized, scalable and lightweight distributed ledger protocol for IoT applications.
Public software repositories such as GitHub make transparent the development history of an open source software system. Source code commits, discussions about new features and bugs, and code reviews are stored and carefully attributed to the appropriate developers. However, sometimes governments may seek to analyze these repositories, to identify citizens who contribute to projects they disapprove of, such as those involving cryptography or social media. While developers who seek anonymity may contribute under assumed identities, their body of public work may be characteristic enough to betray who they really are. The ability to contribute anonymously to public bodies of knowledge is extremely important to the future of technological and intellectual freedoms. Just as in security hacking, the only way to protect vulnerable individuals is by demonstrating the means and strength of available attacks so that those concerned may know of the need and develop the means to protect themselves. \n \nIn this work, we present a method to de-anonymize source code contributors based on the authors' intrinsic programming style. First, we present a partial replication study wherein we attempt to de-anonymize a large number of entries into the Google Code Jam competition. We base our approach on Caliskan-Islam et al. 2015, but with modifications to the feature set and modelling strategy for scalability and feature-selection robustness. We did not achieve 0.98 F1 achieved in this prior work, but managed a still reasonable 0.71 F1 under identical experimental conditions, and a 0.88 F1 given more data from the same set. \n \nSecond, we present an exploratory study focused on de-anonymizing programmers who have contributed to a repository, using other commits from the same repository as training data. We train random-forest classifiers using programmer data collected from 37 medium to large open-source repositories. Given a choice between active developers in a project, we were able to correctly determine authorship of a given function about 75% of the time, without the use of identifying meta-data or comments. We were also able to correctly validate a contributor as the author of a questioned function with 80\\% recall and 65\\% precision. This exploratory study provides empirical support for our approach. \n \nFinally, we present the results of a similar, but more difficult study wherein we attempt de-anonymize a repository in the same manner, but without using the target repository as training data. To do this, we gather as much training data as possible from the repository's contributors through the Github API. We evaluate our technique over 3 repositories: Bitcoin, Ethereum (crypto-currencies) and TrinityCore (a game engine). Our results in this experiment starkly contrast our results in the intra-repository study showing accuracies of 35% for Bitcoin, 22% for Ethereum, and 21% for TrinityCore which had candidate set sizes of 6, 5, and 7 respectively. \n \nOur results indicate that we can do somewhat better than random guessing, even under difficult experimental conditions, but they also indicate some fundamental issues with the state of the art of Code Stylometry. In this work we present our methodology, results, and some comments on past empirical studies, the difficulties we faced, and likely hurdles for future work in the area.
Evan Brinckman, Andrey Kuehlkamp, Jarek Nabrzyski, Ian Taylor
As the public Ethereum network surpasses half a billion transactions and enterprise Blockchain systems becoming highly capable of meeting the demands of global deployments, production Blockchain applications are fast becoming commonplace across a diverse range of business and scientific verticals. In this paper, we reflect on work we have been conducting recently surrounding the ingestion, retrieval and analysis of Blockchain data. We describe the scaling and semantic challenges when extracting Blockchain data in a way that preserves the original metadata of each transaction by cross referencing the Smart Contract interface with the on-chain data. We then discuss a scientific use case in the area of Scientific workflows by describing how we can harvest data from tasks and dependencies in a generic way. We then discuss how crawled public blockchain data can be analyzed using two unsupervised machine learning algorithms, which are designed to identify outlier accounts or smart contracts in the system. We compare and contrast the two machine learning methods and cross correlate with public Websites to illustrate the effectiveness such approaches.
Valerio Celeste, Shaen Corbet, Constantin Gurdgiev
The substantial volatility and growth in cryptocurrencies valuations between 2009 and the end of 2017 strongly suggest that both long memory and price volatility and return spillovers should be present in these assets’ dynamics. To date, literature on the major cryptocurrencies price processes does not address jointly and comprehensively their fractal properties, long memory and wavelet analysis, that could robustly confirm the presence of fractal dynamics in their prices, and confirm or deny the validity of the Fractal Market Hypothesis as being applicable to the cryptocurrencies. This research shows that Bitcoin prices exhibit long term memory, although its trend has been reducing overtime. In fact, assessing Bitcoin, Ethereum and Ripple across the period between 2016 and 2017, focusing solely on the period prior to the crash of 2018, we can conclude that Bitcoin was better described by a random walk, showing signs of markets maturity emerging, in contrast, other cryptocurrencies such as Ethereum and Ripple present evidence of a growing underlying memory behaviour.
Muhammad Saad, Jinchun Choi, DaeHun Nyang, Joongheon Kim · 5 authors
Recently, the Blockchain-based cryptocurrency market witnessed enormous growth. Bitcoin, the leading cryptocurrency, reached all-time highs many times over the year leading to speculations to explain the trend in its growth. In this article, we study Bitcoin and Ethereum and explore features in their network that explain their price hikes. We gather data and analyze user and network activity that highly impact the price of these cryptocurrencies. We monitor the change in the activities over time and relate them to economic theories. We identify key network features that help us to determine the demand and supply dynamics in a cryptocurrency. Finally, we use machine learning methods to construct models that predict Bitcoin price. Based on our experimental results using two large datasets for validation, we confirm that our approach provides an accuracy of up to 99% for Bitcoin and Ethereum price prediction in both instances.
Blockchain systems, such as Ethereum, use an approach called "metering" to assign a cost to smart contract execution, an approach which is designed to incentivise miners to operate the network and protect it against DoS attacks. In the past, the imperfections of Ethereum metering allowed several DoS attacks which were countered through modification of the metering mechanism. This paper presents a new DoS attack on Ethereum which systematically exploits its metering mechanism. We first replay and analyse several months of transactions, during which we discover a number of discrepancies in the metering model, such as significant inconsistencies in the pricing of the instructions. We further demonstrate that there is very little correlation between the execution cost and the utilised resources, such as CPU and memory. Based on these observations, we present a new type of DoS attack we call Resource Exhaustion Attack, which uses these imperfections to generate low-throughput contracts. To do this, we design a genetic algorithm that generates contracts with a throughput on average 200 times slower than typical contracts. We then show that all major Ethereum client implementations are vulnerable and, if running on commodity hardware, would be unable to stay in sync with the network when under attack. We argue that such an attack could be financially attractive not only for Ethereum competitors and speculators, but also for Ethereum miners. Finally, we discuss short-term and potential long-term fixes against such attacks. Our attack has been responsibly disclosed to the Ethereum Foundation and awarded a bug bounty reward of 5,000 USD.
Abstrak Smart contract adalah kesepakatan antara dua entitas yang dituangkan dalam kode program. Seluruh transaksi Smart contract disimpan di Blockchain. Blockchain adalah teknologi peer-to-peer terdistribusi untuk menyimpan dan mendistribusikan data digital seperti cryptocurrency dan smart contract dengan adanya kerahasiaan, integritas dan keaslian data. Akan tetapi Blockchain tidak cocok untuk menyimpan data dalam jumlah besar maka banyak developer saat ini membuat suatu DApp yang mengintegrasikan IPFS pada Smart contract Ethereum. File akan disimpan di IPFS sedangkan Blockchain hanya menyimpan hash file dari IPFS untuk dapat mengaksesnya kembali. Pada penelitian ini dilakukan pengukuran pemakaian memori dan CPU saat menjalankan DApp. Terdapat dua parameter yang mempengaruhi pemakaian memori dan CPU yaitu ukuran file dan jumlah node yang berinteraksi. Hasil pengujian akan digunakan sebagai tolak ukur dalam proses perencaanaan kapasitas memori dan CPU dalam menjalankan DApp yang mengintegrasikan IPFS pada Smart Contract. Perencanaan kapasitas hardware memori dan CPU diperlukan agar sistem yang dibangun bisa bekerja dengan baik sesuai kebutuhannya. Kata Kunci : IPFS, Blockchain, Ethereum, Smart contract, Memori, RAM Abstract Smart contract is an agreement between two entities as outlined in the program code. All Smart contract transactions are stored on the Blockchain. Blockchain is a distributed peer-to-peer technology for storing and distributing digital data such as cryptocurrency and smart contracts with the confidentiality, integrity and authenticity of data. However, Blockchain is not suitable for storing large amounts of data, so many developers now make a DApp (Decentralized Application) that integrates IPFS on Smart contract Ethereum. Files will be stored on IPFS while the Blockchain only stores the hashes of files stored on IPFS to be able to access them again. In this study, memory usage measurements were carried out when running DApp through the file upload process. The test results prove that the increase in RAM usage in each file upload process is influenced by file size and the number of nodes that interact with the system. The memory usage test results will be used as a benchmark in the capacity planning process so that the DApp web system can work properly according to its needs. Key Word : IPFS, Blockchain, Ethereum, Smart contract, Memori, RAM
A key aspect of Federated Learning (FL) is the requirement of a centralized aggregator to maintain and update the global model. However, in many cases orchestrating a centralized aggregator might be infeasible due to numerous operational constraints. In this paper, we introduce BAFFLE, an aggregator free, blockchain driven, FL environment that is inherently decentralized. BAFFLE leverages Smart Contracts (SC) to coordinate the round delineation, model aggregation and update tasks in FL. BAFFLE boosts computational performance by decomposing the global parameter space into distinct chunks followed by a score and bid strategy. In order to characterize the performance of BAFFLE, we conduct experiments on a private Ethereum network and use the centralized and aggregator driven methods as our benchmark. We show that BAFFLE significantly reduces the gas costs for FL on the blockchain as compared to a direct adaptation of the aggregator based method. Our results also show that BAFFLE achieves high scalability and computational efficiency while delivering similar accuracy as the benchmark methods.
Abstract Cryptocurrencies as a new way of transferring assets and securing financial transactions have gained popularity in recent years. Transactions in cryptocurrencies are publicly available, hence, statistical studies on different aspects of these currencies are possible. However, previous statistical analysis on cryptocurrencies transactions have been very limited and mostly devoted to Bitcoin, with no comprehensive comparison between these currencies. In this study, we intend to compare the transaction graph of Bitcoin, Ethereum, Litecoin, Dash, and Z-Cash, with respect to the dynamics of their transaction graphs over time, and discuss their properties. In particular, we observed that the growth rate of the nodes and edges of the transaction graphs, and the density of these graphs, are closely related to the price of these currencies. We also found that the transaction graph of these currencies is non-assortative, i.e. addresses do not tend for transact with a particular type of addresses of higher or lower degree, and the degree sequence of their transaction graph follows the power law distribution.
In recent years, increasing attention has been devoted to cryptocurrencies, owing to their great development and valorization. In this study, we propose to analyse four of the major cryptocurrencies, based on their market capitalization and data availability: Bitcoin, Ethereum, Ripple, and Litecoin. We apply detrended fluctuation analysis (the regular one and with a sliding windows approach) and detrended cross-correlation analysis and the respective correlation coefficient. We find that Bitcoin and Ripple seem to behave as efficient financial assets, while Ethereum and Litecoin present some evidence of persistence. When correlating Bitcoin with the other cryptocurrencies under analysis, we find that for short time scales, all the cryptocurrencies have statistically significant correlations with Bitcoin, although Ripple has the highest correlations. For higher time scales, Ripple is the only cryptocurrency with significant correlation.
Zhimin Gao, Lei Xu, Keshav Kasichainula, Lin Chen · 6 authors
Bitcoin brings a new type of digital currency that does not rely on a central system to maintain transactions. By benefiting from the concept of decentralized ledger, users who do not know or trust each other can still conduct transactions in a peer-to-peer manner. Inspired by Bitcoin, other cryptocurrencies were invented in recent years such as Ethereum, Dash, Zcash, Monero, Grin, etc. Some of these focus on enhancing privacy for instance crypto note or systems that apply the similar concept of encrypted notes used for transactions to enhance privacy (e.g., Zcash, Monero). However, there are few mechanisms to support the exchange of privacy-enhanced notes or assets on the chain, and at the same time preserving the privacy of the exchange operations. Existing approaches for fair exchanges of assets with privacy mostly rely on off-chain/side-chain, escrow or centralized services. Thus, we propose a solution that supports oblivious and privacy-protected fair exchange of crypto notes or privacy enhanced crypto assets. The technology is demonstrated by extending zero-knowledge based crypto notes. To address "privacy" and "multi-currency", we build a new zero-knowledge proving system and extend note format with new property to represent various types of tokenized assets or cryptocurrencies. By extending the payment protocol, exchange operations are realized through privacy enhanced transactions (e.g., shielded transactions). Based on the possible scenarios during the exchange operation, we add new constraints and conditions to the zero-knowledge proving system used for validating transactions publicly.
Zhimin Gao, Lei Xu, Keshav Kasichainula, Lin Chen · 6 authors
Bitcoin brings a new type of digital currency that does not rely on a central\nsystem to maintain transactions. By benefiting from the concept of\ndecentralized ledger, users who do not know or trust each other can still\nconduct transactions in a peer-to-peer manner. Inspired by Bitcoin, other\ncryptocurrencies were invented in recent years such as Ethereum, Dash, Zcash,\nMonero, Grin, etc. Some of these focus on enhancing privacy for instance crypto\nnote or systems that apply the similar concept of encrypted notes used for\ntransactions to enhance privacy (e.g., Zcash, Monero). However, there are few\nmechanisms to support the exchange of privacy-enhanced notes or assets on the\nchain, and at the same time preserving the privacy of the exchange operations.\nExisting approaches for fair exchanges of assets with privacy mostly rely on\noff-chain/side-chain, escrow or centralized services. Thus, we propose a\nsolution that supports oblivious and privacy-protected fair exchange of crypto\nnotes or privacy enhanced crypto assets. The technology is demonstrated by\nextending zero-knowledge based crypto notes. To address "privacy" and\n"multi-currency", we build a new zero-knowledge proving system and extend note\nformat with new property to represent various types of tokenized assets or\ncryptocurrencies. By extending the payment protocol, exchange operations are\nrealized through privacy enhanced transactions (e.g., shielded transactions).\nBased on the possible scenarios during the exchange operation, we add new\nconstraints and conditions to the zero-knowledge proving system used for\nvalidating transactions publicly.\n
Alexander Hentschel, Dieter Shirley, Layne Lafrance
Throughput limitations of existing blockchain architectures are one of the most significant hurdles for their wide-spread adoption. Attempts to address this challenge include layer-2 solutions, such as Bitcoin's Lightning or Ethereum's Plasma network, that move work off the main chain. Another prominent technique is sharding, i.e., breaking the network into many interconnected networks. However, these scaling approaches significantly increase the complexity of the programming model by breaking ACID guarantees increasing the cost and time for application development. In this paper, we describe a novel approach where we split the work traditionally assigned to cryptocurrency miners into two different node roles. Specifically, the selection and ordering of transactions are performed independently from their execution. The focus of this paper is to formalize the split of consensus and computation, and prove that this approach increases throughput without compromising security. In contrast to most existing proposals, our approach achieves scaling via separation of concerns, i.e., better utilization of network resources, rather than sharding. This approach allows established programming paradigms for smart contracts (which generally assume transactional atomicity) to persist without introducing additional complexity. We present simulations on a proof-of-concept network of 32 globally distributed nodes. While the consensus algorithm was identical in all simulations (a 2-step-commit protocol with rotating block proposer), block computation was either included in a consensus nodes' regular operations (conventional architecture) or delegated to specialized execution nodes (separation of concerns). Separation of concerns enables our system to achieve a throughput increase by a factor of 56 compared to conventional architectures without loss of safety or decentralization.
The purpose of this Master's thesis is to explore smart contracts, underlaying blockchain tehnology and to build a smart contract for sellings goods that is entirely decentralized along with dispute process. In the first part, Ethereum global platform for building decenralized applications is explained along with all the functionalities of Etherum such as Ether money, making transaction on Ethereum blockchain, wallets, etc. After understanding Ethereum blockchain and it's principles, the understanding of smart contracts is going to be much easier. Solidity is the programming language used to create smart contracts on Ethereum network.
After learning about Ethereum, blockchain, and smart contracts the development process of creating a smart contract for selling goods in Remix IDE is explained along with the creation of user-interface. After smart contract for selling goods is created and tested in Remix IDE, the development of UI can begin. All the functions of smart contract for selling goods are described in detail along with React UI components for executing functions of smart contract on Ethereum blockchain.
In the end both panels for buyer and seller are described along with all the functionalities they bring. Besides main panels, there are separate panels for buyer and seller that are used to solve disputes between the two parties.
Francesco Longo, Letizia Nicoletti, Antonio Padovano
Abstract Food supply chains are benefiting from blockchain technology, as it establishes a shared, secure record of information flows, thus reducing food safety risks, increasing consumers’ trust in products’ provenance and enhancing supply chain efficiency. However, despite some embryonic applications, systematic literature review reports very few investigation studies. This article proposes a potential design and update frequency of relevant data to be stored in the Ethereum blockchain for monitoring and traceability purposes and explores the cost connected to every transaction in the case of a fresh milk processing industry and supply chain, from dairy farms to the end consumers. Results show that (i) investments are limited for the supply chain actors; (ii) the benefits of a blockchain-enabled supply chain can be achieved with a minimal impact on the product’s consumer price, and (iii) the costs of operating the blockchain increases as we move down along the tiers of the supply chain.
U ovom diplomskom radu opisat će se Ethereum globalna platforma, ether novac koji se koristi za vršenje transakcija na mreži, novčanik za čuvanje ethera i ethereum blockchain na temelju kojega je osmišljen Ethereum. Uz pomoć razumijevanja glavnih koncepata na kojima se temelji Ethereum lakše će se razumijeti princip na kojemu funckioniraju Ethereum pametni ugovori. Nakon opisa Ethereum blockchaina slijedi opis Ethereum pametnih ugovora te opis Solidity programskog jezika koji se koristi za izradu pametnoga ugovora. Zatim slijedi opis pametnog riješenja i tijek korištenja pametnog ugovora te opis razvoja programskoga riješenja unutar kojeg se opisuje razvoj pametnog ugovora za prodaju dobara u Solidity programskom jeziku i na kraju funkcije pametnog ugovora. Nakon izrade pametnog ugovora za prodaju dobara slijedi izrada korisničkog sučelja za krajnjeg korisnika. Opisane su korištene tehnologije i struktura projekta nakon čega slijedi opis komponenti aplikacije. Na kraju je opisan izgled konačnog programa. Slijedi postupak spajanja na decentraliziranu aplikaciju zatim opis panela kupca i prodavača koji se koriste za izvršavanje funkcija s pametnog ugovora za prodaju dobara. Osim glavnog panela opisan je i posebni panel za vođenje sporova za problematične narudžbe.
Kriptovalute su novi oblik digitalnog novca koji funkcionira i nastaje na temelju složenih kriptografskih algoritama na računalnim mrežama. Ethereum je open-source program, zasnovan na blockchain tehnologiji, koja dozvoljava drugim programerima da grade i razvijaju decentralizirane aplikacije. Diplomski rad podijeljen je u tri glavna dijela. U prvom dijelu objašnjeni su osnovni pojmovi kako bi se razumjelo što su kriptovalute. U drugom dijelu rada objašnjeno je što je Ethereum, a u trećem dijelu opisani su osnovni principi rada i dijelovi koda Ethereum algoritma i programiranje u solidity programskom jeziku.
Iago Sestrem Ochôa, Rafael Alexandre Piemontez, Lucas M. C. e Martins, Valderi Reis Quietinho Leithardt · 5 authors
Blockchain technology has aroused the interest of researchers as it ensures security and privacy in decentralized applications. One of the platforms currently used for the development of new blockchain-based solutions is the Ethereum network. This article presents an experimental analysis of the scalability of this network to identify its cost and performance for several contracts in a simulated private Ethereum network. The results obtained demonstrate that storage operations for large amounts of data can prevent the use of blockchain due to the high cost of gas charged for this type of operation. The experiments also pointed out that processing operations which do not store information have a small cost of gas.