The Eloncity project is one of the most ambitious cryptoeconomic projects. It aims to decentralize the electrical grid infrastructure and energy monopolies by replacing them with a hierarchy of blockchain-enabled microgrids. Those microgrids allow communities to store, trade, and consume locally-generated renewable energy. The system aims to achieve supply and demand balance within — and across — communities, reducing the need for very expensive peak generation power and the power transmission fees that plague the network today.

However, households need to trade frequently in order to establish an efficient energy market. As the trading volume grows geometrically with the number of households in the network, the frequency of trading, which we estimate to be millions of transactions per second in a typical country, could exceed the capacity of any blockchain.



Fortunately, most of the energy trading also is limited within microgrids; that is, most trading happens between stable groups of households in the same neighborhood or community. That allows us to scale the network by building side chains, each representing a microgrid.

Eloncity is partnering with CyberMiles to build its infrastructure on the high-performance CyberMiles public blockchain. And like CyberMiles, Eloncity aims to build a highly optimized virtual machine that is specific to its particular application protocol. In this case, CyberMiles and Eloncity are collaborating to develop a customized Plasma implementation that allows for fast, secure energy trading based on the Eloncity protocol. The goal is to automate much of the verification workload and reduce the complexity of cryptoeconomic games.

What are layer 2 networks?

Layer 2 networks, such as state channels and Plasma, are some of the most promising solutions for Ethereum scaling. While state channels allow fast-paced, off-chain transactions to be secured by the blockchain, Plasma goes further and proposes a full-blown cryptoeconomic solution for executing any computational load — not just simple transactions — off the main blockchain.



State channels are lightweight in the sense that all transactions in the channel are of the same type. Therefore, it is easy to design an automated computation solution to validate the transactions. In a payment channel, for example, all transactions must be signed by both the sender and the recipient. When a dispute arises later, it is very easy for the computer code in the smart contract to tell which party is lying — the last transaction with valid double signatures always win.



Plasma, on the other hand, aims to provide a framework to verify arbitrary computing workload. That is much harder to achieve with efficiency, but could be much more useful.



Plasma further allows smart contracts on the main blockchain to spin off child blockchains, known as side chains. The side chains can be nested, creating a hierarchy of side chains that represent microgrids at different levels.

Our distinctive approach

At CyberMiles, we’re big believers of application protocols. We envision a world with many blockchains, each optimized for a specific kind of application. For example, the CyberMiles blockchain is optimized for e-commerce and financial applications. Since the CyberMiles blockchain is fully backward compatible with Ethereum, the Plasma design would work on CyberMiles as a scalability solution as well.



The Eloncity protocol, by contrast, calls for optimized application protocol side chains. All of the transactions and smart contracts on Eloncity blockchains are of known types. The more we know about those transactions, the more we can develop automated checks, and hence reduce the need for complex cryptoeconomic games. For instance:

The energy-trading payment transactions can be simply double signed by the buyer and seller, like payments in a state channel.

The price discovery contracts are determined by the supply and demand curve that can be observed and documented by any third party node on the network. It also requires computationally intensive algorithms to process large amounts of real-time data, which is impossible to do on generic Turning-complete virtual machines. CyberMiles’ libENI is designed for this purpose.

The side chains need to protect user privacy and encrypt / decrypt user data as needed. As the experience with Ethereum shows, this types of operations require virtual machine optimizations in order to be efficiently verified on the mainnet.

The energy trading contracts in Eloncity side chains are all long running contracts that are timer-controlled and settled on the mainnet.

The overall architecture of the Eloncity protocol and network is illustrated as follows.