What Is An Ethereum Smart Contract?
Ethereum is a global and decentralised platform for cryptocurrencies and new types of applications.
Until relatively recently, applications on blockchain required a solid background on coding and cryptography. Times have changed and previously unimaginable applications, from e-voting to digital real estate asset registration to trading, are now actively developed and implemented faster than ever before. By providing developers with the tools to build decentralised applications, Ethereum makes it all possible thanks to smart contracts, EVM, DApps, and DAOs. We’ll here clarify these terms, which at first glance may seem unfamiliar.
How Do Ethereum Smart Contracts Work?
As the contracts everyone knows, smart contracts also are a series of conditions and consequences. They are constructed like the hypothetical phrase “If…then”. An example would be the following sentence: “IF I pay rent on the first of the month THEN the owner lets me use the apartment”.
Unlike legal contracts on paper, smart contracts are made up of cryptographic code and their “THEN” implies the activation of a series of on-chain transactions (on the blockchain) programmed and automated for specific application cases. So, in a smart future managed by smart contracts, if my landlord receives the rent paid through the blockchain, the smart door of my apartment will open in front of me when it sees my face.
Smart contract technology is defined by certain features that make it both secure and controversial:
- Automatic (Self-executing)
A smart contract, therefore, does not provide for exemptions or exceptions if these are not planned. It’s just like we would picture a robot-judge.
As a result, the more complex a contract is, the more difficult it is to have all its conditions executed or to respond to all eventualities without leaving room for interpretation.
What Are The EVM And DApps?
Decentralised Applications (DApps) are basically blockchain-based and decentralised applications. They consist of a series of smart contracts designed for a specific use case.
Prior to the creation of Ethereum, DApps were designed to perform a very limited set of operations. Bitcoin, for example, is a DApp developed primarily to support the circulation of the bitcoin cryptocurrency.
Developers who wanted to create new DApps faced a problem. They could either expand the set of features offered by Bitcoin or by other types of applications, which is very complicated and time-consuming, or develop a completely new blockchain and platform. So did the creator of Ethereum, Vitalik Buterin.
The main innovation of Ethereum, the “Ethereum Virtual Machine” (EVM) is a software on the Ethereum network that allows anyone to run any program, regardless of the programming language, if they have enough time and space. Vitalik compared the EVM protocol to a kind of Swiss Army knife. The Ethereum Virtual Machine makes the process of creating applications on blockchain much easier and more efficient than before. Instead of starting from scratch and building a blockchain for each new application, Ethereum allows the development of thousands of potentially different applications on a single platform.
Moreover, all centralised services can be decentralised using Ethereum. All the intermediary services in hundreds of different sectors: bank loans, brokerage services, securities registers, voting systems, regulatory compliance, and many more.
The Benefits of an Ethereum DApp
Since decentralised applications work on the blockchain, they benefit from all its properties.
- Immutability – data cannot be changed by third parties.
- Corruption and tamper-proof – Applications are based on a network formed on the principle of consent, making censure impossible.
- Security – Without a central point of vulnerability and protected by encryption, applications are safe from hacker attacks and fraudulent activity.
- No downtime – DApps never go into standby and can never be shut down.
The Disadvantages of Ethereum DApps
Despite their many advantages, DApps are not perfect. Because smart contract code is written by humans, smart contracts have the same limitations as the people who write them. Bugs or omissions in the code can cause unintentional anomalies. If an error in the code is exploited to compromise the system, there is no efficient way to stop it, except to get the network’s consent and rewrite the code in question. This, however, would go against the essence of the blockchain, which must be unchangeable. Moreover, any decision taken by only a small part of the network raises serious issues about the decentralised nature of an application.
What Are DAOs?
Ethereum can also build Decentralised Autonomous Organizations (DAOs) without a single leader. DAOs are a more complex expression of smart contracts because they are real organisations with a purpose, as can be a company or a government agency. Smart contracts replace the management, so compared to a DApp or blockchain, in DAOs there are additional levels of automation of regulation, consensus and verification mechanisms. A DAO is owned by everyone who buys tokens. Tokens act as contributions that give people the right to vote.
“A DAO consists of one or more contracts and may be funded by a group of like-minded individuals, for example. A DAO operates in a completely transparent manner and completely independent of any human intervention, including that of its original creators. A DAO will remain on the web as long as it covers its living costs and provides a useful service to its customer base”Stephen Tual, founder of Slock.it, former CCO Ethereum.
The best-known example of a DAO is Dash, the DAO that issues an open-source cryptocurrency.
The Decentralised Autonomous Organization (known as the DAO) should have operated as a venture capital fund for the crypto space. The lack of a centralised authority reduces costs and provides more control and access to investors.
DAOs are a developing concept, as a matter of fact, the first DAOs encountered a few problems, like the DAO hack in June 2016.
In early May 2016, members of the Ethereum community announced the birth of DAO, also known as “Genesis DAO”. It was built as a smart contract on the Ethereum blockchain. The programming framework was developed open source by the Slock.it team, but was distributed by the name “The DAO” by members of the Ethereum community.
However, on June 17, 2016, a hacker found a loophole in the code that allowed him to drain funds from the DAO. In the first hours of the attack, 3.6 million ETHs, the equivalent of $70 million, were stolen. All this was possible not because of a lack of Ethereum, but because of a bug in the code of the DAO itself. Likewise, if a website does not work, it is not a problem of the whole Internet, but of the site in question.
Ethereum is a very ambitious project that follows high ideals, but despite the significant barriers that similar projects have to overcome, it has achieved almost as much success as Bitcoin. With the great ideal of decentralising any economic and social process, Ethereum has great potential to be the project that will take the world into a smarter future.