DAPPCON 2018: DutchX - An Open Platform Christiane Ernst (Gnosis)
DappCon 2018 · July 2018 · 19:17
Christiane Ernst of Gnosis presents DutchX at DappCon 2018, walking through the open, decentralized trading platform that uses a Dutch auction mechanism to determine token prices without relying on an off-chain order book. The talk covers how batching trades into periodic auctions can protect against the front-running and manipulation more common in continuous on-chain exchanges, situating DutchX within the broader decentralized exchange landscape.
Speakers
Topics
From DappCon 2018, hosted by Dappcon Berlin.
Transcript
it's great to be here thanks for the introduction David David is actually one of the amazing engineers on this project so he's been reading the Dutch exchange that I get to talk to you about today and I actually have a few exciting announcements throughout the presentation so I'm not going to talk to you and merely about the mechanism but I have some news that's never been announced before so what is the Dutch exchange the Dutch exchange is an open decentralized trading protocols for ESC 20 tokens and it's using a Dutch auction mechanism to determine the fair value for tokens before I go into detail of what that means let me tell you where
we're coming from and why we've been building it the way we have been building it so most decentralized and centralized exchanges are actually built upon the order book model what is an order book model you typically you have your bids and your asks you have a spread between you can place limit audits and market orders for market participants and in other words it's actually a continuous auctions because it processes all the orders as they come in leading to discriminatory pricing so we actually think this model in itself is already a little bit flawed and some of the flaws I've listed here one and possibly the main one is that is prone
to front-running this applies to decentralized and centralized exchanges where actors for example the exchange or miners can act on information that is available to them ahead of time you have high-frequency traders which is usually super algorithmic and trades happening on really acting on high-speed that are just nanoseconds quicker than other than other traders extracting value out of the system if you have overlapping order books and there's not an automatic matching happening of trades you can also have arbitrage the issue of a big spread and the high slippage is usually happening when you have very low volume
and in the market so if you have very illiquid mark is such those that are not often traded keep this in the back of your mind because that's the reason why we've built the Dutch exchange based on entirely two different models so we don't think you can take the order book model model and copy and paste it to the blockchain because it is continuous and on blockchain there's only block time so we've come up with with them so we're implementing a model based on two different action types one is the best auction and one is the Dutch auction so what's happening in two-step if you want to imagine that somebody would like to
trade token a for TRO can be in a first instance the seller of taken a will deposit all the tokens that they want to sell in a batch in a so we accumulate that batch we close the batch that is basically the cell volume and in a second step it's being auctioned off in a Dutch auction a Dutch auction is an auction you might all know it from various icos it's often used it's a ham it starts with a high price and it falls until the market clears why is this really cool because all the bidders will pay the same final price and they're incentivized to take part in the auction exactly at the moment in time where it
reflects the highest willingness to pay because they will end up paying on that the last price and otherwise they might miss out on taking part in that auction so it's really cool it's a single price clearing everybody pays the same in the end there's no discrimination no discriminatory price and pricing and it reflects the true willingness to pay I will quickly walk you through the token design applied in the Dutch exchange because it will become relevant later on so firstly there is a token introduced called Magnolia and it is used to fear reduction and it's being distributed to those trading on the exchange one
Magnolia is minted for every ether worth of trait of a white listed token white listed are those that are made basically not merely created for the purpose of creating fake trading volume it is used for fee reduction so it's really it's meant to benefit those who bring the liquidity to the exchange because in an exchange it's only a life with the liquidity then also part of the fees up to half of the fees we allow participants to pay an owl owl is a token that is created by locking down Gino that's the grossest token and as a matter of fact that is happening right
now and it's the first initial our generation that will finish Friday night so if you hold you know make sure you lock it to obtain ten times the amount in owl and of course you will have your gene or back sadly a really cool feature there off all the fees that are then paid remain in the ecosystem of the Dutch exchange what does that mean all fees are paid in the participating token and they attributed as an extra sell balance to the next running auction of the same path so there's always only one auction for each pair running at each time and the fees obtained in the prior auction go to the fees to the next
auction it creates a stickiness and it always also rewards those people who are high-volume traders and bring the liquidity to the exchange okay so some advantages I just want to highlight that we find that this mechanism brings so you don't have front running because everybody ends up paying the same price in the end there's one single price clearing and we batch the orders it is less volatile because it takes also a long time and all the users obtain the same final price and it's it's actually better for a liquid market in that sense as well as I mentioned due to the
economic incentives in the mechanism and it will lead to a fairer price finding in the end for the users also because all orders are fulfilled there's never any gas in incurred due to canceled and or non fulfilled others it comes at the expense of quick trading because an auction on average would run six hours or at six hours the price curve is defined to reach the prior closing price price some kind of an indication but we actually think this is a good thing because it routes out high-frequency trader so I've actually extracted two more advantages
which lead us to the following and the following reasoning so the entire Dutch exchange is tailored to the fact that other smart contracts can integrate there is no need to for any off chain signing of transactions there's no strategy needed to participate and that is why smart contracts can integrate really well into it and the outcome of it is also an Unchained price Oracle and because they're surprised feat created when the auctions closed so with that open protocol what does that mean let's call the Dutch exchange an open protocol I give you a little bit of a picture so you have this have this in mind so there
are kind of three layers but how you can see how the liquidity is brought to the exchange on the first layer you have the various interfaces that might be offered then you kind of have on shine applications making use of the exchange to exchange tokens and so for prediction market for example it could be that outcome tokens become tradable and then you have those smart contracts tailored in particular to interact with the Dutch exchange and such as for example lending and buyback contracts so it's kind of it's permissionless there is no central entity changing any rules so it should really facilitate easy innovation on top of the Dutch exchange and they're really
low barriers to entry so this is really cool and it leads to a price feed which then in turn can also be used by various decentralized applications okay so decentralized exchange is a super-hype in 2018 right and I think there's not only decentralized and non decentralized exchanges there's a whole scale of decentralization so most exchanges when they say we're decentralized actually mean they're non-custodial non-custodial in the sense that they don't hold customer funds which is great but also we've developed this so we think there are different building blocks to full decentralization
so I show you this we are already kind of non-custodial is clear I've told you about the pure unchain mechanism but it goes even further right so currently in the smart contract their various parameters that can be changed by a central entity but this is being handed over very very soon to a dowel so that actually the entire Dutch exchange will be governed to de centrally that's not the last step so with that latest meta mask match actually it will become a reality super soon that in s domains may resolve on ipfs hashes what does that mean it means that the interface also
can be empty centrally hosted and maintained so we really think that that means it would be a fully decentralized exchange so I want to tell you a little bit more about where we are today and what we are actually working on currently together with ballast tanks to do so let's first let's first talk about what actually are the parameters that somebody can change in the code so we call them auctioneer powers of the Dutch exchange there currently is six or there are six the threshold of adding a token which is 10,000 u.s. dollar at the moment the threshold for auctions to start currently is 1,000 US dollar then
what I mentioned before the white listing and D white listing of tokens of my tokens that generate magnolia which is used for fee reduction then currently it's being used the unchain maked our price feet with can be updated with a 30-day time lag as well the same as the DX master contract and I want to talk to you about the contract straddle the contract structure as well and lastly setting a new auctioneer can only be done by the auctioneer so I have something exciting so the Dow will actually take over governance of the Dutch exchange what will happen very shortly is that 1 million reputation which is the voting rights attributed to the towel will be
distributed mainly to Magnolia holders because we strongly believe it is the magnolias holders who are putting life into the exchange by attributing volume to it mmm also some 2g in all locking into either locking but very excitedly this card you eat a card you will later be able to redeem some of the reputation to your to the address that is attached to your card so hold on to that card it will give you some governance stake and if you think this is exciting it gets even more exciting because we are actually live on Maynard with all our smart contracts and I tell you in a
minute what the smart contracts are so this is the developer release and all of you may now start building on top and using the Dutch exchange as the open protocol that it's meant to be where would you actually start integrating so this is the contract structure of the Dutch exchange and mainly by the DX proxy so the DX proxy basically only points the idea of the proxy is to make the code upgradable it only requests logic from the master all the logic is obtained in the master and returned to the proxy so the proxy holds actually other historic data it holds the funds the whitelist etc so that in future versions of the data
exchange this first mover advantage will never be lost right and it also then points towards a fee reduction contract the Magnolia contract I mentioned and the integration into the contract that leads to the make it out on the side we have these two contracts they are not really part of the DX contracts but they have exactly the same logic and it's the our contract here so we're developers would interact would be mainly and with the proxy this is where you would add new tokens get the prize feed into ACTA sell a bidder pose deposit withdraw claim all these functions would be done in the in the proxy okay so I told you a little bit realize how can you interact but now the
question why what do you want to do so so firstly all those advantages that are actually intrinsic to the Dutch exchange as I mentioned it's permissionless open protocol which will attract the liquidity to that platform it is descent relieve I add au which is really cool and you will obtain Magnolia which can be used for free reduction and this gives you a part of the governance stake as well and actually it may also be traded on secondary markets as well and then there's a fee redistribution so if you trade a lot you will also obtain fees by from other participants then what's really cool also a little bit of a more external incentivization is
canosa's X so the Dutch exchange will be part of the grocer next-closest X challenge which is a developer challenge where you can win up to $100,000 in G and/or token if you want to know more about it we have a booth upstairs about this as well and then I think most importantly its to improve the ecosystem so it's really really cool it will be the first fully decentralized run and maintained piece of exchange exchange and so it's a two sided mattress platform that means that it's really important to have those network effects so the more liquidity there is on the more liquidity will come right so the tools this presentation
will be available to you shortly afterwards I won't go into detail here but you can always come and meet the developers also at our booth and these are really good documentation so feel free to to look at that so now if you need even more reasons why do all that work the interface we've built an interface and that is life on rinkeby so you have also all the details on that little card that you were distributed when you came to the conference and I will I told no I told that I was told to not do this but I would try a live demo for you okay I have I just saw the few minutes okay
let's see I have a little video in case it fades I heard you should have it back up okay can you all see this so this is the interface I'm locked in into rinkeby here you can see kind of the tokens that are traded on it and what I have as wallet balances here you can see if I can return and claim some of the auctions I've taken part and importantly please note this is a seller interface so I've told you I've explained to you that it works in two instances first the seller deposit then the bidder bids right here we only have the interface for the seller depositing so it will take some time for them to come back and
claim I see how many magnolias I've accumulated they're locked so I can't see them in my wallet and what feel ever that means I have a wonderful side menu here I can pick kind of the the pair that I would like to exchange so I would like to deposit Etha and receive Radin let's go ahead and deposit one Etha I will continue to my wallet details I'll submit this we actually have this neat feature that we're wrapping the ISA for the user though we don't unwrap it because we actually want to incentivize the community to have wrapped either I will confirm this so I can approve for this
trade which I do so I can I approve the token transfer then here it gives me the option as I mentioned to pay an hour and as I have out in my wallet and I might do so I will not do this so I can still show other people how it works otherwise it will I confirm this and this actually will now take a little bit of time for the reason that we with all the prior transactions we are not waiting for the transaction to be mined and now all going to be mine now so this will take about half a minute how are we on time
oh but as the developer of this project watching a live demo it's really stressful we we're good we have like two three minutes excellent and you can always verify the token address down there with either skin so based on the network obviously rinky be here you can go ahead and make sure that you're actually trading right in and that really cool SVG I mean I made that the reason why we've we've kind of done it this way is that the user can now go and do something else rather than waiting for one transaction to be mined after the other and I get this neat auction overview page which I can come later
back to claim the the Radin that I have purchased and this brings me back to the main page [Applause] cool