Showing posts with label Ethereum. Show all posts
Showing posts with label Ethereum. Show all posts
Wednesday, February 20, 2019
More on Ethereum
Ethereum is a highly successful public blockchain by adoption, mindshare, and the number of developers working on Ethereum smart contracts and decentralised apps. Vitalik Buterin described Ethereum as a concept in a white paper in late 2013. This concept was developed by Dr Gavin Wood who published a technical yellow paper in April 2014. Since then, the development of Ethereum’s software has been managed by a community of developers. A crowdsale took place in July and August 2014 to fund development, and Ethereum’s live blockchain was launched on 30 July 2015. You can see the very first block here: https://etherscan.io/block/0.
The development team was funded by an online sale of ETH tokens during July to August 2014 where people could buy ETH tokens by paying in Bitcoin. Early investors received 2,000 ETH per BTC, and this was gradually reduced to 1,337 ETH per BTC over the course of about a month, to encourage investors to invest early. Crowdsale participants sent bitcoins to a Bitcoin address and received an Ethereum wallet containing the number of ETH bought. A little over 60m ETH was sold this way for more than 31,500 BTC, worth about US$18m at the time. An additional 20% (12m ETH) were created to fund development and the Ethereum Foundation.
Vitalik Buterin, known as the creator of Ethereum, sits on the council of the foundation, and the foundation has a great deal of influence into the roadmap of Ethereum. In theory, Ethereum participants (miners, bookkeepers) don’t have to implement any software changes made by the
Foundation, but in practice they do. The Ethereum Enterprise Alliance is a non-profit industry group
launched in March 2017 whose goal seems to be to make Ethereum suitable for enterprise use.
Like Bitcoin, the price of Ether has also been through ups and downs. Ethereum’s crowdsale was at a price of 2,000 ETH to 1 BTC, and at the time (July-Aug 2014), 1 BTC was worth about $500, making 1 ETH =$0.25. At its peak in early 2018, the price of ETH almost touched $1,500. So, to date, Ether has been a highly successful cryptocurrency in terms of price.
Compared to Bitcoin, Ethereum has an additional use case. Its token ETH is often used in ICOs. A company that runs an ICO will create a smart contract on Ethereum which will automatically create tokens and assign them to Ethereum addresses who have sent Ether to a related smart contract. This means you can run an automated ICO on Ethereum, as long as investors pay in ETH or another token recorded on Ethereum.
Other Parts to Ethereum
Computers need to be able to calculate, store data, and communicate. For Ethereum to realise its vision as an unstoppable, censorship resistant, self-sustaining, decentralised, ‘world’ computer, it needs to be able to do those three things in an efficient and robust way. The Ethereum Virtual
Machine is just one component of the whole, the element which does the decentralised calculations.
Swarm is another component. This is for peer-to-peer file sharing, similar to BitTorrent, but incentivised with micropayments of ETH. Files are split into chunks, distributed and stored with participating volunteers.These nodes that store and serve the chunks are compensated with ETH
from those storing and retrieving the data. Whisper is an encrypted messaging protocol that allows nodes to send messages directly to each other in a secure way and that also hides the sender and receiver from third party snoopers.
Smart contracts mean different things depending on the blockchain platform. Ethereum smart contracts are short computer programs that are stored on Ethereum’s blockchain, replicated across all the nodes, and are available for anyone to inspect. There are two steps that are performed separately: uploading the smart contract to Ethereum’s blockchain; making the smart contract run.
You upload a smart contract by sending the code to miners in a special transaction. If the transaction is successfully processed, the smart contract will then exist at a specific address on Ethereum’s blockchain. You may then make it run by creating a transaction that says ‘Please run the smart contract found at address x’.
Once a contract has been uploaded, it behaves a bit like a jukebox. When you want to run it, you create a transaction pointing to the contract and supply whatever information the contract expects. You pay gas to the miner to run it. As part of the mining process, each miner will execute the
transaction, which involves running the smart contract.
The miner who successfully wins the proof-of-work challenge will publish the winning block to the rest of the network. The other nodes will validate the block, add the block to their own blockchains, and process the transactions, including running the smart contracts. This is how Ethereum’s blockchain gets updated, and how the state of the EVMs on each node’s machine is synchronised.
Ethereum smart contracts are described, ‘Turing complete’. This means that they are fully functional and can perform any computation that can be done in any other programming language.
Ethereum Accounts, Ether tokens
Bitcoin uses the word address to describe accounts. Ethereum uses the word account but technically they are also addresses. The words seem to be more interchangeable with Ethereum. There are two types of Ethereum accounts: accounts that only store ETH; accounts that contain smart contracts. Accounts that only store ETH are similar to Bitcoin addresses and are sometimes known as Externally Owned Accounts. You make payments from these accounts by signing transactions with the appropriate private key. Accounts that contain smart contracts are activated by a transaction sending ETH into it. Once the smart contract has been uploaded it sits there at an address, waiting to be used.
The issuance of Ether tokens is a bit more complicated than Bitcoin. The number of ETH in existence are: Pre-mine + Block rewards + Uncle rewards. Around 72 million ETH were created for the crowdsale in July/Aug 2014. This is sometimes called a ‘pre-mine’ as they were just written in rather than mined through proof-of-work hashing. These were distributed to initial supporters of the project and to the project team itself. It was decided that after the initial crowdsale, future ETH generation would be capped at 25% of the pre-mine total, i.e., no more than 18m ETH could be mined per year. Originally, each block mined created five fresh ETH as the block reward. Due to concerns about oversupply, this was reduced to 3 ETH, in a set of changes to the protocol called the Byzantium update, in October 2017 (block 4,370,000).
Some blocks are mined but do not form part of the main blockchain. In Bitcoin, these are called ‘orphans’ and are entirely discarded, and the miner of the orphaned block receives no rewards. In Ethereum, these discarded blocks are called ‘uncles’ and can be referenced by later blocks. If a later block references an uncle, the miner of the uncle gets some ETH. This is called the ‘uncle’ reward. The miner of the later block referencing the uncle also gets an additional small reward called an ‘uncle referencing’ reward.
The uncle reward used to be 4.375 ETH (7/8th of the full 5 ETH reward). It was reduced in the Byzantium upgrade to 0.625-2.625 ETH. The biggest difference between ETH and BTC token generation is that BTC generation halves approximately every 4 years and has a planned finite cap, whereas ETH generation continues to be generated at a constant number every year indefinitely. Like any other parameter or rule, however, this rule is subject to ongoing debate and can be changed if the majority of the Ethereum network agrees.
The Ethereum community hasn’t yet come to agreement about what happens to the rate of issue when Ethereum moves from proof-of-work to proof-of-stake. Some argue that perhaps the rate at which ETH is created should decrease, as the value will not have to subsidise competitive electricity usage.
In Bitcoin, the miner of a block receives the block reward (new BTC), plus transaction fees for transactions mined (existing BTC). In Ethereum, the miner of a block receives the block and uncle referencing rewards (new ETH), plus mining fees (gas amount x gas price) from transactions and
contracts that were run during the block.
Tuesday, February 19, 2019
How is Ethereum Different from Bitcoin?
When you download and run the Ethereum software, it creates and starts a segregated virtual computer on your machine called an ‘Ethereum Virtual Machine’ (EVM). This EVM processes all the Ethereum transactions and blocks, and keeps track of all the account balances and results of the smart contracts. Each node on the Ethereum network runs the same EVM and processes the same data, resulting in them all having the same view of the world. Ethereum can be described as a replicated state machine because all of the nodes running Ethereum are coming to consensus about the state of the Ethereum Virtual Machine.
Compared with Bitcoin’s primitive scripting language, the code that can be deployed in Ethereum and run as smart contracts is more advanced and approachable for developers. You can think of smart contracts as pieces of code run by all the nodes in Ethereum’s Virtual Machine. In Bitcoin, you can add a small amount of BTC as a transaction fee that goes to the miner who successfully mines the block. This compensates the miner for checking the validity of the transaction and including it in the block they are mining. Likewise, in Ethereum, you can add a small amount of ETH as a mining fee which goes to the miner who successfully mines the block.
The complication with Ethereum is that there are more types of transactions. Different transaction types have different computational complexities. For example, a transaction performing a simple ETH payment is less complex than a transaction to upload or run a smart contract. Therefore, Ethereum has a concept of ‘gas’ which is a sort of price list, based on the computational complexity of the different types of operation you are instructing the miners to make in your transaction.
Operations include searching for data, retrieving it, making calculations, storing data, and making changes to the ledger.
A basic transfer of ETH from one account to another uses 21,000 gas. Uploading and running smart contracts uses more gas depending on their complexity. When you submit an Ethereum transaction, you specify a gas price (how much ETH you are willing to pay per gas used) and a gas limit (the maximum amount of gas you will let the transaction use). Mining fee (in ETH) = gas price (in ETH per gas) x gas consumed (in gas). The gas price is the amount of ETH you are prepared to pay per unit of gas for the transaction to be processed. As with Bitcoin transaction fees, this is a competitive market, and in general the busier the network the higher the gas price people are willing to pay. In times of great demand gas, prices spike.
The gas limit you set provides a ceiling for how much gas you are prepared for a transaction to consume. This limit protects you from over-spending on mining fees and you know that the maximum mining fee will be gas limit x gas price. This stops you over-paying if you accidentally
submitted a very complex transaction that you thought was simple.
Analogy time: driving your car 10km will use up a certain amount of fuel. If you run out of fuel, your car will stop before reaching the destination. The price of fuel is dependent on market conditions and can go up and down, but the price of fuel bears no relation to how far you may drive your car with it. Gas in Ethereum is similar. When you submit an Ethereum transaction, you specify how much gas you’re prepared to spend on making the transaction ‘work’ (this is the gas limit), and how much ETH you are prepared to pay the miner per unit of gas (this is the gas price). This results in a total amount of ETH you’re prepared to pay for the transaction to be processed.
The miner will execute the transaction and will charge you the amount of gas taken, multiplied by the gas price you specified. As with Bitcoin, the mining fee is up to you, and you need to bear in mind that you’re competing with other transactions which may have set a higher gas price. For example, a basic transaction of a transfer of ETH from one account to another uses 21,000 gas, so you can set the gas limit for this kind of transaction to 21,000, or higher; but it will only use 21,000 gas. If you set the gas limit below the amount of gas it takes to process the transaction, the transaction will fail and you will not be refunded your mining fee. This is like trying to make a journey with insufficient fuel in your tank; the fuel will be used, but you will not get to your destination.
Just like one dollar can be split into 100 cents, 1 BTC can be split into 100,000,000 Satoshi, and Ethereum too has its own unit naming convention. The smallest unit is a Wei and there are
1,000,000,000,000,000,000 of them per ETH. There are also some other intermediate names:
Finney, Szabo, Shannon, Lovelace, Babbage, Ada - all named after people who made significant contributions to fields related to cryptocurrencies or networks. Wei and Ether are the two most common denominations. Wei is usually used for gas price (a gas price of 2-50 Giga-Wei per gas is common, where 1 GWei is 1,000,000,000 Wei).
In Ethereum the time between blocks is around 14 seconds, compared with Bitcoin’s ~10 minutes. This means that, on average, if you made a Bitcoin transaction and an Ethereum transaction, the Ethereum transaction would be recorded into Ethereum’s blockchain faster than the Bitcoin transaction into Bitcoin’s blockchain. You could say Bitcoin writes to its database roughly every 10 minutes, whereas Ethereum writes to its database roughly every 14 seconds.
Currently, Bitcoin’s blocks are a little under 1MB in size whereas most Ethereum blocks are about 15-20kb in size. However, we should not compare blocks by the amount of data in them: while Bitcoin’s maximum block size is specified in bytes, Ethereum’s block size is based on complexity of contracts being run. It is known as a gas limit per block, and the maximum is allowed to vary slightly from block to block. So whereas Bitcoin’s block size limit is based on amount of data,
Ethereum’s block size limit is based on computational complexity.
Currently, the maximum block size in Ethereum is around 8 million gas. Basic transactions, or payments of ETH from one account to another (i.e., uploading or invoking a smart contract), have a complexity of 21,000 gas; so you can fit around 380 of those basic transactions into a block
(8,000,000 / 21,000). In Bitcoin, you currently get around 1,500-2,000 basic transactions in a 1MB block.
Because Ethereum’s rate of block generation is much higher than Bitcoin’s (250 blocks per hour on Ethereum vs six blocks per hour on Bitcoin), the rate of ‘block clashes’ increases. Multiple valid blocks can get created at almost the same time, but only one of them can make it into the main chain. The other one ‘loses,’ and the data in them is not considered part of the main ledger, even if the transactions are technically valid.
In Bitcoin, these non-mainchain blocks are called orphans, or orphaned blocks, and they do not form part of the main chain in any way and are never referenced again by any subsequent blocks. In Ethereum they are called uncles. Uncles can be referenced by a few of the subsequent blocks and although the data in them is not used, the slightly smaller reward for mining them is still valid.
Transactions that end up in orphaned blocks simply end up being remined on the main chain. They don’t cost the user any more gas, because the transaction in the orphaned block is treated as if it was never processed.
How is Ethereum Similar to Bitcoin?
Ethereum’s token is called Ether, shortened to ETH. This is a cryptocurrency that can be traded for other cryptocurrencies or other sovereign currencies, just like BTC. ETH ownership is tracked on
the Ethereum blockchain, just like BTC ownership is tracked on Bitcoin’s blockchain.
Like Bitcoin, Ethereum has a blockchain, which contains blocks of data (pure ETH payments as well as smart contracts). The blocks are mined by some participants and distributed to other participants who validate them. You can explore this blockchain on etherscan.io. Like Bitcoin, Ethereum blocks form a chain by referring to the hash of the previous block.
Like Bitcoin, the main Ethereum network is a public, permissionless network. Anyone can download or write some software to connect to the network and start creating transactions and smart contracts, validating them, and mining blocks without needing to log in or sign up with any other organisation.
When people talk about Ethereum they usually mean the main public permissionless version of the network. However, like Bitcoin, you can take Ethereum software, modify it slightly, and create private networks that are not connected to the main public network. The private tokens and smart contracts won’t be compatible with the public tokens though, just like private Bitcoin networks.
Like Bitcoin, mining participants create valid blocks by spending electricity to find solutions to a mathematical challenge. Ethereum’s PoW maths challenge, called Ethash, works slightly differently from Bitcoin’s, and allows more common hardware to be used. It is deliberately designed to reduce the efficiency edge of specialised chips called ASICs, which are common in Bitcoin mining. Commodity hardware is allowed to compete efficiently, and this allows for a greater decentralisation of miners. In practice though, specialised hardware has been created and so most blocks in Ethereum are created by one of a small group of miners.
On Ethereum’s roadmap there is a plan to move from electricity-expensive, proof-of-work mining, to a more energy-efficient, proof-of-stake mining protocol called Casper in a future release of the Ethereum software called Serenity. Proof-of-stake is a mining protocol in which your chance of creating a valid block is proportional to the number of coins (ETH) in your mining wallet - contrast this to proof-of-work, where your chance of creating a valid block is proportional to the amount of
computational cycles your hardware can crunch through.
How might this impact the community? For starters, this would dramatically reduce the energy footprint of the cryptocurrency. Miners will no longer need to consume electricity competitively in order to win blocks. On the other hand, some people think that proof-of-stake is less democratic, because those who already have accumulated a lot of ETH will have a higher chance of winning more blocks. So, the argument goes, new money will flow towards the wealthy, increasing the Gini
coefficient of Ethereum holders.
There are flaws in the ‘less democratic’ argument. With proof-of-work the high capital costs and expertise required mean that only a very small minority of people can actually make money mining, so it is not actually that democratic. Whereas with proof-of-stake, every ETH has an identical
chance of winning a block, so you can get started with much less capital. Think of it as an interest rate: if you have more money you get more interest, but at least those with small amounts of money can still get interest. Reducing the negative externalities of pollution caused by proof-of-work is a decent and honourable goal.
What is Ethereum?
The vision of Ethereum is to create an unstoppable, censorship resistant, self-sustaining, decentralised, world computer. To achieve this, Ethereum builds on the concepts we saw with Bitcoin. If you consider Bitcoin as trustless validation and distributed storage of (transaction) data,
Ethereum is trustless validation and distributed storage and processing of data and logic. Ethereum has a public blockchain running on 15,000 computers and the token on the blockchain is called Ether, currently the second most popular cryptocurrency.
Like Bitcoin, Ethereum is also a bunch of protocols written out as code which is run as Ethereum software which creates Ethereum transactions containing data about Ether coins (ETH) recorded on Ethereum’s blockchain. In contrast with Bitcoin, Ethereum transactions can contain more than just payment data, and the nodes in Ethereum are capable of validating and processing much more than simple payments.
On Ethereum, you can submit transactions that create smart contracts - small bits of general purpose logic that are stored on Ethereum’s blockchain on all of the Ethereum nodes. These smart contracts can be invoked by sending Ether to them. This is a bit like deploying a juke machine, then putting coins in to play music. When a smart contract is invoked, all the Ethereum nodes run the code and update their ledgers with the results. These transactions and smart contracts are run by all participants using a sort of operating system called a ‘Ethereum Virtual Machine’.
Ethereum’s blockchain can be interrogated using websites like etherscan.io. As with Bitcoin, there are also forks of the main Ethereum, such as Ethereum Classic, which is also a public blockchain. Each fork has a separate coin (Ethereum’s coin is denoted ETH whereas Ethereum Classic’s coin is denoted ETC). The forks have a shared history with Ethereum up to a certain point in time, after which the blockchains differ. Ethereum’s code can also be run as a private network, starting a new
blockchain with limited participants.
To participate in the Ethereum network, you can download some software called an Ethereum client, or you can write some yourself if you have the patience. Just like BitTorrent or Bitcoin, the Ethereum client will connect over the internet to other people’s computers running similar client software and start downloading the Ethereum blockchain from them to catch up with the latest state of the blockchain. It will also independently validate that each block conforms to the Ethereum protocol rules.
What does the Ethereum client software do? You can use it to: connect to the Ethereum network;
validate transactions and blocks; create new transactions and smart contracts; run smart contracts; mine for new blocks. Your computer becomes a ‘node’ on the network, running an Ethereum Virtual Machine, and behaves equivalently to all the other nodes. Remember in a peer-to-peer network there is no ‘master’ server and each computer is equivalent in status to any other.
Thursday, February 14, 2019
What is Blockchain Technology?
You will see the phrase ‘blockchain technology,’ or commonly just ‘blockchain,’ in many different contexts, and it can be confusing because different people use the words to mean different things.
ETH is the Ethereum blockchain, a reference to the public Ethereum transaction database - but you can also create private Ethereum blockchains by simply running some node software on some
machines and having them connect to each other. Your private Ethereum network will create its own blockchain, and the miners will mine ETH just like in the public network. Your private ETH will not be compatible with the public ETH because your private Ethereum network has a different history from the public version.
All blockchains are distributed ledgers, but you can have distributed ledgers that don’t have blocks of data chained together and broadcast to all participants. Blockchain technologies are the rules or standards for how a ledger is created and maintained. Different technologies have different rules for participation, different network rules, different specifications for how to create transactions, different methods of storing data, and different consensus mechanisms. When a network is created, the blockchain or ledger of record is initially empty of transactions.
Some example blockchain technologies are: Bitcoin, Ethereum, NXT, Corda, Fabric, and Quorum.
Some blockchain technologies operate one way, others operate a slightly different way and you can have multiple instances of any blockchain technology, in separate ledgers.
Tuesday, February 12, 2019
Notable Cryptocurrencies and Tokens
There are many cryptocurrencies that either exist as blockchains in themselves or as tokens recorded in smart contracts on other blockchains, usually on Ethereum’s public chain. Onchainfx.com and Coinmarketcap.com do a good job in cataloguing these if they trade over a certain amount of volume per day.
Currency tokens (Primarily used as Money/Store of Value):
• Bitcoin (BTC) - the original cryptocurrency and store of value, created by pseudonymous Satoshi Nakamoto, launched in 2009.
• Ripple (XRP) - a token used to move value across the Ripple network, designed as a currency that was initially described to compete against banks then to be used by banks to improve foreign exchange and international payments. Created in 2012 by OpenCoin (rebranded to Ripple Inc in 2015).
• Litecoin (LTC) - an early Bitcoin clone with faster blocks and a different mining proof-of-work. Called ‘Silver to Bitcoin’s Gold’ by its founder Charlie Lee who announced that he sold all of his Litecoin in Dec 2017.
• Zcash (ZEC) - a privacy focused coin using advanced cryptography called zero knowledge proofs to shield transaction data. Created by Zooko Wilcox-O’Hearn in 2016.
• Dash (DASH) - another privacy focused coin, created as XCoin in 2014 by Evan Duffield, renamed Darkcoin, renamed DASH.
• Monero (XMR) - yet another privacy focused coin, uses ring-signatures to obscure payer and recipient addresses. Launched in 2014.
Platform tokens (i.e. those used as gas to power smart contracts):
• Ethereum (ETH) - the original smart contract enabled blockchain platform, created by a Vitalik Buterin and launched in 2015.
• Ethereum Classic (ETC) - fork of Ethereum which didn’t bail out DAO investors. Proponents like immutability. Forked from Ethereum in July 2016.
• New Economy Movement (NEM) - a blockchain with ‘smart assets’.
• EOS (EOS) - a new blockchain structure designed to be more scalable than Ethereum.
Utility tokens (Built for Specific-Use Networks):
• Augur (REP) - a token used for betting on things on a ‘prediction market,’ i.e. a betting platform. Launched in 2015 from San Francisco.
• Siacoin (SC) - a token used for paying for encrypted decentralised file storage. Launched in 2015.
• Golem (GNT) - a token used for paying for decentralised computations & calculations. Launched in 2016.
• Gnosis (GNO) - another prediction market coin. Launched in 2016 from Germany.
Brand tokens (Specific-Use on Single Entity’s Network):
• Basic Attention Token (BAT) - Token used to make micropayments in a web browser called Brave. Launched in 2017.
• Civic (CVC) - Something to do with identity verification on the blockchain. I hope it solves the problem of having too many passwords. Launched in 2017.
• Steem (STEEM) - Token used for making micropayments on social media and forum sites. Launched in 2016.
This is just a short list of the many tokens and platforms that exist today.
Subscribe to:
Posts (Atom)