New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

MakerDAO Oracles: The Backbone of Decentralized Finance by Niklas Kunkel (Devcon5)

DevconFri, Oct 9, 2020, 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/5/makerdao-oracles-the-backbone-of-decentralized-finance For the past two years, MakerDAO's Oracles have been running on Mainnet, powering not only the 500 million Dollar Dai Credit System, but most of the Decentralized Finance projects that run peripheral to it, like secondary lending platforms.In this presentation, you'll learn about the history of MakerDAO's Oracles, what worked, what didn't, and get a good look at the Version 2 Oracles that will power Multi-Collateral Dai and the rest of Decentralized Finance on Ethereum. Speaker(s): Niklas Kunkel Skill level: Beginner 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 5 was held in Osaka, Japan on Oct 8 - 11, 2019. 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

[Applause] so the accuracy of your call may be off when the network is congested and you know the Oracle maybe not as resilient right maybe you don't even get enough transactions through to to reach each one right and so this really doesn't scale all that well right and it's pretty expensive to run so but you're trying to come up with something that most like collateral die we're gonna have many different kinds of collateral right you can use many many many Oracle's this kind of architecture is just not going to work so there's also one huge criticism that people will usually give us and it's why if you don't reclaim that these are decentralized normals why can we not use not change my sources you know why aren't we using this law why aren't we using way suspects why aren't we using kyra the big reason is liquidity right so often liquidity is in general much much higher than I'll chain with Brittany so it's much easier to manipulate an order book on chain than it is to manipulate an order book off chain right so if you don't have a lot of the clarity of your book it's very thin you can spend a very small amount of money to manipulate the price a very kind of good story that illustrates this is earlier this year Big Macs effectively got played and so for those of you who don't know about happen bit max pulls its prices by taking the average of point base and name so bitstamp tends to have about six times less volume than point base so when the attacker did was they opened the giant leopard for position on MX they then sold a ton of ptc on vista which crashed the price which caused the pit mix oracle rights to read a super low volume and the guy made you know i think millions of millions of dollars so that was not good but there is a much much bigger problem with watching price forces and that is if you can you can imagine for example a contract right a contract can do a lot of different things so if you tell your contract to do a series like a sequence of different actions you can actually you know gain these Unchained price forces with very very very little risk so this leads me into a very big point that I want everyone realized decks as an Oracle is a huge anti-pattern so effectively an attacker can atomically execute a series of transactions and single block to manipulate the price of decks and all they're going to do is pay dusties and to take zero risk absolutely none so there's guy called sands easy son last week who released the paper but I was kind of really in to five that before this paper was published back in February even a slob tweeted this about themselves and yet people still went ahead and did so you can read you know the attack on the tweet itself right effectively the attacker will just make a huge trade on you know swamp right that will you know either drop or raise the price they will hook whatever things are trying to compromise right to check the price from you know swap they will then use that manipulated price right some kind of profitable action and then in the same transaction we'll go and we'll sell all the stuff they bought in swap our soul right back I until they effectively just lose the sagacity for that transactions right as risk-free so in this paper of SNCC so I publish effectively way showed was that you can compromise feed X and V Z X which allows you to do that this case you know create a huge leverage position and easy access pages to spat borrow against I guess plow alright so if you can make your collateral a super super high price right that you can borrow a die right and then liquidate back that I made the profit there and so I'm just going to read this quote from him because he can save a lot better than I think rewording but effectively a deed accent bzx assume that you know Slavic Tiger would be a source of accurate price data however and after a reef red X just means that a trade can be made at that rate while after a rate for a defy project means that's actually close to the fair market value okay so let's talk about or plus v2 this is what we are going to be using for MCD and has been used by a couple of select partners since back in February I believe so our main goals with or plus b2 was we want to make them saleable we want to reduce the cost considerably we want to make them more reliable and we want to reduce the links so one of the key kind of technologies we're using a normal ski - is secure stoplight so what secures table is is it's a peer-to-peer gossip network you can kind of think of it like Twitter SS where every here is a Twitter user right and they post a message and that message goes on their feet and anyone following you know that Twitter user will repost that on their feet and so this is kind of how all these messages can propagate along in this gossip hell it's actually very similar for watching and that's everything is hash linked so in that sense it's immutable you can't go back and change the message you can't go back and delete a message okay so there's a lot of stuff on the slide but let's let's take this whole of a slow so the fees are no longer pushing their prices to a price new contract right if you look at the two kind of sections of this I've kind of cordoned off this off chain process and the on chain process the off chain process has gotten considerably larger and the on chain process has gotten my favorite pastas government service floor so effectively now these will just push their price updates your stuff up and since the cost of that is affected with free the feeds can now kind of post prices at a much much lower sensitivity right so you're going to be much much more accurate right into the much less than 4 and up recent data to work with so basically then real layers is a new concept a real layer is a boss that anyone can go around any individual any third party you know you could run a relay and what these real layers do is they pick a bunch of these crises messages and then they swarm them and then they put one transaction through the media master contract so instead of having any feeds doing n transactions you now can have any fees and all you do is one transaction no matter how many feats you have so in terms of scalability that's a huge improvement and effectively the way that we do this you know how do you make sure that these prices are lifted it is that the feeds are effectively using their etherion private key to sign the price noodles so they sign a message essentially saying this is the price of this asset at this time and in the median Iser contract you can use a solidity function call you see recover that will then be able to check all that data and make sure it was signed by a legitimate feed another thing here is that the number of s store operations has been reduced considerably so for those of you who don't know an S store is just you know writing a value to stories and it's a very very very gas intensive operation so the less as stores you can do to achieve where your transactions are going to be so we got it from scaling from two times the number of fees to just two another thing I learned well is that this architecture is fairly blocks and agnostic so if you look most of the pieces are off chain so if you want to work attention to a different watching the only thing you have to do really is recreate the median Heiser contracts on that other blockchain and then you just point your real Ayres to that other watching another thing is since no block messages are just JSON you can handle all kinds of data it's not just pricing table right you can handle many many many more types of data so it's very very dynamic okay so let's talk about feats so in orbitals b1 we only had one kind of feed and we're going to label those types of feeds dark feeds so with our fees are is they're kind of these two dominant like Sooners individuals and organizations right that's submit this pricing data and you know one of the big criticisms we get you know let's not know why are these people you know anonymous I don't know if I trust them is it just a bunch of maker insiders or wheels or whatever right but the thing is they need to be honest by necessity right so if you if you are a public identity right it's very easy to target you so blackmail when you export you coerce you it's also very easy for a state after they kind of hunt you down by being you know by having this community you kind of protect yourself from that right but the downside here is as we said you know there's no civil resistance and you don't know if all of these fees are actually just one person and people seem to really distrust that kind of idea so what we're introducing in our world owes me two is this concept of a lengthy so length feed is going to be if a feed that has a public identity so the best types of like feeds are actually going to be once run by organizations because organizations you know are of people they're much harder to kind of coercive blackmail they have more resources and I'll talk about that they have their reputation at stake right so in that sense if you have a system that has much length these right users are going to inherently maybe trust that system more right because so-and-so is running like the Metro stuff right this Bank is running a life you can I trust I'm you know quite basis running a live feed nitro supply base and so essentially when it comes down to is you don't want to have just our piece and you don't want to have just like each wait they both have kind of disadvantages fly there's this kind of sweet middle where this hybrid model is kind of optimal where you kind of preserve the hardness properties of dark feats but you benefit from the reputation of the lengthens okay so let's talk about governance so in Oracle's be to effectively governance takes over end-to-end ownership and management of every aspects of the Oracles and so actually as of this morning and I was on a flight to Osaka here we passed four different Oracle proposals so as at the spring these are all official I can out talk to you about them without any risk of saying something that's not true so what we passed was and I'll get into these a little more a little bit the d5 public feedback Volvo the Oracle incentives for structuring proposal the responsible Oracle migration proposal and the Oracle Team mandate proposal so first along define light feet proposal okay so we are going to be adding dyd X 0 X maker set protocol and gnosis as the first license so that's the super exciting this is just a first way there's going to be a bunch more but it's really cool to have these guys have these guys on board okay number two the Oracle incentives for structuring proposal so we don't have to talk about decentralized systems in terms of for example like the data being you know self dollar right I think a key point a lot of people miss is that these systems if they're going to succeed they need to be self sustainable so in this diagram on the right you kind of see this incentive and alignment that I've come up with and essentially what's going to happen is that fees are going to be paid in die every month by maker token holders right and this is a payment or the valuable service they provide right and kind of an incentive you know to not be able to speak in sermon the Oracles are going to have a waitlist added to them so you need to be on the white list in order to access prices so the data consumers are going to have to pay it monthly and I to MK our token holders in order to access the Oracle prices and so the I'm not going to die right that's going to be paid to the fees right the amount of dye that's going to be charged bank our token holders this is all defined by governance so this is not you know set by like the maker foundation and the last proposal that I cover today is the responsible Oracle migration proposal so Orville's be one that's kind of proliferated all around define and I think that's super super cool right we built something and everyone can use it and everyone's building really cool stuff on top of it but we don't actually know how many people are actually using this thing and it's actually kind of scary when you think about it so you know some people are open about it it's breeding their complementation that they use it right some people have talked to me at conferences and say oh you know we're using the Oracles but I'm sure there's dozens and dozens more that we don't know about and so it's kind of our responsibility to be kind of a good citizen of the ecosystem and make sure that this transition goes extremely smoothly so what we committed to of this proposal is that orbitals be one is going to Brian parallel with Oracle's T 2 until at least single collateral die is shut down and so that is at least six months out so it gives these organizations six months to kind of transition over to work will speak to on top of that we're going to be getting a whitelist access to the Oracles any more moles any number of Oracle's for free for one year so this makes sure that you know Bill line is kind of has the rug pulled out from under them right and everyone has time to transition to the architecture see if it's what they like and hopefully a year from now you know Volvo slowing us down and so this kind of allows us to support innovation right it lets a civil support you know new projects right I don't have any funding right that's just a demo you know that home building something cool all right if you can still use Oracle's no problem and if it ever turns into something right then there's a long-term management for the system okay and that's all I have for you today if you want to find out more we have a bunch of different socials you can find us on Twitter our active chat really active forum and active subreddit or you can come find me always happy to talk about morals yeah thank you very much [Applause]

Automatic transcript — names and jargon may be misspelled.