Building the OMG Network: Plasma and Securing Exchanges on Plasma

EDCON 2019 · 12 Apr 2019 · 13:38

Pepesza Peregud examines how to build an exchange on More Viable Plasma while protecting traders and market makers. He discusses order cancellation, information leakage, signed orders, trade settlement and exit proofs, connecting censorship resistance with the performance and privacy requirements of exchange users.

Speakers

Topics

From EDCON 2019, hosted by EDCON.

Transcript

so I would like to introduce the fourth speaker pleasure his name is tisha and he's the software developer at Oh Missy go and he will talk to us about sort of plasma and securing exchanges on plasma thank you hi everyone I would like to give you an update of what is going on with a mystical network this project and where we are at the moment so we've just launched the alpha version basically on a test net it's by one update away from

future completeness and we are thinking of how does one build an exchange on top of more TP plasma yeah man this is me yep so I like what we have at the moment in the market in general centralized exchanges yeah this is how it looks you can find any articles listing a list of all the hacks which happened during last six years and the amount of money stone is actually impressive and the main problem is obvious yeah it's custody but

if you will try to get away from custody what happens we have a free option we have known firm orders the whole trading experience is pretty far away from what you will get on a typical centralized exchange yeah so and center decentralized exchanges they have quite a lot of strong points resilience it censorship resistance like it's beautiful but the problem is you have full transparency it's really hard to prevent information leakage and it hits both traders and the market makers so traders IP in front R and there are

different techniques to fight this problem and they all a very like submarine sense I don't believe anyone uses it there are a few projects we speak about group key generation it's a complicated protocol we by the way we might ourselves be using it in the future and of course there are batch actions which are implemented all over the place the other problem is of course no financial privacy but it's more of a problem of underlying where the blockchain ledger itself yeah so and for the market makers the problem is or

cancels like for unchain Texas cancels up not free all available funds are public but you reveal your market strategies immediately and you basically it affects directly our bottom line so it's not a very good experience so we are looking into the way of bridging the gap between those two models it so all of this is pretty fresh research so and it also will change yeah and this is what we want to do we are building we are basically working on design which

will combine of chain author book where you don't have this problem of order privacy batching for trades because of performance reasons the whole thing will work on plasma so put all plasma designs they share a common problem you never and spent okay there is one small exception but usually you cannot spend money which you don't yet have seen confirmed in the theorem and it means if you are doing partial fields on your trades the problem is you will have a change address basically change you take

so and you cannot enter this change you take so and corresponding partial order to the next batch without compromising the security of the protocol and this is why you like we are looking at batching for this one and we will scale through the batch size and not for the like frequency of trades to make the whole mall to make whole thing secure will have validity proofs for trades and to remove the free option basically you just sign away your free option right using game theoretical design yeah so how it looks you sign a message

I intend to trade that each week so you give it to the venue when you give this message to the operator like this is basically this design work on Toa stage for the POS stage we will need to rely basically on the keys narcs to solve this one if user spends directly operator will reject these checks this is how we are removing the free ocean at the moment and next like order submission trader privately gives order to the venue this means that the trader can actually update order as often as it wants it can cancel the order freely and

order is not leaked on chain and then if there is if patch is closed venue does batch matching the exact algorithm is basically all we from the trader from the venue is to implement this algorithm also as in Silesia code or if we are not using snarks and if we will use snarks for this for the trader like the exact details of the trading algo they just have to be known and that's it yeah next venue Amit's TX with the reach

profit touched this ability profits checked by the operator built for inclusion yeah and at the end like the output of this trade are unlocked by default so in a way this whole design works as your fans don't stay an honest change in any like meaningful way so your your custody stays with you yeah order cancelling that's privately it's free a venue provides translation proof why this translation proof is important

if we will you will see basically if you have canceled the trade and when you still use the trade you can prove that a venue is chilling and if when it just does not sign your profile can cancel the order on chain basically like the idea is to have the process where every time when a venue doesn't want to cooperate you just escalate and chain and this is how we want to solve the problems of censorship of every forum yeah toll plasma will give us enough a TX capacity to hopefully handle that yeah

unlocking the funds so if I log difference before for the trade now if I want to back out or I like I'm just I didn't trust exchanging more of some reason I can just I just do unlock TX and omit it on the chain then there is a timeout during which the venue will have a chance to actually publish it the trade it's been compiling and proving and if when you doesn't change publish the trade with my music so I just spend it so this is how we hide the fact that like basically money I'm moving to the exchanging by moving

it's not they are not actually moving which is signing with a free option right yeah and of course a plasma multipy has this invite protocol basically if at any moment at any moment in time data availability problem arises [Music] all trade rests all participants they have to base check if like there is basically operator doesn't publish the block so you see if you give a freighter an hour and after that you have to exit this is the basically the case where

exchange would like to close the last trade so exchange will publish the invite exit from the trade settlement it will provide in design without snarks it will provide market prefer inputs and Merkel route of signed order set and then we have a more GP game exit game which basically thanks to predicated construction recently published by a plasma group the hope litigate construction works on multi plasma as well so we we want to use it for the

exchange trades we have this challenge response game a challenge in makes the trade invalid so what if while trade this challenge you can only exit from the inputs of the trade about when you can restore topology of the trade by revealing data which will prove that trader actions actually sign that order this way exchange cannot exit in with fake proof basically giving itself the money and exchange can exit with correct proof if there is a problem in operator

has gone rock yeah so tender ship resistance we can achieve it using force on chain calls basically if you if one of the players reject your message you just push the TX on chain racing fans are safe and funds locked into trades are at risk only have both operator and veneer are malicious we might be able to improve this property using snarks yeah so the whole thing is very fresh this o hasn't rained read properly yeah this decks flow over

you for the messages yeah and the end result since we'll have partial fields we can build any type of orders on top of it with the snarks we can achieve privacy for the orders we can have resting orders thanks the plasma we have a nice throughput in turn like 1k transactions per second 2k transaction per second it basically the bottleneck is traders left off and yeah it's secure and abrade upgradeable things to predicates thank you [Applause]

thank you so much pshaw um I just wanted to ask you that that was really interesting um could I just ask you what is your next what are the next things that you're working on then given that you're really done so much oh so this design is a very fresh thing so while we we are pretty certain of its security features there is quite a lot of work that needs to be done on basically snarks because without snart's will not have the privacy for the orders and the whole thing will not be interesting for my market makers okay thank you so much