OMG Labs: Engineering Update #02 (ft. Varna!)

In Blog, Engineering by OMG Network

Work in Progress. Expect anything/everything we cover here or write here, to change (or break) quickly and without notice. “We” refers to the joint Enya/OMG team. We’ve been operating as one team since we announced our core partnership.

1. High-Level Layer-2 Observations and Trends

All Layer-2s are operating in a highly fluid environment characterized by new blockchains, new cryptographic techniques, changes to Ethereum itself, and new use cases. Taking a step back, we think that:

  • Users will always want Ethereum to be faster and cheaper – when ETH 2 is out, the focus will turn to ETH 3, then to ETH 4, and so forth — all of which will seek to be faster, safer, cheaper, and more secure than their predecessors;

  • This means that Layer-2 is here to stay. Note that Layer-2 scaling solutions are a special case of Layer-2 solutions. In principle, Layer-2 could offer numerous additional capabilities to mainchain, beyond simply scaling. Thinking in terms of Layer-1 augmentation could be useful to broaden the discussion about the value that Layer-2s can provide to mainchain. Most obviously, if computation is largely done off-chain, little prevents Layer-2s from providing increasingly complex compute capabilities to the Ethereum ecosystem (assuming that the off-chain computations can be compactly verified);

  • Solidity is the de-facto language of DeFi (decentralized finance);

  • Solidity smart contract support is a powerful attribute of Layer-2s such as Optimism, which is, loosely speaking, a rollup-enabled fork of Ethereum 1.9.10 Rojo Loco with a modified solc that enables contract execution replay for verification;

  • The Layer-2 landscape is highly fragmented and it's difficult to communicate/transact across the Layer-2<>Layer-1 and Layer-2<>Layer-2 boundaries — let alone across Layer-2<>Layer-1<>other chains;

  • Cryptographic and distributed system research has the potential to shift the entire blockchain and Layer-2 landscape overnight. E.g. if the computational complexity and cost of SNARKs and STARKs could be reduced.

2. This Week's Activities

Within this overall context, our short-term goals are to increase the overall usability and utility of Plasma v1. One way to do this is to build applications on Plasma – this serves the dual purpose of making OMG Plasma more attractive to users and helping us define which new features are essential for Plasma v2.

2.1. Hashcast – Public Beta at

Despite Hashcast being primarily a messaging layer for coordinating transactions, we released a simple front end to make it easy for everyone to try out the system and understand its capabilities. This is open-source software, of course, so if there are features you would like, or things you do not like, please file issues on GitHub, or even better, fork and push PRs.

2.2. Varna – Plasma's Privacy-preserving Exchange – Public Beta imminent

Some of you have figured out, based on Hashcast's capabilities, that we've been building Varna, a limit order book decentralized exchange with built-in privacy features to prevent front-running. More details about Varna will be revealed in the days to come.

We have run three rounds of test trades on Varna, designed to find bugs and make sure the overall user experience is acceptable. Most recently, we added a pricing data feed, so that buyers and sellers have more information before they bid (or accept bids).

We also were able to remove several steps in the bidding and swapping workflow to reduce the number of clicks and user interactions needed to list, bid, and settle. After numerous UX/UI changes, we are currently at ~7 clicks to list, ~7 clicks to bid, and ~10 clicks to execute an atomic swap (in a total elapsed time of around 120 seconds including a total of 5 MetaMask signatures). While this is not competitive with Amazon's “1-Click” ordering button, it's already much better than it was last week, and at least acceptable.

Reliability of reserving UTXOs, managing UTXOs, and releasing UTXOs as the exchange participants use the system is now also acceptable. Previously, our UTXO reservation system was not integrated with the UFO (UnFinalized Output) approach code, but those systems now talk to one another.

2.3 Quasar – Plasma's Fast-exit Solution – Awaiting Smart Contract Audit

The three key parts of Quasar, our fast-exit solution, have been written (smart contracts, omg-quasar-js, and frontend). Release awaits a smart contract audit. The system is being tested on Rinkeby.

Quasar will be released in two steps – the first public release will support fast exits, but OMG will be the sole liquidity provider. A subsequent release will allow anyone to provide liquidity to Quasar and share exit fees in proportion to their stake in Quasar's liquidity pool.

2.4 OMG Fountain – Streamlined On-ramping

Closely related to Quasar is an OMG fountain for convenient purchasing of OMG. It is being designed to streamline the on-ramping (Layer-1->Layer-2 deposit) experience.

2.5 Chain v1 Updates

Within the next few days, Child Chain v1 will get smarter about when it writes blocks – the goal is to increase our gas mileage with minimal or no impairment of user experience. The smarter block logic is already active on rinkeby-lr. Rather than writing a new block

if transactions_pending > 0,

v1 will soon write blocks

if transactions_pending > 10 || time_since_last_block > 71 seconds.

2.6 Insights From Product Testing Feeding Into V2 Features

Aside from numerous under-the-hood improvements relative to v1 (completely rewritten gas estimation logic; significant code refactoring and cleanup), v2 will have 5 ins and outs per transaction, support for circular transfers (aka zero value transfers), and support for UFOs.

2.7 Web Wallet at

The updated Web Wallet now provides an enhanced user experience for exits.

3. Next Week's Activities

  • Rapid bugfixes after Varna's release;

  • Continued integration of Quasar contracts, omg-quasar-js, and Web-wallet-Quasar;

  • Deployment of new block writing logic to mainchain v1;

  • Development of OMG fountain;

  • Finalization of Plasma v2 feature set.