Please follow and like us:
How does Ethereum work? Why so special?

Invented by Vitalik Buterin in 2015, Ethereum is a protocol, a network, and a blockchain all rolled into one digital online machine. Beyond basic financial transactions, Ethereum allows for the programming and automation of complex sets of transactions, coded as programs called smart contracts. Smart contracts inherit the properties of the blockchain concept: being unforgeable, censorship-resistant and immutable.

Here is a teaser: Ethereum's architecture is inspired by Bitcoin's, but it is way  more complex.

THE ETHEREUM BLOCKCHAIN

As with Bitcoin, the Ethereum blockchain is used to store the history of transactions taking place on the network while also allowing the storage of computer code which constitute the famous smart contracts. The first blockchain application, Bitcoin, operates on a model known as UTXO, which stands for "unexpended output" where the balance of each address corresponds to all the outputs from other addresses, which have not yet been spent. Ethereum, on the other hand, goes further, with its system of accounts, like a bank. The network nodes store the status of accounts. This includes their balance, but also the code of the smart contracts and where these are stored.In the ETH environment there are two types of accounts: external accounts, controlled by public/private key pairs (like a classic Bitcoin address), and contract accounts, controlled by code.

Four concepts define these accounts:

The nonce: which indicates the number of transactions issued per account; when it is a contract account, this is the number of smart contracts created through the account in question.

The balance: this is the amount of ETH tokens owned by the account.

The code-Hash : the hash of the code present related and exclusive to the account.

The storage Root: allows encoding the data present in the account.

DECENTRALIZATION OF COMPUTER APPLICATIONS

Vitalik Buterin wanted to go further than Bitcoin, by proposing a blockchain that has its own programming language: Solidity. This opens a world of possibilities to the users where it is possible to create decentralized applications. Applications which possess the advantage of not being hosted on a server, but on all nodes of the network. This architecture offers several pros, one being that if a part of the network goes offline, the other nodes continue to run these programs; therefore, decentralized applications are resistant to censorship, to attacks, and can technically run smoothly.

For these reasons, Ethereum is often described as a universal computer. Anyone can code their applications, without fear of them ceasing to function.

WHAT IS A SMART CONTRACT?

These are simply a set of rules and instructions stored in a decentralized and autonomous system, the lines of codes of each smart contract set the rules, the code is law.

These instructions are executed under certain conditions, since the contracts are written using a specific programming language, called Solidity. Unlike Bitcoin's scripting language, Solidity is called "Turing-complete" which refers to the mathematician and cryptologist Alan Turing, a pioneer of computer science who is famous for models defining the concepts of algorithms, programming: the famous Turing machine. His invention, a computer allowed the allies to decipher the Germans messages during the Second World War.

Today, Turing's invention is a concept and no longer a physical object.

Any programming language might be labelled "Turing-complete" if it can simulate a Turing machine, with the same expressiveness and computability, meaning that it can create functions based on conditional loops (if, then, else). The functions are also deterministic: the same functions applied to the same arguments will always output the same result, render the same outcome.

Solidity written smart contracts respect these characteristics. However, in the Ethereum ecosystem, there is a limit to the execution, the deployment of these smart contracts: the instructions have a financial cost. A contract is therefore a set of lines of code, and a set of data (the state of the contract on the blockchain) stored within an Ethereum account which uses Ethereum tokens as a fuel to operate and be deployed.

Once deployed on the nodes of the Ethereum network, the smart contracts are stored on the blockchain which executes them, the whole process happens on the EVM Ethereum Virtual Machine!

THE ETHEREUM VIRTUAL MACHINE OR EVM

The EVM is a deployment environment which allows the interpretation of the Solidity lines of code, operators called miners are the ones who execute these instructions in exchange of a financial compensation for validating the deployment/transaction on the ETH blockchain. Logically, each instruction in a Solidity contract like each Ethereum has an execution cost.

The EVM has three areas for data processing:

The storage area: occurs between the call of a function and a transaction.

The memory zone: specific to each contract, its size varies proportionally to the amount of data managed.

The stack: which carries the instructions of the contract.

ETHEREUM'S CONSENSUS ALGORITHM

Similarly to the main blockchain application: Bitcoin, Ethereum relies on a consensus algorithm that guarantees that the nodes of the network agree on a given state of the blockchain. For now, this consensus mechanism is the same as on Bitcoin, namely the proof of work, but will very soon be a proof of stake consensus algorithm before the end of 2022.

The aforementioned miners, network validators, compete to validate transactions on the network and execute the instructions of smart contracts. To do this, they devote a lot of computing power, a lot of energy in order to be potentially rewarded by the whole protocol in ethers, Ethereum tokens.

The main friction in this nascent, booming industry is the constant debate around its expensive cost in terms of energy; these questionings led the Ethereum team to considering, then definitely relying on the proof of stake consensus model, the main motivations were to unclog the network and make it more efficient given the high fees that have emerged thanks to the booming NFTs and DeFi applications built on the EVM. As of February 2022, we are currently in a transition phase: for a few months, Ethereum will use a hybrid system after which there will be a total transition from proof of work to proof of stake. Proof of stake relies on miners, validators, to stake, to block a significant amount of ether as a guarantee to enter the validation game of the transaction validation in a given blockchain, while Proof of work is based on the deployment of high computational energy PoS's concept is a freezing of a non-negligible amount of ether as a ticket of entry in the validation, the mining market.

H.Zak

Please follow and like us:

Leave a Reply

Your email address will not be published. Required fields are marked *

Please follow and like us: