EtherDelta: Off-chain Order Book with On-chain Settlement
Devcon·Tue, Oct 9, 2018, 12:00 AM
Visit the https://archive.devcon.org/ to gain access to the entire library of Devcon talks with the ease of filtering, playlists, personalized suggestions, decentralized access on IPFS and more. https://archive.devcon.org/archive/watch/3/etherdelta-off-chain-order-book-with-on-chain-settlement This presentation will cover EtherDelta’s deployment of the first working off-chain order book with on-chain settlement. Topics covered will include scaling, security, user experience, onboarding, and real world results. Speaker(s): Zack Coburn Skill level: Intermediate Track: Developer Infrastructure Follow us: https://twitter.com/efdevcon, https://twitter.com/ethereum Learn more about devcon: https://www.devcon.org/ Learn more about ethereum: https://ethereum.org/ Devcon is the Ethereum conference for developers, researchers, thinkers, and makers. Devcon 3 was held in Cancún, Mexico on Nov 1 - 4, 2017 Devcon is organized and presented by the Ethereum Foundation, with the support of our sponsors. To find out more, please visit https://ethereum.foundation/
Transcript
my name is Zack Coburn and I am here representing ether Delta I want to start by giving a little background about Who I am I started my career as a professional options market maker in Chicago for a firm called Optive ER and I quit that job in the middle of 2015 to pursue a career in entrepreneurship around the beginning of 2016 I started looking at the theory 'im full-time and that's what I've been doing ever since I am also a co-founder of first blood which is a decentralized platform that lets eSports players challenge each other and win rewards using the blockchain for settlement and then of course ether Delta which I'm here to talk about today ether Delta really came from my realization that with the ERC 20 token standard it was possible to let anyone trade tokens through a smart contracts and there really needed to be an interface to let people do that as easily as possible so ether Delta launched in July of 2016 and that was shortly after the Dow fiasco and it was also months before the ICO craze even really started when it first launched there were really only a couple of tokens you could trade I think it was maker and digits and so it's really come a long way since then it is a decentralized trading platform and what that means is that you don't have to trust a central party to hold your funds because they are held in a smart contract and it is as of today the most used app on aetherium by a variety of measures that I'll get into later in the presentation here's a screenshot of what easier Delta looks like today you can see there is basically a list of tokens you can trade there is an order book depending on which token you're looking at there's some basic charting function and there's this list of trades so a question that's often asked is what exactly about ether Delta is decentralized and what it really is is that when you go to deposit you are sending funds to a smart contract and they are held in a smart contract in such a way that you and only you can withdraw them so you can think of it almost as a multi-sig but it's really a single sig that only you can use with some additional trading functionality built into that smart contract so that additional trading functionality is what enables trade settlement anytime that you do a trade on ether delt that you're sending a transaction to the smart contract and the smart contract decides is this trade valid and if it is it will actually move funds from you to your counterparty and vice versa so the the functions that I kind of once there already you can deposit you can withdraw and that includes ether or ERC 20 tokens those are two separate functions meaning that when you deposit of course that's different than it would draw but also if you deposit ether that's different than depositing a token what the user interface handles all of this for you then of course there's a trade function which is the core piece of functionality and order cancellation is also something that goes through the smart contract so if you notice there's something missing here which is where is the order book and the order book is actually an off chain construct and so whenever you go to do a trade on ether Delta you are taking the volume that you want to trade the price you want to trade and also an expert block number you package all that stuff together hash it and sign it and so what happens is when somebody else sees your order in the order book and they want to trade with it they will submit that order to the smart contract the smart contract will check does the signature actually match the order that was created and also does the counterparty and do you have the funds available to actually complete this trade if all those things are true and the order hasn't expired yet then the smart contract will do the trade the the expiration is of course a block number so you can if you'd like to have your order last forever you can choose a block number hundreds of years into the future or you can do a block number that expires tomorrow if you want the equivalent of like a good four day order this off chain order book technology was pioneered by ether ops which was sort of a precursor to ether Delta that I worked on in the beginning of 2016 where it was basically a platform where you could trade options based on the ether to US dollar price and it had a similar option order book technology and the real point here is that as a former trader I really believe that you should encourage people to add the quiddity and make it as cheap as possible and so when you when you add a order to ether Delta it is literally as cheap as it can possibly be there's no gas fee because you're not sending a real transaction to ethereum and there's also no trading fee so it costs you nothing to basically play the role of a market maker on ether Delta every other operation that you do does involve a gas fee so if you are depositing withdrawing doing the trade cancelling in order all those things involve a gas fee and then finally there is a fee for taking the quiddity so if you if you see another order in the order book that you like and you want to trade it you'll be the person paying the fee for that and that's really ether Delta's business model here are some statistics of how it's done to date there are a total of 90,000 addresses that have traded with a smart contract of course some of those might be some people might have more than one address but it's a pretty good measure there are 30,000 daily users using the site and it has processed a total of 3.4 million transactions in the smart contract this is a view from the site if gas station info and it basically lists all of the smart contracts and ranks them by how much gas is being spent on transactions going through that particular smart contract so ether Delta's typically its most commonly in the first place and the percentage of gas that's going through our Delta tends to vary between 10 and 30% depending on the day this next chart is a list of all the smart contracts this is from ether scan and it's sorted by number of transactions that have gone through the smart contract since the beginning of time and so ether Delta is in first place with 3.4 million transactions you can see a number of other names from Polonia exhbit rex in the top four and five and then the first real DAP up there also is ENS with just over a million transactions to date this graph shows the total transaction volume since the beginning of May and it's in ether so when the snapshot was taken at the end of October there was a total of about 1.8 million ether that's been traded through the ether Delta smart contract and this is really a testament to not only ether Delta's success but really the explosion of the token economy in ethereum you can really see June July like that's when I would say the ICO craze really started I did a quick survey recently of ether Delta users to get a sense for what do people think I collected some written feedback but also some numbers that I can actually show you today the first question is what is your overall opinion of ether Delta and the plurality of people just over 20 percent actually love it I was a little bit surprised to see that it's so weighted to the right hand side I think a general impression of ether Delta is that you hate it until you love it meaning you come you're very confused you've never used anything like this before yeah you guys know and then five minutes later after a conversation in the support channel you figured everything out and you love it it's the best thing you've ever used before I asked how frequently do you use ether Delta the majority of people use it either daily or hourly why do you use ether Delta so this is interesting the top choice was to to choose from and so one of the things about user Delta is that because it's happening in the smart contract that supports the ERC 20 token standard you can trade any token you would like there's no restriction some tokens end up being officially listed on the site meaning that the token has approached me and they want to actually appear on the list of tokens in the volume box whereas there are also tokens a trade just as custom tokens meaning someone imports the token address and just starts trading it and then the second-place answer it's decentralized just under 30 percent another thing is that I sometimes talk to people users of the site and ask do you know what's different about easier Delta and their answer is often not oh it's decentralized there are a lot of people using it that don't really realize what are the benefits they're here because there are so many tokens they're interested in one particular year I see 20 token that maybe they weren't able to participate in the crowd sale or they want to to sell something and that's why they end up on the site so I'll go through a handful of lessons learned I think probably any decentralized application can have some takeaways from these the first one maybe you remember this picture on Twitter this was a case where the URL for each or Delta was changing from a github pages URL which was ether Delta github that I owe to the dot-com ether Delta com and the only way I could initially think to verify that the new domain name was actually associated with ether Delta was to take this crazy picture late one night there was also a video the next day another thing about ether Delta that I think is really important is there's this Gitter channel in the beginning there would be you know one or two users per day coming through this channel to figure out how do I use ether Delta now there are 10,000 people signed up and it's really just a constant stream of questions and answers and I think this is really important there's actually a team behind this now so if you go on the the chat room you'll see Ichiro Delta rep one rub two rub three rub for they're answering questions most hours of the day and I think this is really important especially when like your DAP comes online and people actually have to understand things about how aetherium works to use your DAP sure you can hide a lot of it in the user experience but sometimes the users is just going to have to understand how does gas work in order to really figure out what's going on this is a graph with daily volume on the y-axis and funds raised on the x-axis and I've highlighted ether Delta here in the upper left quadrant what I'm really trying to say here is that you see a lot of these decentralized trading platform projects raising funds right now and they have been barely launched they don't get any of the volume ether Delta as a prime example of your business model does not need to involve raising capital as a first step in order to succeed so more on that like when I was starting either Delta in July of 2016 really starting to build it in late April I think I thought good and hard to myself how can I do this without first raising a boatload of cash and secondly how can I possibly monetize this without creating a token and I realized that all I really have to do is charge a fee and that's what ether Delta has been doing for over a year now it is a respectable business model that I wish more people would do so here here it is some some statements that I I would make to two new projects entering the space if your first step is to raise millions of dollars you aren't taking a real risk taking a real risk will make you work harder I mean I was a year ahead of the curve with this project but I was also working hard thinking there are probably other people who have had this exact same idea doing the exact same thing I could go in okay I didn't know it was the thing that I I could have done some kind of an ICO or I could just work hard and build the products and finally having a pile of cash takes away your urgency I really think there there are enough data points now that this is a very true statement and ether Delta is a prime example of of what not having a pile of cash can allow you to actually achieve so there are a handful of things that are new about ether Delta that I want to bring up one you may have noticed that prior to the Byzantium hard fork there were a lot of transactions backlog in the etherium Network I would sometimes look and see thousands six thousand eight thousand transactions pending in the etherium Network and there would be half of them were ether Delta transactions the Byzantium heart fork has helped a lot you no longer have to wait upwards of a day to get your trade done which is just completely unusable and you you won't really as frequently find out that after you've submitted a trade it turns out someone else already did the same trade and your transaction failed wasting gas what many people don't know is that a new back in front end for ether Delta went out the day after Byzantium and so also the front end itself is a lot more live prior to this update you may have noticed that the order book was on the 60-second refresh cycle which was pretty unbearable at times now the order book is real-time and streaming into the front end and so you shouldn't have the situation anymore where there are sale orders and you can't really get a sense of where the real price is so the remaining bottleneck here is really aetherium itself if ether Delta gets the same level of growth that it has received since since the beginning if more dap start coming online and pushing significant transaction volume then the ether delta could be in the same spot again where there are lots of pending transactions and you can't get a trade done and so at this point ether Delta is depending on a theorem itself to to scale to the next level if things continue as they've been going so along with this back-end in front and update there's a new API there was an old rest-based API that people were using to do trays to present data the new socket based real-time API should make it much easier to build things like trading BOTS on top of the ether Delta API or things that can work with the data and display interesting graphs or things like that so there are two examples on the github there's a maker Jas and a taker is the maker Jas is an example of how you can use the API to add liquidity meaning if you want to start market making it by placing orders in the order book in an automated fashion maker Jas is an example of how you can do that and then secondly take our Dutch is as if you want to create trades through the smart contract itself there's an example of how you can do that so maybe if you want to build a bot that does both making and taking to potentially do arbitrage is between ether Delta order books or other trading platforms for these different tokens and those are of course available on the github and there's also a document describing the API and there is also the the examples are in no js' if you are interested in getting those examples ported to other languages there are a couple of bounties support them to c-sharp and python those are the two most popular languages the people are asking questions about how they can do the same thing in a language of their choice so that's all I have thank you for listening [Applause] [Music] [Applause] [Music]
Automatic transcript — names and jargon may be misspelled.