EthCC 2: Thibault Meunier
Ethereum Paris·Wed, Oct 9, 2019, 12:00 AM
EthCC 2 EthCC, the Ethereum Community Conference is created by the community, for the community. It brings together great minds and forethinkers, and allows the community to grow. Follow us : @AssethFR https://ethcc.io
Transcript
blah so hello everyone I'm Superman year and today we're going to talk about tax which is a scalable and just let's exchange so first of all human I ask what do we solve so we do we are going to talk about front funding and our exchange prevents it and the front phone of your traitor - traitor the minor then we're going to present how we achieve create without being reliant on gas fees we are also going to talk about fast trading how text is going to help you to trade faster how tax or predator has low collateral requirement even if it relies on blockchain security and finally how user control their phones and remain in custody of them so first of all there are different type of exchanges and probably just gonna go through what an exchange is and how we want to what is here today first type of exchange like you are encountering every day is just a marketplace so here's a photo I took in Paris people buying things and that's an exchange you are exchanges value again some asset here's like fruits but you can exchange multiple things so in this exchange you don't have any public order book you not have any fast trading you're only exchanging small amount of money against small amount of assets maybe you can buy big things but it's not that huge compared to current marketplace like online stock exchange so you don't have any high volumizer but these are control their phones if you take a look at the guy which is here he's counting money he's counting his money like him from his pocket which was something like record yet and prove you're all familiar with and then because it was quite limited like to do sing this way and want to do it remotely was more like volume etc came centralized exchange so centralized exchange they obviously exist in crypto but in the beginning it wasn't encrypted it was just regular exchange like new stock exchange you had extending exchanges around the world and those exchanges where exchange is value so it was terrible I mean it's deployed worldwide and it's like quite well-known now you do also have a high throughput so just take two trips for example finance is having exchanging twenty billion dollars so sorry quite big even if it's not as big as regular exchanges that you can encounter do you have a public order book but the downside of it is user are not in custody of their phones you do deposit font in the exchange and that's why you can the exchange is able to provide you was like fast trading so that was great but when blockchain came you imagine that you really control your money so that's where decentralized exchanges came into place so user remain in custody of their phones and you had like exchanges which had already achieved like medium like decent volume such as I tax which is trading 1 million asset daily however the bad side of decentralized exchanges for now is you have viable fees you're relying on the blockchain the exchange is based on to provide you the order book or for the settlement and those fees so in Syria Mesa and these values volatile it is not something the exchange appraiser can rely on and obviously you are bound to the blockchain speed when you want to settle an order you have to wait for some action to be mined and that's something which is not good when you're willing to provide fast trading and so what we're going to talk about today is Stressless exchange so it's a design of a decentralized exchange is that where users remain in control of their phones where we have been able to achieve front-running resilience or the book so the operator can just take an order and match it however he wants you have a fast settlement layer which we're going to explain and you have a high throughput and data properties we wanted to achieve in this exchange obviously it's like one of a kind decks so there's a different kind of text you have the first kind of decks which was wisest text where you have everything that happened on chain you have the settlement layer and you also have the auto book layer so everything was on chain it was slow and obviously it was expensive because you have gas fee on every operation and that's not something which was easy for adoption then some Dex's such as I tax wanted to have something faster something more convenient so they did I breed Dex so they took the order book and put it offline with the trusted third party and stick to the unchanged settlement layer so it was faster it reduce the gas fee but we're still relying on the underlying blockchain and then our design we moved everything off chain while relying on blockchain for security books securing the assets so first of all how did we achieve a front running resistance or the book player what is from running front running can be performed by multiple people and just consists of if I have an order and someone else give me an order which is matching a good order I have maybe as an appraiser I do want to take this order first because it's a good deal I want to have or maybe someone is paying me in order to have access to the best order available that front running and that's something you want to prevent if your trader because it's your order and you want to make money not the operator so it can be performed by - when they receive it in action say I think they includes a transaction first or it can be performed by traders when the CEO turn action which is good so I just posed the same transaction whereas higher gas price or it can also be performed by the operator when they see some trades they just decide not to match it or match some oil first because they are paid by another party what we want to achieve is some kind of first in first matched if the price is reasonable so when there is when you're the oldest order with a price you want to order to be matched first because you're providing a good order and you were the first so that's what we want to achieve and finally if the operator is misbehaving you don't want you want anyone to know and you want the action of the operator to be just halted so the operator lose all these users and he has low incentive to misbehave and there we introduced the moonwalk order the moonwalk order is a way for a trader to post an order and without the exchange being able to see the content of the order but the operator is able to see that this order is valid without knowing his content so it consists of a zero knowledge part in encrypted water and a time lock puzzle so all these parts come into play in this diagram which probably looks a bit scary and we're gonna work I'm gonna walk you through it so first of all you have Alice so Alice is a trader and this wants to pass an order and so what she does is first of all decide what she wanna trade and she encrypts this order disorder is associated was a time lock puzzle that the operator can decide resolve if he wants to decrypt the order once the order is encrypted and his since this order to serve right so and you afraid so will commit to it without decrypting it so when he commits to it includes the order in a miracle tree and commit is a position why the order would be mad then when the order has been included in this miracle tree the operator gets back to Alice saying hey the order has been included here's the proof I've included over here Alice sings these proof send the key to decrypt the order back to the operator and the operator can then include disorder in the other book publicly once every round the operator is just publishing the state of the other book and how the order have been matched so anyone is able to check that their order have been included properly and the sequence has been respected obviously all of this about building trust when Alice submits an order is the operator is able to decrypt it in a certain amount of seconds so let's say the operator is able to decrypt the order in 30 seconds so if Annie sent the order and the operator gets back to her to her after the 30 seconds the operator may have been able to decreed the order and was attempt was trying to attempt to front run Alice so basically lists has low confidence that the operator was not cheating so in order to do that and it's just sent multiple water which I kind of fake orders was small value but which are still valid and that the operator may try to front phone first if your Creator try to front runs those fake orders Alice knows the operator can't be trusted and so she won't send real orders to her to the operator of course can happen in the opposite way the operator might try to cheat on Alice well the Alice might try to cheat on the operator does the operator commits to an order and then Alice don't want to reveal the key for this order but because there's a time lock puzzle the operator can just solve the puzzle which is provided by alice and then not accept anymore and it's raid from Alice side and that's action against misbehavior so there's a lot of thing that could go wrong because parties might not be honest all the time and do you want to take profit of what's happening on the exchange so as Alice as a trader you can challenge the parent chain in case anything goes bad so multiple thing could go bad and what we're talking about in the audible it's this sequence if the sequence is not respected I will see it on chain and our change the other book to prove me I'm wrong that my sequence my order hasn't been included into a specific sequence of course you also have the time for the operator to answer and that's what we've discussed was before the operator is halted in case he provides no or bad response to any challenge that is submitted on she and of course you can just check multiple things such as like the front funding if it happened you want to be able to change your swap if the swap hasn't been done in a proper way you want to check that it has been delivered you want to check the state of your balance and that's something we're going to talk right after and you also want when to have some kind of immediate check of validity of what the operator has submitted and so the second part in this exchange is a sec tournament layer that's was a monet's and that probably were the most interesting part of the this protocol is so we do work with something which is called commit chain so you have the blockchain which is what we are all used to you here it is cerium so it's like a series of block but I'm mind using consensus and then you have the operator with each set of users Joe crater commits periodically the state of the option ecosystem on the chain and so this state of the earth technical system basically summarized all the transfers that have been performed by its users it commits once it commits twice and every time at regular intervals so it's something that the user knows when the the publishing when the afraid surf with publish the data on chain and so he can comes at regular intervals just life checks the blockchain check if it's state hasn't been modified and that's done that's what we call around and it's just a regular set of intervals the user inspects it they can inspect was what they know ii ask Surfrider to provide line to provide them more data and in case something goes bad they will issue a challenge now the great thing is I never mentioned that the user needs to have some content phones some ISA because they don't need to have it in the first place everything can happen off chain the registration is done was a centralized freighter off train so you contact the webserver you say I want to join if the operator is willing to accept you within the exchange he will say ok yes just sign this message proving me that you're willing to join my network you send a message so you have a proof of registration and finally the operator also signs a message so you do know that you're registered it's instant and it's fairly C or too friendly because you don't have this huge mining work involved so my in work is only for the parent blockchain and that's where the security is held here we are like at assumed community conference and maybe you noticed I mentioned a centralized operator and that's true could you have a centralized praetor but this operator is not in custody of use of phones the use of phones are stored in smart contracts and locked away from the operator the operator is just here to act as a like mean of payments and exchange between users but is never in custody of the phones so the operator cannot steal con he cannot double spend and he cannot means new con if he tries to do such a thing it's operation will be halted and users will move to an operator that can be trusted and now it's time to showcase like what we've built on top of it just user interface which is providing you an exchange it's our alpha version and we're trying to improve it so the demonstration if I manage to do it took ok got it I shock on click which is sad how do you click on the nope yeah I just want to open the video good yeah well so just before we get into the video just want to explain you a bit what here so it's like most inspired by regular exchanges so you do have balance component where you do have the amount you have on chain so on a serum and the amount you have with your predator did you have a bind sell when where traders can just post the order then you have a price chart which is not available yet and we're working on it you have your transactions up you can set yes you have your transactions which is where your transaction are sought and the history of what you've done you have the order book which is where all the orders possible all traders is held this order book has a smoke button to show you if it's up to date or not and then finally you have the trade history so what trades have been performed since the beginning on the exchange so now let's go to the demo so first of all I want to check my wallet so my wallets be secured it means your Piazza hasn't tried to misbehave debts so have my address like this human dress so happy safe good so now I do want to post an order so I can post another like randomly but because I just you want to showcase you ID as well I will take an order which already exists it's a one-for-one LED token for Issa so it's like a very good price and I definitely want to do it so I want to buy a lot but I don't have enough um so I do post a reasonable order of 0.095 I post the order so as you've seen as you've noticed like a Newton action has been added which is your derived on what happens here is I do create a new wallet to makes it straight so I generates a set of private key I do generate the set of private keys I do sign as you update on my balance meaning I want to execute a trade and I pass these trade which is your operator this order has been added to the order book and then the operator would just match the order and remove the order from the order book and as you see the both order that were matching have been removed and then you have the all the order that have been matched that had been added to the trade history at this point you also see that my order was like bigger than the sell order I was taking so the buy order is partially filled and so if someone tries to sell again he will just like continue to feel the buy order and his order would be match directly just like a lucky what we see here you do have the a new sell order which have been issued and so this order appears in the order book and once the operator has gone in process it's a match the new the buy order is just filled a bit more and you have a new trade that has appear in the history and so now if I manage to go back to my presentation which I don't know what it is it is so that's what about or for me we're working at the christening at work we do have a Bruce here and I invite you really to take a look at our academic paper which formulas all the property properties I've presented here and also just come out how a boost have a chat I mean we're human here just it's an opportunity for you to talk to us and if you're willing to operate the decks contact us we are more than open to do it thank you is there any questions thank you for the talk it was super interesting and he said when the order poster does not provide the encryption key the operator can just try to solve it via the time lock and then exclude any orders from that person going forward I'm just wondering if how would this work if I just create new identities over and over and post random orders that I don't reveal the key for could I slow down this exchange to basically the time of the time lock sure not the thing you can't do it but there are multiple things the operator can do to mitigate this first thing is the operator is a centralized entity so it accept whoever he wants and he might have some currency process or authentication process that prevents you from creating new identity all the time another things that can be done is because it's like a time lock puzzle it's fairly easy to just get all the orders that users haven't provided the key for and then you can paralyze it like once to process all the orders and so you don't have to halt the operation the normal operation of the operator because one user just prevents you like didn't trigger the key so I'm multiple approach to this but I mean still centralized operator so you do whatever you want for registration any other question all right thank you [Applause]
Automatic transcript — names and jargon may be misspelled.