Lity. New smart contract language

Lity. New smart contract language

There are currently more than 1,700 decentralized applications (DApps) published on the Ethereum network, and their number continues to increase. And although all Dapps rely on smart contracts, the reliability of smart contracts themselves is questionable - cybercriminals have already earned more than a billion dollars from hacking them.

In order to create a viable smart contract, the programmer needs to learn a completely new programming language “Solidity”; the slightest mistake when writing a smart contract in Solidity can lead to catastrophic consequences - information leakage and/or high transaction costs. A recently discovered bug in Parity's smart contracts caused the company to lose more than half a million ether (ETH), worth more than $169 million.

Should we blame Solidity?

As incidents like this happen more frequently, the Ethereum community's opinion of Solidity has changed for the worse. Smart contracts written in Solidity suffer from security problems, especially the integer overflow problem. Hackers have little trouble finding flaws in contracts and stealing millions of dollars. Many of these hacks occurred due to mistakes made by programmers when writing Solidity code. 

For example, the Beauty Chain (BEC) was a very famous cryptocurrency in China; on the first day of sales on the OKeX exchange, its price increased by 4000%. From a peak market value of $70 billion, the company suddenly dropped to $2 billion when the price of its tokens became zero. This happened due to a bug in the ECR20 smart contract. In the case of BEC, the developer added a method to the contract called “batchTransfer()”. This method was intended to make it easier to transfer a token to multiple people at once.

However, the developer made a critical mistake in the following line of code:

uint256 amount = uint256(cnt) * _value;

Solving the problem

To solve the problems facing smart contracts written in Solidity, a language called “Lity” was created. This language is used to develop smart contracts and decentralized applications on the CyberMiles blockchain. Lity consists of a dynamically extensible language, a compiler, and a virtual machine. This means that all existing Solidity programs can now run without modification on the CyberMiles Virtual Machine (CVM).

The Lity language is more flexible, more reliable and secure than Solidity. For example, Lity supports new language features that can be added using over-the-air technology. For example, public/private key algorithms on the Ethereum network are very long and expensive. The network simply cannot support many types of applications.. Using one of the new functions known as “libENI”, the time required to complete these operations can be reduced to a couple of milliseconds (10,000 times faster than now). These operations will also cost significantly less.

The improvement in Lity's computing power has huge potential for applications in the exchange of crypto assets between blockchains, as well as for incorporating off-chain data into blockchain transactions. 

Finally, the Lity compiler checks the codes in the ERC 20 and ERC 721 contracts for all known bugs and errors. And the virtual machine automatically prevents problems like integer overflows or invalidation of the contract owner.

The Future of Smart Contracts

Unfortunately, Solidity has become a scapegoat for all the problems found in modern smart contracts. In order to ensure reliable operation of such contacts in the future, new programming languages ​​like Lity were created.

It is also known that the Ethereum Foundation itself is looking for ways to solve these problems. Its head is working on the implementation of “Casper” - a mechanism through which Ethereum will gradually switch to PoS consensus. The fund's management believes these changes are necessary in order to solve many problems associated with PoW. The CyberMiles Foundation, however, has already announced that it has found a solution to the problem - a working DPoS model. 

These modifications will undoubtedly have a number of applications for the Ethereum network and for one of its most important components - the smart contract.


According to hackernoon.com

You May Also Like

22018-06-07

Parity wallet offers users an update after discovering a vulnerability in the testnet network

Parity Technologies has warned users that a vulnerability discovered in the testnet network could spread to the Ethereum network if an update is not installed. In this case, user transactions will no longer be synchronized with the Ethereum network and will be blocked.

Ethereum
02018-08-10

How XRP Can Improve the Football Transfer Window

Yesterday saw the first closure of the football transfer window in England. The window is still open, however, due to different regulatory rules, some countries are losing access to it a little earlier than others.

Ethereum

Latest articles from Ethereum category

Fresh video on our Channel