검색 상세

Improved Algorithms for Efficient and Reliable Smart Contracts on Blockchain

효율적이고 신뢰성 있는 블록체인 기반 스마트 컨트랙트를 위한 개선된 알고리즘

초록

This thesis focuses on solving critical challenges and improving reliable and efficient algorithms in four applications of blockchain and smart contracts. For development of blockchain technology still improves and reliability and efficiency are key factors in its growth and development. However existing blockchain applications could be improved in terms of reliability and efficiency. This thesis presents examples of applications and algorithms that increase the reliability and efficiency of smart contracts. The thesis is organized into four main sections. The first section is anonymous voting based on the Ethereum blockchain. Existing blockchain-based voting suffers from the problem that voting values can be disclosed. To solve this problem, anonymous voting is already introduced, however previous anonymous voting system reduces the scalability of voting. By changing the algorithm of the existing Ethereum-based anonymous voting, this application greatly increases the scalability of voting. At the same time, it solves the problem of non-voting and greatly reduces the gas used for voting. Following is an algorithm that detects vulnerabilities in smart contracts. Smart contracts are very difficult to modify once they are deployed on a blockchain network, so if a smart contract has a vulnerability, it can be attacked causing large economic damage. This algorithm focuses on application-specific vulnerabilities in smart contracts while existing smart contract vulnerability detectors focus on to detect overall common vulnerabilities. As a result, it can detect vulnerabilities that can't be detected by existing vulnerability detectors, and it can detect user-defined vulnerabilities. The third section is a smart contract-based P2P energy trading system with dynamic pricing. This application increases the efficiency of P2P energy trading based on smart contracts over a blockchain network. The application applies a pricing algorithm based on supply and demand and also prevents double sale problems that may occur in the network for stability. As a result, the network fee called “gas” is significantly reduced while applying dynamic pricing and double sale prevention. Finally, enhancing network performance on the Hyperledger blockchain. This algorithm uses dependency graph based on transaction’s keys to solve dependency problem in hyperledger fabric. By solving dependency problem, it can improve the performance of hyperledger fabric network.

more

목차

I. Introduction 1
1.1 Blockchain 3
1.2 Smart Contract · 3
II. A Scalable Implementation of Anonymous Voting over Ethereum Blockchain 6
2.1 Introduction 6
2.1.1 Motivations 6
2.1.2 Previous Works and limitations 7
2.2 Mathmatical Foundation 10
2.2.1 ZKP (Zero-Knowledge Proof) · 10
2.2.2 Non-Interactive Zero-Knowledge Proof(NIZKP) 12
2.2.3 Two-Round Referenda · 12
2.2.4 Extend to Multiple Candidates 14
2.3 Technical Bottlenecks in Ethereum Implementation and Proposed Solutions 15
2.3.1 Division Problem in Encryption of Voting Values · 16
2.3.2 Large Time Complexity in Tallying · 18
2.3.3 Tallying Failure due to “No Votes” from Registerd Voters 21
2.4 Performance Evaluation 25
2.4.1 Scalability 25
2.4.2 Gas Cost · 29
2.4.3 Computational Burden for Tallying 30
2.5 Summary · 32
III. An Application-Specific Vulnerability Detection Scheme for Smart Contracts 33
3.1 Introduction 33
3.1.1 Motivations 33
3.1.2 Related Works and the proposed method · 34
3.2 Proposed Scheme and Application-Specific Common Vulnerabilities 38
3.2.1 Proposed Vulnerability Detector · 38
3.2.2 Common Vulnerabilities in Application-Specific Smart Contracts 41
3.3 Experimental Results 46
3.3.1 Reentrancy Attack · 46
3.3.2 Manipulated Balance Attack 51
3.3.3 Short Address Attack 55
3.3.4 Implementation of Vulnerability Detector · 58
3.4 Summary · 60
IV. A Smart Contract-Based P2P Energy Trading System with Dynamic Pricing 62
4.1 Introduction 62
4.1.1 Motivations 62
4.1.2 Related Works · 62
4.1.3 The Proposed Method 66
4.2 The Proposed P2P Energy System with Dynamic Pricing · 69
4.2.1 Dynamic Pricing · 69
4.2.2 The Proposed Dynamic Pricing Algorithm 71
4.2.3 The State Diagram Representation and Solidity Program 73
4.3 The Proposed P2P Energy Trading Implementation on a Private Ethereum Blockchain 79
4.3.1 Prevent Tampering of Transaction Records 82
4.3.2 Prevent Double Sale of Energy 82
4.3.3 Inject Energy Using Whisper ·84
4.3.4 Matching between Prosumers and Consumers 85
4.3.5 Settlement ·86
4.4 Experiment Using a Test Ethereum Blockchain 87
4.4.1 Creation of Virtual Prosumers and Consumers ·87
4.4.2 Setup of an Experimental Ethereum Blockchain ·91
4.4.3 Execute Functions or Detect Events in a Smart Contract 91
4.4.4 Create Persona from Real Prosumers and Consumers 93
4.4.5 Ethereum Gas Cost ·94
4.5 Summary 98
Ⅴ. Performance Enhancement of Hyperledger Fabric Blockchain with Parallelization and Trade-off · 99
5.1 Introduction 99
5.1.1 Motivations 99
5.1.2 Related Works and the proposed method 100
5.2 Data Dependency in Hyperledger Fabric Blockchain: A Bottleneck for Speed-up 102
5.3 Proposed Method · 103
5.3.1 Transaction Processing with Dependency Tree 105
5.3.2 Dependency Priority Factors 113
5.3.3 Comparison of Dependency Check Methods 114
5.3.4 Details of Dependency-Checking Methods 115
5.4 Experiments and Results · 118
5.4.1 Experimental Setup 119
5.4.2 Results 121
5.5 Summary 128
Ⅵ. Conclusion 130
References ·132

more