Adventures in Layer 2

ETHCC 3 · March 2020 · 20:13

Juuso Takalainen discusses experiences with Layer 2 systems.

Speakers

Topics

From ETHCC 3, hosted by Ethereum France.

Transcript

okay yeah it's fine now can I can say stupid things because I'm not alive yet I guess that's great so what okay oh okay right lay your two adventures lane to welcome everyone glad so many people woke up early like I did so I am user-data lining I've based in I'm based in Helsinki I've been hacking on a theorem for a good three years now and the project I mostly work on is streamer Network it's a real-time data platform project based in Zurich Switzerland and yeah it's free

to use a streamer dot network and I'll just show a quick video so everybody gets an idea what streamer does and what layer to solution is about so here we go all around you take seems to be getting smart homes buildings and even cities that smartness comes from constantly being connected which means that almost everything now consumes and generates data who controls and all that data is becoming more important every day yes dreamer we are building the open source infrastructure that will power the

world's data economy and finally keep people back control of the information take your smart car for example breathe to operate in a smart city it will want to know about traffic with pothole server and the log in price of electricity it will also generate information useful others like highways agencies and your fellow road users we are working with dozens of companies right now your data will travel through our decentralized peer-to-peer network

posted on computers around the globe and powered by three most digital currency data coin no transaction will be too small no amount of data to be and because we are open source we won't take it cars per transaction say he's getting smarter but with Freeman you won't miss out on the smart money streamer days are done differently ok so that was the mandatory history mer president well the introduction so data unions I'm going to [Music] all right I'm going to explain what data

unions are and then talk about the layer two solutions that I serve late after enduring DEFCON four in 2018 to sort of fit this use case and then our custom solution we ended up developing that was announced last year here in Paris so streamer is in the business of real-time data streams and there was something like a slogan real-time data carries a value that must be extracted before it expires that's the best Logan is too long but it's a description great description of what real-time data is as opposed to other kinds of data so it's

not so much the content but it's the value of the day that the real-time data is the kind of data that is valuable when it's fresh and perhaps less valuable later so an example would be all these data that IOT devices your mobile phones produce typically they are the sort of data that if you build an application you want the newest data and maybe the late the old data can be useful but it's usually not in the same way so an example may be a Fitbit activity tracker a wristband that tracks body temperature and pulse and whatnot so streamer built a data marketplace

around the time when that video was made as well and that was launched in first half 2018 in consensus New York and that on that marketplace while people companies machines can buy and sell access to data streams and the purchases are done with the streamer data token which was launched in an IC o---- in 2017 and of course if you take a fitbit.fitbit personal data or some kind of your location if you're a great celebrity like I don't know the location of italic put that in right now then maybe somebody might pay for that data

but of course Vitalik might want to one might like not want to share that data right but if you take like lots of small data producers you would have mobile phone locations from a hundred thousand mobile phones then you could anonymize it completely and aggregate it and it could still be valuable or like or if you know million fit bits you know that sort of data stream could be valuable and we would like to make it possible to package bundle those streams together and mmm well make it available but then there's the problem is how do you like

if when somebody purchases that data stream how do you actually do this with the revenue to a million data producers you can't do that in aetherium network and you have to go off chain so the data union concept is on the right side we have the subscriber the data stream oaken's they go through the marketplace to the data producers that then produce data and the data goes in the streamer network to the subscribers so in this way the tokens go in the etherium network and the data goes in the streamer network so the stream network is not a blockchain it's a you could say companion network disk and data transport layer for førde apps it's decentralized and from the

point of view of the data union administrator who sort of curates the mmm the data union accepts new members and kicks out those who produce bad bad data and so on so basically responsible for the quality of the data bundle so that admin would then create the product on the marketplace and in the marketplace the products have a so called beneficiary who receives the tokens somebody purchases the data data stream access so the beneficiary would be a data union smart contract that the admin deploys and and when the streaming

network no this is that okay now there's a new product that has a data Union beneficiary it will also start operating it so it spins on an operator and when somebody then purchases the access to the stream those data tokens go through the marketplace Mart contract into the data Union smart contract the marketplace is really just relating the tokens it's not taking a cut or anything and then the operator allocates the tokens to the producers publishes like a hash of the allocation and then the producers can we throw their share later I mean they can they can wait until

there's enough tokens you know accumulated before withdrawing because we throwing is costly you have to make an atrium transaction so the design goals we're basically to have this kind of unidirectional payment channel where the tokens that come from the data buyers they go to lots of data producers right possibly like order a million million or so you know and joining should be easy so you well I mean this kind of device or even a person wouldn't she didn't need to buy ether in order to join start earning these data tokens just having a private key for identity and signing message

that should be enough okay so what would fit the bill then in DEFCON 4 there was a workshop I attended on Radin and Raiden was already like being demonstrated in in workshops it was at the time quite like slow and you know still kind of raw there was a plasma family more viable plasma had come out and that was kind of the first inspiration for for then the solution that we built to products or projects stood out spanked chain I don't know who

know spank chain yes so it's a payment channel not a side chain really but payment channel it worked already at that time it was fast impressive the demos I mean it's kind of like the payments are routed through a central hub so that's also probably why it works so well but I mean still very impressive then addicts outpace short for of chain unidirectional payment channels something like that very similar use case so they would have Advent advertisers who have a token budget allocated token budget and that token budget is then distributed to all

website admins or web you know webmasters who display ads to the visitors right so also really a fan out of tokens one to very many most payment channels require you to sort of start like well create the payment channel and to collateralize it with something that's not so great for new members because in in the data union use case the new members basically enter empty-handed they don't they don't have anything they just won't give their data and want to earn tokens so that's just not so great right then then for them to

have to buy Ethan and collateralize the payment channels and so on also payment channels usually work best when there's Alice and Bob who transfer tokens back and forth or perhaps some network where the tokens go around ideally well that's not the case in here we have we have the data buyers and the data sellers and and and it's pretty like one direction also it's one-to-many sauce function is kind of like one-to-one it doesn't work that well for for like this reading lots of tokens and the outpace is unidirectional that requires new members to send a transaction also it basically each ad impression is recorded into some

kind of database or blockchain where which is sort of the basis of revenue sharing right so so it's very very detailed tracking of the events that then generate revenue split whereas we kind of the data Union revenues are split much more like according to the rule to everybody like some rule like equal split or by the data produced or something but still like not tracking each individual earning so closely so not a great fit so yes we rolled out on

and plasma was the first inspiration so scaling solution like plasma but with monotonically increasing balances meaning that in within within the of chain calculation the members would not send tokens to each other it would be a purely one directional so then we could make a trade-off there we would need to worry about double spending so that's the main main win here that if you can move to oaken's back and forth then you can double spend and we just didn't include that possibility so we could really work with really dead simple

design myrtle inclusion proofs in the in the committed state and the new state newest state would always be better than the older one so the older one doesn't need to be invalidated everyone is better off we throwing using a newer state and an older one in the new your state everyone has more tokens that's what the monotonicity means right so the smart contract since it cannot see inside the commits committed states past states it doesn't need to sort of tract so much the past States so anyone anyone can use about like a past date but it's just worse than the newest and

of course as in any layer to world layer to solution there's always the liveness mm liveness means that aliveness problem means that since the smart contracting layer one cannot really know much about the contents of the layer to state it relies on some sort of source of truth right and and generally it relies on validators to validate that source of truth so there's a classic classic conflict between security and usability

here in layer two terms means that once the withdraw happens exit from the layer to the back to layer one the tokens are gone for good right layer one no refunds right so if you can delay the finality you can increase the security because then there's more time for the validators to catch you know bad states but at the same time if you delay the finality then then the legitimate withdrawals they will also take more time that's not great and the mana plasma solution is that the withdrawals are instantaneous you don't have you don't have to because there's no double spending problem you

don't have to announce an intent to withdraw like in plasma so you can withdraw and instantly get the tokens and the catch is that you don't get the latest tokens so so you have to wait to get the very latest tokens but a little bit older tokens you can get any time you want and of course there's things we can improve we could introduce taking we haven't done that yet because there's the whole crypto economics can of worms but operators taking operators could be could be mandated to put down a stick and then you could pay damages from the stake if something goes wrong zero knowledge proves they limit

the sort of malice that the operators can do and of course the operator itself could be running this reader consensus so finally yes learnings from the adventure in layer two is get out there like if you're building a layer to solution layer to project if a room is a great ecosystem just talk to people they will they will they will inundate you with good ideas and solutions but yeah so the best thing that's happened to mana plasma is starting to pilot it because of course when you get closer to customer then then you can focus on what's really important which is you

know the stability of the off chain things and stability of the consensus and so on so yeah rolling your own is something that's feasible totally doable in layer two but but hopefully not needed in coming years anymore who knows how and when a theory 2.0 will come out this is the most advanced of our data union pilots swish you can go try it if you like swash update IO and yeah if you have any good ideas for use cases that could benefit from this kind

of data Union then then please contact us and let us know and streamer also has liked this kind of community fund so if you've got good ideas that you want to work on you can get funded by us okay thank you questions thank you [Applause] I guess the next speaker would be is it Christian are okay well oh yeah all right I guess there was a question Mike as well yeah yeah I mean we can we can just like just ask anything about

the theory in general it doesn't have to be about this I'm happy two minutes okay well yeah it's the next picker here so it's the it's the streamer marketplace already live and I really already using it oh oh yeah for sure yeah I mean streaming streaming marketplace was launched already 2018 right so it's been live for soon two years yeah it's like if you go to well that's the old website a streaming earth network and then there you can find the marketplace you can create products yeah it's super simple please lick lick lick lick easy super sleek nice UI of course the actual like producing data into the

products is still like you send like HTTP requests or you know it's still quite programmatic but but I mean we have integrations with node-red like the raspberry it comes with every Raspberry Pi so you can you can create a data stream without any coding at all if you have raspberry pi and the sensors in the raspberry pi and then you use node ready to send it to streamer so so I mean we have several ways to produce data without like really really produce data not with an existing Acrobat like building an apple without coding so so we try to be inclusive like that yeah thanks okay I'm told to get off the

stage so I am off the stage thank you for listening I guess I should not keep talking even though the next person is not here yeah okay fair enough yeah okay thank you