Monoplasma A simple way to broadcast money

Monoplasma is a special-purpose off-chain scaling solution for one-to-many payments. It’s a good fit for any system where you repeatedly need to:

What problem does it solve?

Here are some possible use cases for Monoplasma, where this type of one-to-many payment pattern is repeated:

Design principles

We looked at the various scaling solutions out there for Ethereum, but none of them met our requirements, which were:

We sacrificed generality in favour of special-purpose.

This is not a generic payment system where everyone can arbitrarily transact with each other. The system is unidirectional: there are no transfers between accounts in the side channel.

In other words, tokens can’t be spent on the side channel. But why is that a good thing? Since tokens can’t be spent there, there can be no double spending! And as you might know, preventing double spending is arguably the hardest problem in designing any distributed system that transfers value. Not having to deal with this simplifies things immensely, which is exactly what we wanted.

Positive balance off-chain, negative balance on-chain

Since there’s no side channel spending, balances on the side channel are your cumulative lifetime earnings. In other words, your account balance can only increase monotonically. Hence the name: Monoplasma. So what about withdrawals then? Withdrawals are tracked on-chain instead of off-chain. The side channel records your cumulative earnings (credits) and the smart contract keeps track of your cumulative withdrawals (debits).

Your withdrawable balance is the difference. To withdraw, all you need to do is prove your positive balance to the smart contract. You do this by providing a simple Merkle proof . Let’s look at an example. The Monoplasma smart contract holds all the non-withdrawn tokens of the side channel. If we can prove we have earned 100 tokens, and the Monoplasma smart contract has seen us withdraw only 30 so far, it will allow us to withdraw 70 more.

The smart contract updates its internal record keeping to reflect that we now have withdrawn 100. If we try to withdraw again with a proof of earnings of 100 (or less), it won’t give us any further tokens. In other words, Monoplasma relies on the secure consensus mechanism of Ethereum to prevent people from withdrawing more than their provable share.

Other similarities and differences

I’ll briefly highlight some other aspects of Monoplasma:

As a developer, how can I try it out?

Monoplasma lives in this repo within the Streamr Github . It ships with an interactive revenue sharing demo which showcases the functionalities of the framework. Feel free to clone the repo and play around with it yourself (as others already have done!). Instructions for running the demo are in the readme. You can also watch the demo as I presented it live at ETHDenver in the video below.

We hope Monoplasma will be useful to other #buidlers out there! It will be reasonably well maintained for the time being, because we will be needing it ourselves for at least as long as similar scale and cost can’t be achieved on-chain, which is probably several years away from now. Kudos to Juuso Takalainen of Streamr who’s done almost all of the heavy lifting, and to Kelvin Fichter of OmiseGO (and recently plasma.group ) for support and putting us on the right track. A shout-out also to some prior art we came across including RicMoo ’s airdrop utility and the OUTPACE protocol by the folks at AdEx . You can follow the Streamr community’s progress on Peepeth and Twitter and also join the community on Telegram and our developer forum . Good luck!