0.0824 s - время 147 - запросов

We use cookies in order to improve your experience while using our website. If you continue to use our site, you accept our Cookies Policy, revised Privacy Policy and updated Terms of Use.

BTC $ 4059.451903 (0.82 %)
ETH $ 140.165994353 (0.68 %)
XRP $ 0.3179465141 (0.26 %)
LTC $ 60.5826126438 (1.14 %)
EOS $ 3.7641981377 (0.61 %)
BCH $ 161.953948383 (-0.16 %)
XLM $ 0.1153928717 (3.57 %)
BNB $ 15.6721904586 (0.83 %)
USDT $ 1.015227753 (0.39 %)
TRX $ 0.0229939466 (0.44 %)

Smart Contracts And Their Main Shortcomings

07:45 22/11/2018
Smart contracts and their disadvantages

Introduction

 

Smart contract as a concept is an important cornerstone of blockchain technology. The popularity of smarts is mostly due to their indifference to such factors as legislation backdoors, lie, misunderstanding and other manipulations inherent in every human being. Each smart contract is a program that cannot lie (unless it was intended to), it processes data in accordance with strict rules, cannot be manipulated and is not susceptible to fatigue.

 

However, just as common contracts may contain hidden tricks, smart contracts may have traps in their codes. Fortunately, these traps can be avoided. Any smart contract can be tested on your own private network as its code is clear and available for everyone. At least this was the initial concept of smart contracts.

 

Still, this is not the only reason why smarts are so popular. A set of documents forming a code, or a rulebook are commonly too big to be implemented at once. You need someone specially taught to understand the whole interaction. But still, it will take you an enormous amount of time to analyse and implement these documents. In contradiction, smart contracts are written in programming languages and can be executed in a heartbeat. They may also call each other, transfer parameters. Such approach was called dApp, which means a distributed application. DApp is a complex software in which several programs interact with each other and produce a result.

 

Environment conditions

 

Unfortunately, nothing is perfect, and smart contracts are not an exception. They have limitations and restrictions. In order to understand them properly, let’s figure out what position smart contracts take in the blockchain network. Nota bene: There are not only various platforms for writing smart contracts in different languages, but also numerous concepts of smarts themselves. Consider them in the context of the Ethereum blockchain.

Nodes, blockchain and its content
Nodes, blockchain and its content

According to Ethereum rules, each smart contract is a program written in Solidity or any other appropriate language. It contains a valid address and is placed on blockchain. Since blockchain is stored by each full node at the same time, the same smart contract can be computed by every full node participant. Thus, considering a single smart contract, the network will look like the following:

Single smart contract in the network
Single smart contract in the network

Restrictions

 

The first important restriction that must be taken into account is calculation facilities. Each transaction implements changes to the state. All transactions intended to change the state simultaneously are united in blocks. Each transaction has to be processed by a full node. Since transactions can differ, their processing is measured in special units called ‘gas’. You can consider gas as fuel. The amount of state changes and their significance are limited by the total amount of gas used per block. New blocks cannot hold transactions where a gas sum is greater than a block gas cap. Meanwhile, every single gas unit is paid in ether.

 

The second restriction is about a contract’s size. Not only is gas paid for transaction execution but for data storage as well. Smart contract codes must be kept somewhere within the Ethereum environment. Storing of large contracts leads to two consequences. First, you have to pay gas for data storage. Second, each time someone calls your contract, they may have to pay in proportion to the complexity of the contract.

Smart contract

The last restriction is probably the most significant one. You might have enough ether to pay for data storage, your contract might be good enough to be paid for as well. The only thing the contract will never do is working outside blockchain. All interactions, state changes, contracts calls and ether transfers can be executed only within blockchain, and there is no way to change this paradigm.

 

Afterword

 

Apparently, smart contracts are not as smart as they’re supposed to be. Regardless of all their advantages, their flaws are significant and distressing. Although, there is a way to resolve this issue. We’re talking about an oracle, a service intended to connect blockchain with the external world. This software solution will be the topic of our next article.

Found a mistake? Highlight it and press Ctrl + Enter to notify the administrator.

Up-to-date Blockchain and cryptocurrency news. Be the first to know!

What is it for?