New Network Security Method in Turing-Complete Cryptocurrency: User Accountability System

loum(59)
Published in
#ethereum
Words
1702
Reading
8 min
Listen
Play
9y

아래는 제가 작성한 암호화폐에 대한 논문입니다.
한글 논문은 https://goo.gl/Hx5k5m 에 있습니다.

이 논문을 수정하여 다시 저널에 제출할 수 있어서 논문 중 일부를 공개하겠습니다.


New Network Security Method in Turing-Complete Cryptocurrency: User Accountability System

Sungil Kim*

* Sungil Kim, Ph.D. ([email protected]) is a researcher studying cryptocurrencies, Korea.

Abstract. Ethereum was the first to apply a Turing-complete language to use smart contracts in cryptocurrency. It also introduced the gas system to protect its network against infinite loop attacks made possible by this language. However this gas system has two fatal weaknesses: it is vulnerable to spam attacks and network usage is reduced due to strong usage-based characteristics. To solve this problem, this paper proposes a user accountability system as a new network security method. The key to this system is to force the users to impose accountability for network security. Specifically, they must pre-deposit and lock their contract deposit, to be responsible for their actions in this system, and then they may execute their smart contracts on the network. This locked contract deposit strengthens network security. This is because when they attack the cryptocurrency network, they lose some or all of their contract deposit. This is the basic principle of improving network security.

KEY WORDS

1. Spam attacks. 2. Ethereum. 3. Gas system. 4. Network security. 5. Locked contract deposit.

1. Introduction

Bitcoin as cryptocurrency is a replication system in which the distributed nodes constitute a peer to peer (p2p) network for online payment without relying on a trusted central authority.[1] It keeps a public and distributed blockchain up to date by a proof-of-work algorithm.[1] It makes online payments by using a turing-incomplete language that does not include loop operations, etc.[2, 3] The Turing-incomplete languages typically do not include loop or branch operations or storage; On the contrary, if these are included, it can be generally called Turing-complete languages.[3] Note that the Turing-incomplete language on Bitcoin was purposefully adopted to protect its network from the infinite loop attacks.[2] However, it suffers from inherent weaknesses that prevent the users from coding complex logic.
To overcome this, Ethereum, which inherited the concept of the distributed blockchain, intentionally adopted a Turing-complete language.[4] So the nodes that make up a p2p network of Ethereum can execute a smart contract through the Ethereum Virtual Machine (EVM). Here the smart contract (or contract) is the set of computer protocols that executes the terms of a contract.[12] In other words, it is any collection of bytecodes that have the ability to read/write to the blockchain and executes commands exactly as they are coded. [13] It can also read other contracts, make decisions, send internal tokens and execute other contracts.[13] Therefore, users can code their smart contracts using the Turing-complete language provided by Ethereum and execute them by interacting with the blockchain. Therefore Ethereum provides a distributed platform that allows users to execute a variety of smart contracts.[4] Additionally, the accounts in Ethereum have an internal storage that records the contract's bytecodes and data.[8] The Turing-complete cryptocurrency in this paper refers to Ethereum.
In Section 2, we examine the gas system, which is a network security method of Ethereum, and its problems. In Section 3, we propose a new user accountability system, and a new contract deposit method to implement this system. In Section 4, we talk about the advantages of a user accountability system. Section 5 will conclude this paper.

2. Security Method of Ethereum: Gas System

The Ethereum network can become unstable because of infinite loop attacks conceived from the Turing-complete language. If attackers can use infinite loops in the network, with little cost, they can rapidly increase the execution of their contracts, which can make the network considerably slow or at worst stop. For this reason, Ethereum introduced gas, which is a fee that is consumed for each execution step of a contract, and its purpose is to protect the network from malicious attacks or abuses.[5, 9] We will call this fee a contract fee. So the gas of Ethereum is the contract fee. This is different from a transaction fee paid for the online payments. And it is important that gas is a key feature that protects an Ethereum network from malicious attacks or abuses. We call this a gas system, or a usage-based charging system, which protects the network with usage-based charges.
Specifically, the gas of Ethereum is designed to be consumed for each execution of a contract while executed by the EVM. Each bytecode of the contracts consumes a predetermined amount of gas for each execution step.[9] And each bytecode has a different gas price depending on the network load or the like. For example, when an addition (ADD) operation is executed, it consumes 3 gas. The gas of the gas system is referred to as fuel because it is charged in proportion to the resource usage while a contract is executed.

2.1 Problems with the Gas System

Cryptocurrency, such as Bitcoin and Ethereum, is characterized by pseudonymity because the users can be only distinguished by their private keys and can also immediately create new ones without any restrictions. This pseudonymity has a nice feature that makes the user's transactions private in cryptocurrency. However, it is also well known that the attacks on the networks are stemmed from it. This is because it makes the attackers free from their accountability for network attacks. Therefore the gas system of Ethereum cannot fundamentally solve spam attacks because of the pseudonymous nature of cryptocurrency.
Actually, in November 2016, there was serious spam attacks on the Ethereum network.[6] At the time, the spam attacks caused the rate of block creation to be about 2 to 3 times slower, so they had a large impact on its network.[6] To solve these attacks, Ethereum developers implemented two hard forks: 1) to raise the gas price of the operations used in the spam attacks, and 2) to remove the empty accounts used.[7] Here, the hard fork was a change to an Ethereum protocol that makes previously invalid blocks/transactions valid, and so a permanent divergence of the blockchains resulting from non-upgraded nodes. [14]
However, their response is temporary. This is because there is currently no obvious ways to defend these spam attacks, besides raising the corresponding gas price. So this approach is likely to reduce the network utilization because of the side effects of raising the contract fee. For this reason, the gas system has shown limitations in its capacity to protect the network from spam attacks.
In addition, another disadvantage of the gas system is that it has the strong usage-based characteristics in which cost increases in proportion to the usage of the network. Because of these characteristics, the users are likely to be afraid that a code length of their contracts is too long. This occurs because if their contracts have a lot of commands, they will need a lot of money to execute their contracts. Ethereum tries to provide a platform where users can easily execute their various contracts. However, the strong usage-based characteristics can prevent Ethereum from acting as a platform. A platform is more activated when many users are able to use it at little or no cost. This may be a problem in proof-of-stake (PoS) algorithms where contracts can make heavy use of computing resources of nodes.

3. New Idea: User Accountability System

This paper proposes a new user accountability system (or our system) to solve the serious problems of the gas system. The key to our system is to force the users to impose accountability for network security. If they follow accountability or the rules imposed by our system, the contract fee they pay will be much less than that of the gas system. This means that they can obtain economic benefits by using the network at a small cost. Conversely, if they violate the rules, they will suffer economic damages. It is important that our system maintains network security with economy principle. In other words, our system is a new network security method that forces users to suffer economic damages if they burden the network with malice or carelessness. We will now introduce a new contract deposit method to implement it.

3.1 Contract Deposit Method

Our user accountability system is designed to forces users to pre-deposit their contract deposit in order to be responsible for their actions. So, if the contract deposit is not pre-deposited, users cannot execute their contract on the network. We call this a contract deposit method. Specifically, they must pre-deposit their contract deposit in a special account before executing their contracts, and then it is locked so that the deposit may not be the withdrawn. Alternatively, the users can lock their contract deposit directly on their wallet. Therefore, the contract deposit is intended to confirm that they are not willing to attack the network. Both are completely different as follows: our system is based on the contract deposit method, but the gas system is based on the strong usage-based characteristics.
In the real world, in most cases when the actors break the rules, they will suffer damage in any form, and this is the most unique feature of it. Likewise, if the users break the rules of our system, they will suffer economic losses. This is the basic principle of improving network security. It can be seen that this contract deposit method alleviates a pseudonymity of cryptocurrency. Specifically, it not only allows the network to be strongly protected, but also allows users to obtain economic benefits from a cheap contract fee during the execution of their contracts.
In addition, the method of maintaining security with the user’s deposit is already used in a Proof-of-Stake (PoS) algorithm such as tendermint, etc.[11] We call this a PoS deposit. But, the purpose of both is completely different. The contract deposit proposed in this paper is used to protect the cryptocurrency network from spam attacks, etc. In contrast, the PoS deposit is only used to secure the consensus algorithm.
Now we will introduce two specific contract deposit methods as follows: 1) a gas-base method of using a gas limit as the rules and 2) a post-verification method. We also want to say that our system may be implemented in many other ways not mentioned in this paper.

New Network Security Method in Turing-Complete Cryptocurrency: User... | Ecency