S01E02: Reading the Ethereum White Paper
It has been a few days since I started my explorations into the mechanics of cryptocurrencies, and especially the Ethereum White Paper.
The introduction of the white paper describes how the Blockchain principle works with Bitcoin. A very interesting part is where they explain the 51% attack. I had read this term before, and I knew that it was bad if one miner had 51% of the computational power, but not what exactly was happening in that case. Basically, a transaction gets verified after 5 confirmations. And so if you buy something (like a digital good, that is transported directly to you) the transaction will be confirmed after 5 blocks will be chained to the previous transaction block.
The idea of the 51% attack is that one could create another transaction, sending the cost price back to himself, and start to mine version of the transaction block, thereby creating a fork. If you have 51% of the computational power, your fork will become the longest / oldest, and that means that that will be the ‘true’ one. So in that case, the owner of 51% of the computational power can make new forks with his own input, all to be true.
“An attacker with immense computing power can redo the proof of work (PoW) for a considerate amount of blocks and can eventually gain a lot of bitcoins but as described in Satoshi’s paper, the reward to mine a valid block is much more than to disrupt the network. But in light of falling mining rewards the same does not hold true.”
On Ethereum. The White Paper explains, as expected, how Ethereum works, and what is different about it. Ethereum is a framework utilising the Blockchain for decentralised applications. Contracts can be executed when certain conditions are met, which are the smart-contracts. The WP delves in deep how the contracts are formed and transactions are executed.
The Ethereum state transition function
APPLY(S,TX) -> S' can be defined through 6 steps.
- Check all basic information: is the transaction well-formed, is the signature valid, et cetera. If not, it returns an error.
- Every transaction has a transation free. The transaction fee is determined as follows:
STARTGAS * GASPRICEThe fee is subtracted from the senders account balance and added to sender’s nonce. Return an error if there is not enough balance to spend.
GAS = STARTGAS, and take off a certain quantity of gas per byte to pay for the bytes in the transaction.
- Transaction value is transfered from the sender’s account to the receiving account. If the receiving account does not exist it will be created. If the receiving account is a contract it will run to completion or until it runs out of GAS
- If the value transfer fails (not enough money, or the code execution ran out of gas) all states will be reverted except for the fees to the miner.
- If all works out, the remaining gas will be returned to sender, and the miner will get their fees for the gas consumed.
(See the White Paper for a more detailed explanation)
There are of course many applications to be built on Ethereum. The white paper divides these up into three main categories.
- Financial Applications. Easy to imagine, sub currencies, derivatives, et cetera.
- Semi-Financial Applications. ‘self-enforcing bounties for solutions to computational problems.’ I am not sure what good this would do, need to do some more research
- Non-Financial Applications, or Social Applications. Ethereum could be the base for online voting and decentralised governance. This is very interesting to me, to be able to create a ‘Liquid Democracy’ through this new technology.
The concept of the Decentralised Autonomous Organisation is explained as a virtual entity that has a set of shareholders/members (could it be the complete population of a country?). If for instance a 2/3 majority can vote for a new rule / law. Here comes also the ‘Liquid Democracy’ into play: anyone can assign someone to vote for them, and assignment is transitive so if A assigns B and B assigns C then C determines A’s vote. This creates the possibility to organically grow the decentralised community. In this way people can give their vote to someone they trust to make the right choice, and then they can give it again, leaving the votes into the hands of ‘experts’.
This could be a new approach to democracy as we know it. Against Elections — The Case for Democracy by David van Reybrouck delves deeper in this kind of democracy, recommended to read.
Of course, we have to keep in mind that Ethereum is still vulnerable to a 51% attack and at the same time the development is not always lauded to be transparant. If the implementation of the Ethereum network in voting protocols is subject to malignant actors that would be very worrisome.
By reading the White Paper I have gained a better understanding of the inner working of the Blockchain and Ethereum principle. I think it is very useful to start with this, especially since it also explains the steps of how transactions and smart contracts work. This means I have now finished step one of https://medium.com/@ConsenSys/a-101-noob-intro-to-programming-smart-contracts-on-ethereum-695d15c1dab4, the first alinea.
So much more to go. I’ll keep you updated.