From BitShares to EOS, the new kid on the blockchain
Dan Larimer is fast becoming the guru of the blockchain. Invictus Innovations, the company that created his BitShares cryptocurrency project, employed just five people. Block.one, the company behind his latest EOS project, employs 20 times that many. This article explores the two projects, looking at what they have in common and where they differ.
Both systems set out to evolve beyond Bitcoin’s use of the blockchain. This simply registered the state of transaction inputs and outputs, providing some rudimentary scripting functionality on the side.
BitShares took this further, achieving what Bitcoin’s coloured coins concept had attempted to do by enabling cryptocurrency to represent different assets. It also created some smart contract functionality that enabled it to address a specific use case in the form of trading and financial derivatives.
EOS goes beyond this limited use case by applying some of the principles first laid out in BitShares to produce a programmable blockchain that can handle any decentralized application.
BitShares to replace centralized exchanges
BitShares was announced in 2013 and launched in July 2014. It is a blockchain-based platform for creating and trading financial derivatives, with several moving parts. The first is the BitShares cryptocurrency. The second is the system of smart contract-based derivatives, backed by BitShares, which the community now collectively labels SmartCoin.
Another is the decentralized exchange system used to trade those derivatives, and the final part is the decentralized autonomous corporation (DAC) used to decide the future direction of the BitShares community and its blockchain.
When Dan Larimer created BitShares, he was trying to tackle an intellectual problem: Would it be possible to build a decentralized bank on the blockchain? He was also proposing an alternative to inefficient, centralized cryptocurrency exchanges such as Mt Gox that were highly susceptible to hacks and liquidity issues.
He hit on the idea of a decentralized exchange that would not need fiat currency or real-world assets to represent value. Instead, they could be represented by a range of derivatives, lumped together under the name SmartCoins, that could be backed by a cryptocurrency token.
Smart contracts are used to create these derivatives, which are designed never to fall below the market price of the real-world asset. SmartCoin-based derivatives are pegged to the value of a real-world asset, such as fiat currency, precious metals or even commodities such as oil. The derivative is backed by BitShares as collateral.
Derivatives and security
A speculator creates the SmartCoin-based derivative, backing it with their own BitShares as collateral. It stores enough BitShares to match a multiple of the asset value when it is created. This means that when it is created, the SmartCoin derivative is always over-collateralized, having more collateral than the asset is worth.
After it is created, the counterparty buys the derivative with BitShares. The derivative then delivers a set return, meaning that the counterparty who has bought the derivative effectively earns interest. The speculator stands to make money on fluctuations in the price of the underlying real-world asset.
They can also lose, because the smart contract can sell the derivative if the market price fluctuates enough that their collateral in BitShares is no longer sufficient to cover their position. This is the equivalent of a margin call.
EOS expands functionality
The functionality of the smart contracts used to create these derivatives in BitShares is far narrower than those in EOS. They are written in C++ and have several parameters such as the type and initial rate of collateral. Users can also perform several classes of operations on the blockchain such as transfers and trading orders.
Developers in EOS must also understand C++, reflecting Larimer’s preference that contracts be written in this fast-running, compiled language. EOS contracts are compiled into Web Assembly (WASM), which is a binary instruction format for virtual machines that is portable and efficient in size and load times.
Running smart contracts
BitShares 2.0 was introduced in 2015, it has been based on Graphene, which is Larimer’s high-performance blockchain engine. This is optimized for speed and efficiency.
It runs everything in-memory and restricts its activities to a single CPU thread. It also avoids the use of private keys (which are effectively hashed addresses), because of the computing overhead involved in decoding them. Instead, it uses a system of unique IDs for nodes on the blockchain.
Using this methodology, along with the narrow set of functions and parameters that its smart contracts support, it can scale to hundreds of thousands of transactions per second (TPS). Comparatively, the native Bitcoin network has been restricted to TPS in the single digits.
Although BitShares started out using proof of work, it switched to another Larimer invention called delegated proof of stake (DPoS). This uses a selection of appointed block verifiers known as witnesses, which are voted upon in every transaction.
A witness is chosen to verify every block, which keeps computing power and energy usage to a minimum. If a witness fails to perform their duty properly, they will eventually fall out of favour.
BitShares may be narrower in functionality than EOS, but it still has some useful functions that resemble EOS’s. For example, it allows user-generated assets with their own parameters that can serve as tokens representing everything from deposit certificates through to event tickets and even company shares.
Governance and voting systems
BitShares also has a decentralized autonomous corporation at its heart. The DPoS system allows stakeholders who own BitShares to vote on changes to network parameters. They do this by electing delegates who can then propose changes to the parameters. Stakeholders get the chance to review those proposals, nullifying them and voting out delegates if they disagree with them.
There are many similarities between BitShares and EOS. The latter is even based on the same Graphene blockchain technology that underpins BitShares.
The big difference between these two projects is scope. Whereas BitShares’ blockchain only supports this relatively narrow range of activities, EOS can be used to create a far broader range of smart contracts, putting it in the same class as Ethereum in terms of its scope. It would be possible to recreate BitShares as an application running on the EOS blockchain.
Will EOS eat BitShares, or Larimer’s other co-creation Steem, by allowing similar projects to flourish on its blockchain? It’s certainly a possibility, and there is already an EOS-based decentralized exchange called EOSFinex, created by existing exchange BitFinex.
Everything here will depend on the success of the initial EOS blockchain and its ability to gather support among token holders and application developers. It will also depend on the strength of the BitShares community, which Larimer says is dominated by Chinese members. As EOS celebrates its launch, there is everything to play for.