How does Ethereum work?

April 26, 2018
ethereum smart contracts

Ever since its launch in 2015, there’s been a lot of talk around Ethereum from it’s $150M “hack” to the various token economies it has spawned.

Before we get started there’s a few things you need to know about

Externally Owned Accounts:
— Contain Ether
— Ability to make transaction on the network
— Requires private key to operate
— Does not rely on any code

Smart Contracts:
— Contain Ether
— Are operated through code
— Store state of a program (can run programmable decentralised applications)

As mentioned in my last post about gas https://medium.com/@kermankohli/smart-contract-security-pt-iii-gas-limits-4c48c7d0eba0, every transaction made on the network requires gas to be paid. A transaction could be you sending money to your friend, or it could be interacting with a smart contract.

State

In Bitcoin, your “balance” is simply the remaining balance from a series of transactions. You don’t actually own Bitcoin in your wallet, just authorisation to make another transaction. It also means to get your balance you need to retrace a series of transactions.

In contrast, every transaction made on the Ethereum network updates its world state meaning you can query any information you have by having the latest version of the public ledger. It can verify the world state is correct through its state, storage, transaction and receipts trees (referred to a as tries formally).

To make this a bit more relatable, an ICO is simply a smart-contract that issues tokens to users who send it Ether.

So how does the process work when you buy a token in an ICO?
- You sign a transaction with your private key to send Ether to the address of the smart contract hosting the token.
- Based on the computational work required for the miners to interact with the smart contract processing your transaction, a gas fee is charged. The less you pay in gas fees the less incentive miners have to process your request, hence the more gas you pay the quicker your transaction will be added to the next block.
- Assuming the gas to work ratio is worthwhile enough at the time, your transaction will be added into the next “block” mined.
- This mined block containing your transaction is broadcasted to the network and the global state is updated.

What this means is that any transaction made to a smart contract is executed by every miner on the network, essentially Ethereum is a global computer which can’t be stopped! I’ll be writing another article that talks about the potential problems with the law and smart contract execution later.


Interacting with a smart contract, isn’t something that everyday want to do, or should do. That’s why extensions such as Metamask exist which create easy to use interfaces with interacting with the blockchain and it’s various ecosystem components.

The State of Crypto Interoperability.

April 18, 2019
ethereum crypto interoperability cosmos polkadot

Token/Market Fit. What can we learn so far?

March 20, 2019
ethereum makerdao binance tokens bitcoin

What’s MakerDAO and what’s going on with it? Explained with pictures.

March 13, 2019
ethereum makerdao technology
comments powered by Disqus