Expo offers traders to practice shorting Ethereum with a mechanism of Margin Trading. An open source platform powered by dYdX protocol has launched the trustless method of creating short and leveraged positions for Ethereum.
Expo functions as a “Short Ethereum” token, which is pegged to a short position on Ethereum. The Short Ethereum token is powered by the dYdX protocol, which, in turn, is built upon the 0x and Ethereum projects.
Liquidity is infused in the Expo system by dYdX lending partners, who can earn interest by securing collateral into smart contracts that could also provide backing for ETH loans. The collateral is automatically sourced from decentralized exchanges. The Expo platform is planning to launch some other margin trading tokens including leveraged tokens
Ethereum community is undergoing an overhaul while there focus on decentralization and security, they are keen to scale up the Ethereum network to practical levels, where all DAPPS have a smooth sail. Announced by Ethereum’s co-founder Vitalik Buterin in April 2018, Sharding is a method of increasing the number of transactions that a blockchain can process helping in maintaining gas price and reducing transaction confirmation time. Let’s explore in detail what Sharding is? When is Sharding being implemented? And How Ethereum Sharding works?
What is Sharding?
Sharding is not a new concept and existed even before Blockchain came into existence and applied to any database. As serachcloudcomputing defines – Sharding is a type of horizontal database partitioning that separates very large databases into smaller, faster, more easily managed parts called data shards. The word shard means a small part of a whole.
Yes, its Horizontal Partitioning and not vertical partitioning. Let’s pick an example to know it better –
In case we partition the table vertically[splitting into two] it results in
And in case we split horizontally
So on splitting the tables vertically, it creates two new tables that need more space when compared to splitting horizontally by grouping similar one together.
Well, that looks like a simple partitioning of the database? Now imagine this partitioning happening on a decentralized, peer-to-peer network that gets constant updates globally. Hence, Ethereum Sharding differs a bit…let’s dive deep to know more.
What is Ethereum Sharding?
As the man, Vitalik Buterin himself quotes –
“Imagine that Ethereum has been split into thousands of islands. Each island can do its own thing. Each of the islands has its own unique features and everyone belonging on that island, i.e., the accounts, can interact with each other AND they can freely indulge in all its features. If they want to contact other islands, they will have to use some sort of protocol.”
Blockchain that is a distributed, decentralized peer-to-peer network consists of a series of nodes. At any given point each node of a blockchain network like Bitcoin or Ethereum stores all states of the network and processes all of the transactions, that helps in high-level security but legitimate scaling issues.
Nodes on such network stores and processes every information/transaction, leading to network straining. With shards in place, one could group similar sets of nodes into one shards that helps in faster processing of the transaction for that specific shard. Basically, you are allowing the system to run multiple transactions parallelly, thereby increasing throughput.
A laymen example could be a “SCHOOL,” where although all students [as nodes] are under same network[ABC School] they are governed by section and class they belong, which have their own set of rules and protocols.
Technically, Ethereum Sharding would be splitting the state [a set of information that represents the “current state” of a system] and history[an ordered list of all transactions that have taken place since genesis] up into
K= O(n/c) partitions
referred to as shards
Where K = shard,
n= size of the ecosystem[in abstract form] assuming that transaction load, state size, and the market cap of a cryptocurrency are all proportional to n.
c= size of computational resources, and
O= Big O notation characterizes functions according to their growth rates.
Picking an example, on Ethereum network a sharding scheme
All addresses starting with 0x00
All addresses starting with 0x01
All addresses starting with 0x02
Please note that each shard would have its own transaction history and also the effect of transactions in a shard ‘k’ would be limited to the state of shard ‘k.’
For example, if you have a multi-asset blockchain, the sharding scheme could be where each shard stores the processes and balances of the transaction associated with one specific asset. Making it more complicated, could be the ability of one shard to trigger events on another shard referring as cross-shard communication capability.
How Would Sharding Work in Ethereum?
Before diving into “How” let’s get familiar with the terminologies –
At any given point in time, the complete set of information, i.e., current balances, nonces, smart contract code, transactions, etc. that describes a system. Each transaction initiated could bring the network into a new state.
A set of instructions/actions issued by the individual to change the state of the system.
Data structure concept that helps in organizing large data sets via cryptographic hashes.
A result/produce of a transaction that is kept in a Merkle tree but not stored in the state of a system. For example, Smart contracts logs in Ethereum are kept as receipts in Merkle Trees.
A shard specific block. Just imagine that the transactions are wrapped in a “collation”; similar to block.
The nodes that accept on shard k, that could depend on protocol whether proposers choose which K or are randomly assigned some k.
A collation has a collation header, a short message of the form “This is a collation of blobs on shard k, the parent collation is 0x7f1e74, and the Merkle root of the blobs is 0x3f98ea.”
The agents that could act as both a proposer and collator may be referred to as prolators.
The main chain exists with a role limited to storing collation headers for all shards.
For a complete list of terminology, please refer here.
Sharding would partition all network computational resources into shards, so that a node doesn’t have to process every transaction in the history of the blockchain, in order to make a new transaction or otherwise participate in securing and using Ethereum; instead a node can just participate in a single shard, or more if it so chooses.
Here are the different phases that would help Sharding implemented on Ethereum network. However, this is still under research and subject to change.
Phase 1: Basic sharding without EVM[ Ethereum Virtual Machine] – A smart contract will exist on the main chain, called the Validator manager contract, which manages how data and transactions in shards are accepted as valid by the main chain, via notaries voting on the validity and data availability of collations (collections of data and transactions, analogous to blocks, but where they occur more frequently than blocks) in shards, and proposers proposing blobs (analogous to transactions but without execution in phase 1) which are collected into collations.
Phase 2: EVM state transition function – This phase would have
Full nodes only, e., fully download every collation of every shard, as well as the main chain, fully verifying everything.
Asynchronous cross-contract calls only
Account abstraction – In Ethereum there are two types of contracts – external accounts [that are controlled by private keys] and Contract account [ that are controlled by code deployed on the blockchain]. Account Abstraction would be a process to make the two account similar and also modify the logic controlling external accounts to make them more flexible. So with account abstraction, all accounts are contracts. Or forwarding contracts, where they receive an incoming message, they perform some action [ signature and nounce checks] and forward it to intended recipients with the specified data.
Ethereum flavored WebAssembly (eWASM)- While a WebAssembly (or Wasm as a contraction) is a new, portable, size- and load-time-efficient format. WebAssembly aims to execute at native speed by taking advantage of common hardware capabilities available on a wide range of platforms. WebAssembly is currently being designed as an open standard by a W3C Community Group. Whereas eWASM is a restricted subset of WASM to be used for contracts in Ethereum. For more details about the project, please click here
Archive accumulators – as quoted in ethresear – Ethereum currently uses an accumulator (the Patricia-Merkle trie) which is designed for the state. There’s an alternative accumulator design which is an excellent match with the stateless client model, but it works for history only. By separating history and state, and encouraging the use of history versus state, we can make the stateless client model more practical and scalable than initially thought.
Storage rent – Adding a “rent fees” may help in moving out the data from blockchain that may help in load balancing. An idea tossed by Vitalik Buterin, whereby users would be asked to pay to use the network based on how long they’d like their data to remain accessible on the blockchain.
Bandwidth fees – Within a blockchain network, the bandwidth fees aim to establish fair pricing for both providers and consumers of blockchain resources. In Ethereum transactions three base resources have been identified – computation, network, and storage. Amongst these, computation currently enjoys the most robust such mechanism, with a two-sided gas market between miners and clients and relatively trustless derivative instruments enabling more advanced forms of speculation and risk With a bandwidth fees idea, the community is seeking to incentivize the p2p network layer.
Phase 3: Light client state protocol
Phase 4: Cross-shard transactions:
Phase 5: Tight coupling with the main chain security:
Phase 6: Super-quadratic or exponential sharding
Also, note that this is just an explanation to Phase 1 of Quadratic Sharding, Phase 2, 3,4,5 and super quadratic sharding [Ethereum 3.0 ]are currently out of scope.
Quadratic Sharding Phase 1
On implementing Sharding onto an Ethereum network, it would divide/group the nodes into smaller subsets that would have an ability to process a particular set of transaction’s, and also updating the global state of the network. Ethereum breaks down the network into specific shards. Each shard is assigned a specific group of transactions that are determined by grouping specific accounts (including smart contracts) into a shard. Each transaction group has a header and a body that consist of the following.
The shard ID of the transaction group
State of the Merkle root of the shard before and after transactions added
All of the transactions that belong to the transaction group that is part of the specific shard.
Transaction Group Root
It is the Merkle root of all of the transaction groups from the specific shards for that block of transactions
Each Block on Ethereum
contains both a state root and the transaction group root.
So how a Global state update happens with shards in place?
A transaction that occurs within a specific shard, between accounts native to that shard is verified and state of the network changes, updating the storage, account balances, etc. Now comes the task to verify whether the transaction group is valid or not. For this to happen, the pre-state root of the transaction group should match with the shard root in the global state. Once the match occurs, the transaction group is validated, and that updates the global state via a particular shard ID state root.
And where does VMC fit in?
In the Main Blockchain where we publish a contract called as Validator Manager Contract [VMC] with an internal PoS[Proof Of Stake] consensus. The VMC also keeps a record of the shards. During each cycle, the VMC picks a random validator that has the right to create the next block on each shard.
Each shard has a certain number of blocks and transactions, that would NOT BE replicated to the main chain but would be replicated one level down. At each shard level, we have nodes referred to as Collations or a group of transactions, that has a collation header that would be pushed into the VMC. But all the actual transactions happening in the shards, shard states, shard collations would go off-chain.
So the main chain would only have collation headers, and VMC who need to keep track of these PoS signed block header to track the state roots of each shard. Also, the other validators of the shard have to watch VMC all the time for getting latest status and then verify if the transactions are valid too.
In this whole process, VMC for each shard is acting as a light client.
100,000. The number of refugees served by the World Food Programme’s Ethereum Experiment in Jordan.
16,678. The number of live Ethereum nodes.
1,000,000+. The number of downloaded MetaMask Ethereum browser extensions.
1,552 decentralized applications currently launched on Ethereum.
35,000,000+ unique addresses on the Ethereum blockchain.
30x more Ethereum developers than the next blockchain community.
And now some bad news –
May 20, 2018– Ethereum Network Congestion Doubles Gas Fees as Game dApps Capture $7.5M in 24 Hours
July 03, 2018 – Ethereum (ETH) Network Congested Again, As Market Prices Revive
While good news points to the fact that Ethereum is a treasured network, helping people and snowballing, the bad news highlights the fact that an increase in user base, leads to congestion resulting in price hikes. A quick glance, on major Ethereum congestion issues, in last six months we would find it was mostly because of the transaction of Ethereum based Dapps that affected the transaction throughput hence caused congestion. Bottomline – Ethereum is facing scalability issue. Fortunately, the community is working hard to launch two new improvements Plasma and Sharding that could scale up Ethereum network to support tens of thousands of transactions per second. Let’s explore it in detail –
What is Ethereum Scalability Problem?
Every website/software or network intends to support as many users as it can, but unfortunately, the architecture does not support infinite users, Ethereum also faces the same issue. Due to a hard-coded limit on computation per block, the Ethereum blockchain network supports ~ 15 tps[transaction per second]. Now when a new release of Dapps is initiated, the network is flooded with transactions, but due to its architecture, it could only process handful, thereby causing delays and congestion on the network. The technical glitch has been under discussion by community and researchers.
Why is scaling so difficult?
Ethereum blockchain by design uses a combination of software tricks and incentives, which ensures to precisely record who owns what with a central authority. Ethereum is also dependent on a network of nodes, where each node stores the transaction history [entire], the current account balances, storage, and contracts. Overall it is a cumbersome task, leading to an increase in transactions and size with each new block.
Now, the concern is, to strike a balance in finding the key[to validate the transcation] and also grow the number of users [like to purchase stuff online or play games]
Rising the block size could be an option, but then it would throw individuals off the network as not many individuals could fund to facilitate large data nodes. However, the irony is that running a full is the best way to achieve benefits of security and privacy. But full nodes would limit the number of people that could validate the transactions.
What is Plasma?
In our last post, we mentioned how Bitcoin Scalability Problem could be resolved by a concept called as Bitcoin Lightning Network, similar to the technique is Plasma where the transaction is carried off-chain, and root-chain is responsible for maintaining security and privacy. In the current state, Ethereum, chain of blocks performs computation, storing, transferring and even processing of data, channeling some of the tasks onto a different channel, i.e., off-chaining could help to reduce the load but assures the pros of a decentralized, immutable and distributed network.
Plasma blockchains are a chain within a blockchain. So there would be a root chain[e.g., Ethereum], linked to it would be a child-chain [off-chain, Plasma] that could again spawn its child-chain and this process could continue. So Plasma is many branching blockchains linked to one root blockchain. Plasma is also known as Layer 2 solutions because it is built “on top of” the Ethereum main-chain. It does not require changes to the base level protocol — instead, it exists merely as smart contracts on Ethereum that interact with off-chain software.
The smart contracts are still handled by Ethereum network, the only change that would be seen is the broadcasting of the completed transactions to the public Ethereum chain. So, for example, there are two parties
Transferring 5$ to B
Transferring 10$ to A
Transferring 25$ to B
Transferred 20$ to A
One could think of a TREE structure that at a set frequency communicates/transfers information with its root-chain.
With off-loading the child-chain gets an added advantage to performing complex computation, helping developers to launch innovative dapps and get more users. One of the most significant advantages of the Plasma chain is that it could run a faster speed, lower cost and all of the data need not be replicated across the entire network.
How does Plasma work?
Let’s pick a conceptual example to know How Plasma works?
Suppose Mike and Alan are keen on playing chess, where the winner receives 5ETH. There could be two possible ways to implement it on a blockchain network –
The plain and simple way of implementing this would be to create a smart contract on root chain[i.e., ethereum], feed the rules, logic, and a track of players moves. Every time Mike and Alan make a move, a transaction is sent out to the contract. And when one of them wins, the contract pays 5ETH to the winner.
By design and execution, this method would work but would be slow and inefficient. For each transaction made they need to pay the gas cost and wait before making the next move until the blocks are mined. Also, imagine if the number of players increases just recently when crypto kitties was launched, and it caused congestion to the network.
Going Plasma Way
On the root-chain, i.e., Ethereum main chain we create a set of smart contracts of our Plasma child-chain. The Plasma root contains the state transition rules [rules, logic, and track of players move, records hashes] and acts as a bridge, which allows players to move assets between the root-chain and the child chain.
Now, is the time to create child-chain. The child chain could have its consensus algorithm and depending upon the consensus it would have validators [i.e., one who validates blocks that the transaction is true or not]. Once the child-chain is active, the validators could schedule a periodic commitment to the root. That means I commit that the most recent block in the child-chain is X”. These commitments are recorded on-chain in the Plasma root as a proof of what has happened in the child-chain.
We have in place the Plasma root; the child chain, now is the time to create the essential components of our game. Here is the twist – the basic components of the game could be built on the Ethereum main chain, and via the Plasma root could be moved onto the child chain, which means Plasma allows you to scale interactions with blockchain-based digital assets, but those assets should be created first on the Ethereum-main chain. Once that is done, you could deploy them onto the child chain that would have the components, logic, rules.
While players interact over a child chain, without even interacting with the main chain that leads to a much smaller node to process transactions, lowering fees and faster processing.
Has Plasma been Implemented?
Plasma is in a very nascent phase, while Vitalik research of Minimum viable product [MVP] has the details, the work is still in progress. One of firm OmiseGo in Jan 2018 did launch the information on how they are building Plasma. You can explore them here.
Plasma – The Questions Unanswered
Could implementation of Plasma delay a vital transaction to be added to Ethereum main network
The cost involved in running a sidechain? Could this have any effect of the gas price?
The deployment and execution plan of Plasma onto Ethereum network?
Would Dapps start with Plasma initiative or is it Ethereum?
The role of miners in case of child chain floating around?
With some unanswered question, we do hope Plasma helps Ethereum in scaling up. However, only time will tell….
Our next article would talk about Sharding and the benefits it has for Ethereum. Stay tuned.
MetaMask has been delisted from the Chrome Web Store. Metamask announced on their official twitter handle.
We are unsure of why this is the case and we will update everyone as we get more information. All other browsers are unaffected.
Metamask is one of the most popular ethereum wallets used by millions of users to keep their funds secure with complete access to their private key. MetaMask allows users to run Ethereum dApps right in their browser without running a full Ethereum node.
Users who have already installed Metamask on their chrome browser aren’t affected by this news but new users won’t be able to install Metamask. In the meanwhile, please be careful with any other phishing websites or plugins claiming to be Metamask on Chrome. We will keep you posted on any new updates.
Nuo is a decentralised and transparent crypto banking platform. It acts as a blockchain powered financial control centre to store, spend, borrow and grow your crypto-currencies. Install the android app or try out our crypto backed loans platform.
Ethereum with its exceptional features like programmability, flexibility, synergy, modularity, and philosophy of humility is aiming to rule the decentralized world. While the founder Vitalik Buterin has an ambitious roadmap to strengthen the community further, let’s take a closer look and explore what’s in store with Ethereum roadmap –
Vitalik Buterin, the Founder of Ethereum, stresses that to push Ethereum to the next level – four issues need to be resolved – consensus safety, smart contract safety, privacy and the most important of all – SCALABILITY.
Here are the different stages worked on to make Ethereum robust, secure and scalable.
Metropolis claims to be a faster, lighter and more secure version of Ethereum. It would also provide enhanced flexibility to developers. The Metropolis phase is split into two releases- Byzantine and Constantinople
Byzantine – Executed in October 2017
Byzantine has a total of nine Ethereum Improvement Proposals [EIP] that once implemented results in enhanced security, scalability and privacy. It would also help in lowering fees for users and faster blocks. Some of the significant changes are –
With Metropolis phase, the users would have the ability to perform anonymous transactions, with the new privacy tool – zk-SNARKs Or zero-knowledge succinct non-interactive arguments of knowledge. This zero-knowledge proof would help Ethereum to store some of the contact variables [that are private to users] with them instead of floating them onto blockchain network.
What is A Zero Knowledge Proof?
In laymen terms, a zero-knowledge proof is the ability to prove the truth of a statement, without passing on any other additional information beyond the statement under evaluation
Let’s take an example – If you have a bunch of keys and want to make a statement “it has a key to your house,” you can prove that by just unlocking the house with the designated key, with revealing which key the key that belongs to your house.
Ethereum, in addition to zk-SNARKS, would also get ring signatures, just to provide the best of both the world to its loyal community.
As mentioned earlier, Metropolis would help in providing flexibility to smart contracts developers, to support that Ethereum would now support a concept called as Abstraction. The technique improves the programmers to provide only high-level concepts and to avoid overloading the user with details.
This would help the end users to have more control over their private keys, with an added ability for contracts to pay mining fees. Abstraction technique would also help in reducing the risk of getting hacked by quantum computing.
The phase would also target to initiate the movement of moving from a miner-based PoW to a validator-based PoS system, i.e., Ethereum to work on Proof of Stake rather than Proof of Work. This move would be challenging for miners and make it less profitable for them.
Constantinople – Not set date, but expected in 2018
The release Constantinople with no set timeline will be an introductory phase for upgrading Ethereum from Proof of Work [PoW] to Proof of Stake[PoS] to be called as Casper Protocol. During the upgrade process majority of the transaction would remain as PoW on Ethereum network, but every 100th transaction would be PoS with Constantinople release. Eventually, the entire Ethereum network would have a PoS protocol.
Casper protocol has two versions-
Vlad Zamfir leads one
FFG [ friendly finality gadget] that is being driven by Vitalik Buterin.
There would also be “STAKERS” – one who stake/stick their coins in special wallets and lock them. There is also a reward associated for stakers as an annual dividend of ether, so the more you stake, the larger the dividend.
Why is Ethereum Upgrading to PoS?
Following problems that could be Solved with PoS, but not with PoW
Bad Actors are Punished for supporting invalid blocks
Individuals have more incentive to act honestly than they do in a PoW system.
Difficult to conduct a 51% attack as with PoS an individual need to purchase Ethereum market cap[ that amount is tremendous, may not be possible for individuals]. Real life example when on the Bitcoin network in July 2014, a bitcoin mining pool named Ghash controlled 51% of the mining power for 12 hours.
The last phase of the Ethereum Roadmap that will upgrade the entire network from PoW to PoS. At this phase, Ethereum with a built-in Turing-complete programming language can be used by other companies, developers, and entities to create applications, contracts, and systems.
Ethereum is still a nascent technology, but many promising scaling features will allow reaching the mainstream. If Ethereum can achieve its ambitious multi-year vision, then it will lay down the foundation and backbone of the blockchain ecosystem!
Our next post would talk about How Plasma and Sharding would help in Ethereum Scalability Problem. Stay tuned.