Skip to content
Lex Fridman PodcastLex Fridman Podcast

Sergey Nazarov: Chainlink, Smart Contracts, and Oracle Networks | Lex Fridman Podcast #181

Sergey Nazarov is the Co-Founder of Chainlink, a decentralized oracle network that provides data to smart contracts. Please support this podcast by checking out our sponsors: - Wine Access: https://wineaccess.com/lex to get 20% off first order - Athletic Greens: https://athleticgreens.com/lex and use code LEX to get 1 month of fish oil - Magic Spoon: https://magicspoon.com/lex and use code LEX to get $5 off - Indeed: https://indeed.com/lex to get $75 credit - BetterHelp: https://betterhelp.com/lex to get 10% off EPISODE LINKS: Sergey's Twitter: https://twitter.com/SergeyNazarov Chainlink Website: https://chain.link/ PODCAST INFO: Podcast website: https://lexfridman.com/podcast Apple Podcasts: https://apple.co/2lwqZIr Spotify: https://spoti.fi/2nEwCF8 RSS: https://lexfridman.com/feed/podcast/ Full episodes playlist: https://www.youtube.com/playlist?list=PLrAXtmErZgOdP_8GztsuKi9nrraNbKKp4 Clips playlist: https://www.youtube.com/playlist?list=PLrAXtmErZgOeciFP3CBCIEElOJeitOr41 OUTLINE: 0:00 - Introduction 1:33 - Hedgy 1:59 - Digital vs physical world 9:53 - Definitive truth 14:08 - Decentralized finance 22:37 - Smart contracts 28:53 - Hybrid smart contracts and oracle networks 45:39 - Applications of smart contracts 1:03:45 - AI and smart contracts 1:11:17 - What agreements can be turned into smart contracts? 1:22:19 - Privacy 1:32:38 - Trust 1:48:12 - Bitcoin 1:56:26 - Satoshi Nakamoto 2:03:46 - Ethereum 2:09:36 - Chainlink design decisions 2:22:04 - Dogecoin 2:26:21 - Book recommendations 2:38:31 - Advice for young people 2:50:35 - Meaning of life SOCIAL: - Twitter: https://twitter.com/lexfridman - LinkedIn: https://www.linkedin.com/in/lexfridman - Facebook: https://www.facebook.com/lexfridman - Instagram: https://www.instagram.com/lexfridman - Medium: https://medium.com/@lexfridman - Reddit: https://reddit.com/r/lexfridman - Support on Patreon: https://www.patreon.com/lexfridman

Lex FridmanhostSergey Nazarovguest
May 1, 20212h 59mWatch on YouTube ↗

EVERY SPOKEN WORD

  1. 0:001:33

    Introduction

    1. LF

      The following is a conversation with Sergey Nazarov, CEO of Chainlink, which is a centralized oracle network that provides data to smart contracts. He and his team have done seminal research in engineering in the space of smart contracts. Check out the Chainlink 2.0 white paper that I found to be a great overview of their technology and vision. It's 136 pages, but very accessible. Quick mention of our sponsors; Wine Access, Athletic Greens, Magic Spoon, Indeed, and BetterHelp. Check them out in the description to support this podcast. As a side note, let me say that externally connected smart contracts that combine the ocean of data out there with the security of the blockchain are fascinating to me, both technically and philosophically. Data is knowledge, and knowledge is power. I think the more reliable data sources we integrate into our decision-making, especially when those decisions are executed by programs, the more efficient and productive our decisions become. There are interactions between humans that should not be formalized digitally, like love, for example. But for all the others, there's no reason for smart contracts not to automate away the menial parts of life, making more room for good conversation over brisket and maybe some vodka with old and new friends. This is the Lex Fridman Podcast, and here is my conversation with Sergey Nazarov.

  2. 1:331:59

    Hedgy

    1. LF

    2. SN

      Is that Yozhik there?

    3. LF

      He's... So I gave away everything I own a few times in my life, and he accidentally survived, and I don't like stuffed animals. What I really liked about him... I got him at a thrift store. What I liked about him is 'cause I'd never seen a stuffed animal that looks pissed off at life. Like, they're usually smiling in the dumbest of ways-

    4. SN

      (laughs)

    5. LF

      ... and this guy was just pissed.

    6. SN

      (laughs) Yeah, I gotta tell you, that's actually pretty funny.

  3. 1:599:53

    Digital vs physical world

    1. SN

      (laughs)

    2. LF

      (laughs) I like this guy. If you had to live only in the digital world or the physical world, which would you choose?

    3. SN

      So I, I think this is actually a question more about what the fidelity of the digital world would be versus the physical world. I, I think this, this type of question, this whole simulation thing, actually comes from papers about 20, 30 years ago, in, in the philosophical world, where people tried to make this thought experiment of, of would you be comfortable if, if everything that was happening to you happened in a simulation.

    4. LF

      Mm-hmm.

    5. SN

      What they were trying to do is they were intuitively trying to understand is, is there some kind of intuitive, um, personal connection we have to something being the real world, right?

    6. LF

      Yeah.

    7. SN

      And then the Matrix movie actually came out of these papers, and then these ideas made its way, made their way into the public consciousness. Um, I personally think that if I had the choice to be in the digital world at the same fidelity as the real world with immortality, I would absolutely go with the digital world.

    8. LF

      Wait, wait, wait, wait, wait. How'd you add the immortality part? That's a-

    9. SN

      Well-

    10. LF

      You don't get immortality.

    11. SN

      If you think about how we would go into the digital world, right, our, our, our brain patterns would be mapped-

    12. LF

      Mm-hmm.

    13. SN

      ... onto some kind of, uh, probably virtual machine, right?

    14. LF

      Yeah.

    15. SN

      And that would mean immo- immortality, right? Because the virtual machine has no limit to how long it can exist.

    16. LF

      But don't you think there would be like a versioning system, like, uh, there'd be... This is a soft for- fork versus hard fork question, whether Sergey version 2.0 would be different from Sergey version 1.0, there would be an upgrade, so that's immortality. Sergey 1.0 would die in the digital world. You need to get-

    17. SN

      Well-

    18. LF

      ... you get like a software (laughs) update and then that's it, you know?

    19. SN

      We- Well, yeah, when, when people go into the Star Trek transporter, are they-

    20. LF

      Yeah.

    21. SN

      ... killed or are they transported?

    22. LF

      Yeah.

    23. SN

      I, I don't really know. I haven't read any papers on this. (laughs)

    24. LF

      (laughs)

    25. SN

      I haven't really thought about it too much.

    26. LF

      There's no white paper on the transporter?

    27. SN

      Not, not, not at this point, so, uh...

    28. LF

      But what, what does fidelity mean exactly, to you? Is it like strictly... So the fidelity of the physics world, um, the physical world is maybe now questions of physics, quantum mechanics, what is at the, at the bottom of it all?

    29. SN

      I-

    30. LF

      Or do you mean the fidelity of the actual experience, like-

  4. 9:5314:08

    Definitive truth

    1. SN

    2. LF

      So, you've talked about the concept of definitive truth.

    3. SN

      Mm-hmm.

    4. LF

      What is it? And in general, what is the nature of truth in human civilization? And just talking about the digital age, uh, the nature of truth in the digital age.

    5. SN

      So, the- the interesting thing about definitive truth is that it actually exists on, um, on this, uh, at least in my mind, on this spectrum, between objective truth and just, you know, somebody, uh, made something up but nobody else agrees. So, what I- what I- what I think definitive truth is, is it's somewhere in the middle on that spectrum, where if you and me def- define, uh, what truth is, right? Like, if you and me have an agreement of some kind, and we say, "As long as the weather is sunny or the weather isn't... th- there is no rain on that day, then there will be an insurance policy that results," and you and me both agree that as long as three sensors, three monitoring... weather monitoring stations all say that, then the definitive truth for us and for that agreement is the result of- of those systems coming to consensus about what happened out in the real world. I- I think the objective, um, truth definition from- from kind of the philosophical world is really, really stringent and very, very hard to attain. And that's not... that's not what this is, and that's actually not what commerce or the ability for people to interact about contracts needs. What I think the world of commerce needs is an upgrade from someone can unilaterally decide what the truth is, to there can be a pre-agreed set of conditions where we define what the truth is under those conditions. And then, you know, you and me basically say, "If these 20 nodes or if these 30 data sources come to consensus within, you know, this method of consensus with this threshold of agreement, then definitive truth has been achieved for you and me in- in our relationship for this specific agreement." And the specificity and- and our shared agreement to that...... kind of truth or that definitive truth-

    6. LF

      Mm-hmm.

    7. SN

      ... being acceptable to both, both of us is, is probably what's, what's, um, kind of necessary and sufficient for everything to move forward in a better way. In, in any case, much better than, you know, "I'm a bank or an insurance company, I'm gonna unilaterally decide what happens."

    8. LF

      Mm-hmm.

    9. SN

      It's, it's definitely an upgrade from that.

    10. LF

      Do you think it's possible to define formally in this way a definitive truth for many things in this world? Like you talked about weather, s- s- basically defining that if three sensors of weather agree, then that we're going to agree that that is a definitive useful truth for us to operate under. So, how many things in this world can be formalized in this way, do you think?

    11. SN

      Uh, a huge, a huge amount. So, so there's, there's actually, um, two, two things going on here. One thing is the amount of data that already exists, right, and the pieces of data coming off of, you know, markets, IoT, shipment of goods, any, any number of other things. Like even, even your YouTube channel has a certain amount of likes or a certain amount of clicks or a certain amount of views, and even that's quantifiable, right? So even to a certain degree what we do here today, you and me right now, can be quantified as far as the amount of views, the amount of clicks, the amount of any number of other things.

    12. LF

      Yeah. You, the viewer, have power of data in your hands by clicking like or dislike right now, or the subscribe button, or the unsubscribe button, which I encourage you to do. Anyway, uh, okay, so there's data flowing in, into all interactions in this world. There's data.

    13. SN

      There's more and more data, right? Like there's-

    14. LF

      More and more data.

    15. SN

      ... more and more data. That data is more and more accessible to everybody, and that accessibility and the fact that there's more of it means we can form more definitive truth proofs.

    16. LF

      Yeah.

    17. SN

      We can form more and more proofs, and as we form those proofs, well, we can provide them to these blockchains and smart contract systems that consume them and then they're tamper-proof, right, so they can't be manipulated. And so now we've combined a system that can prove things with a system that guarantees us certain outcomes, and we have a, a better system of contracts which is, which is, uh, a- actually an unbelievably powerful tool that has never existed before.

  5. 14:0822:37

    Decentralized finance

    1. SN

    2. LF

      Can we talk about the world of commerce and finance, decentralized finance? What is it? Uh, what's its promise from both a philosophical and a technical perspective, if we just zoom in on that particular space of the digital world?

    3. SN

      Sure. So dec- dec- decentralized finance is the instantiation of a specific type of con- smart contract, right, or what I call hybrid smart contracts, which are these contracts that combine the on-chain code together with the off-chain proofs that something happened. That's, they're called a hybrid because they basically use both of these systems, right, the blockchain and the proofs about what happened. And what DeFi is, is one specific type of hybrid smart contract that is taking on the contractual agreements you traditionally find in the financial, global financial system, right? And, and that's basically the world of lending, the, the world of yield generation for people giving me or giving, giving whoever their money and, and somebody giving back them, yield back to them which is what bonds do and what treasuries do and what a lot of the global financial markets do, as well as the ability to gain exposure and protection from different types of events and risks. That's a lot of what derivatives do, right? Derivatives allow us to say, "Hey, something's gonna happen and I'm either gonna protect myself by getting paid if it happens or I'm going to benefit from it happening by basically saying it's gonna happen, putting money down on that, and that prediction will get me a, a return." Now, that's a, a large, a very large part of the global financial system excluding all the stuff for global trade and letters of credit and all the stuff that facilitates international trade, so excluding, excluding that at least for now. So if we look at what decentralized finance does, it takes all of those agreements about generating yield, lending, and, and all of these types of things you find in global finance and the world of derivatives and a few other types of financial products, and it basically puts them into a different format, right?

    4. LF

      Mm-hmm.

    5. SN

      So the format you have for centralized financial agreements is that you go to a bank, even if you're a hedge fund, even if you're like the richest people, you, you, you go to a bank, they make a product for you, and you hope that they honor the product that they made for you. Or you do a deal with another hedge fund or, or, or whoever, some counterparty, and you hope that that deal is honored.

    6. LF

      Yeah.

    7. SN

      And then, um, a number of very freaky things start to take place.

    8. LF

      (laughs) Uh-huh.

    9. SN

      One, one of them is people don't have clarity about what the agreement is, right? So a lot of people don't know exactly what the agreement is between, um, between those parties because they can't actually see it. Sometimes agreements are kept very private or parts of them are kept private, and that keeps, you know, other counterparties, other people in the system from understanding what's going on. This is actually partly what happened with the mortgage crisis. The mortgage crisis in 2008 was basically there were a lot of agreements, there were a lot of assets, but because the centralized financial system worked in such an opaque way, it was so unbelievably difficult to understand what was going on, right? And so that lack of understanding for the global financial system basically led to a big boom and then correspondingly very, very big bust which, uh, amazingly enough had a huge impact on everybody even though they didn't participate in the boom part of the, of the equation. Um, in, in any case, what decentralized finance does is it takes these financial contracts that power the global financial system, it puts them in this new blockchain-based format that basically at this point provides three very powerful things. The first thing that it provides is complete transparency over what's going on with your financial product. So this means when you use a financial product in the DeFi format, you, and you as a technical person actually, can drill down very, very, very deeply and you can understand where the collateral is, you can understand how much collateral there is, you can understand what format it's in, you can understand how it's changing, you can understand this on a, you know, second to second or block to block basis, right? So you have complete transparency...... into what's going on in the financial protocol that you have your assets in, which is because blockchains and the infrastructure all of these things is, are built on force that transparency.

    10. LF

      Mm-hmm.

    11. SN

      Right? Whereas the centralized financial system is very, very good at hiding it. It's very good at hiding it and packaging things in a glossy wrapper, creating a boom, then a bust.

    12. LF

      Mm-hmm.

    13. SN

      Decentralized finance is built on infrastructure that forces transparency such that everyone can understand what the financial product does from day one, and in fact, escaping that property is practically impossible, or if someone tries to escape it, it becomes immediately obvious and people don't use their financial product. So, so that's number one. Number two is control. So, if you look at what happened with Robinhood, everybody thought the system worked a certain way, right? Everybody thought, "I have a brokerage account. I can trade things under, you know, a certain set of market conditions." And then the market conditions changed within the band of what people thought they could do, and everybody was fascinated to find out that, "Oh, my God. I thought my band of market conditions in which I can control my assets is X-"

    14. LF

      Mm-hmm.

    15. SN

      "... but it is actually Y."

    16. LF

      Hmm.

    17. SN

      It is actually much, much smaller band. And the, the, the reason it is a much, much smaller group of market conditions is that, um, the system doesn't work the way people think it works. The system was wrapped up in a nice glossy wrapper and given to them to get them to participate in the system because the system requires and needs their participation. But if you actually look at how the system works underneath, you will see that it does not work the way people think they, i- that it works. And this is actually another reason that DeFi is so powerful, because DeFi actually g- and, and, and these blockchain contracts give people the version of the world they think they already have, which is why they don't beg for it, right? So, everybody thinks they're in a certain version of the world that works in this reliable way, transparent way. They're not. They don't realize it, and so they're confused when you tell them, "I'm gonna make the world work this way," because they think they're already in that world. But then things like Robinhood make it immediately, painfully clear that that's not how the world works, so that the second real property of DeFi is control, which means that you control your assets. Not a bank, not a broker, not a third party. You. You control your Bitcoins, you control your tokens in the finance protocol. If you don't like how something's going in that protocol, you can remove it. You can send it to another protocol. Or you can use a feature of the protocol to do something it's supposed to do, and guess what? Nobody can just say, "Oops, you know, that feature, that isn't so good for my friends over here? You know, that feature is actually, you know, we're just gonna pause that feature," in the critical moment when you need it to, to, to execute your, you know, your strategy, which is why you took all the risk to begin with. And then the final reason, um, you know, the final thing, uh, to know about DeFi is that DeFi is inherently global, and actually right now provides better yield globally. So, if you go to a bank right now with the US dollar, you get, um, 1% or less. If you go to DeFi with the US dollar, you get 7 or 8%. So, if, if we think about that, um, in, in a world where there's a lot of inflation coming down the road, and we think about, well, you know, a lot more systems might be failing soon b- and, and, and they might be highlighting these types of problems that were there for, or as a result of the type of control that you see in, in, in Robinhood, and people are more and more concerned about both transparency and control and they're looking for yield to combat inflation, um, I, I think that's what DeFi is about in a practical sense. It is this clarity about your risk, it is control over your assets, and amazingly, at the same time as having those two unbelievably useful properties, it is actually superior yield. Which, which, which, which, which, which just leads me to the very obvious conclusion that the only (laughs) reason DeFi isn't more used is 'cause more people don't know about it-

    18. LF

      Mm-hmm.

    19. SN

      ... and by virtue of this long kind of, you know, uh, explanation here, and, uh, here and elsewhere, more people will know about it and it's, it's just such an obviously superior solution that I, I, I haven't heard a single explanation as to why, um, "No, no. Don't earn 8% and take less risk and have more transparency with your assets." (laughs) "Earn 7% less, take more risk, and, um, give people the ability to change the rules on you at their discretion. Go do that."

    20. LF

      And-

    21. SN

      W- who's gonna do that?

  6. 22:3728:53

    Smart contracts

    1. SN

    2. LF

      ... and in general, on the first two of transparency and control, first of all, I do think, maybe you can correct me, but from my perspective, they're, they're like deeply tied together in the sense that transparency gives control.

    3. SN

      Transparency creates accountability, and, and there's this kind of game being played, ga- game, game theoretic game, where if I know, if you know I'm gonna discover your deviation, you're not gonna deviate.

    4. LF

      Yes. This could be a whole nother conversation, but just as a small aside, on the social network side of things, which I've been thinking deeply about in the past year or so, of how to do it right there, how to fix our social media. And I tend to believe that human beings, if they're given clear transparency about which data is being stored, how it's being used, where it's being moved about, just all, a clear, simple transparency of how their data is being used, and them having the control at the very minimal level of being able to participate or to walk away, and walk away means delete everything you've ever known about me, that that will create a much, much better world. That currently there's a complete lack of transparency in social media how the data is being used for your own protection. I mean, there's a lot of parallels to the Central Bank situation. And there's not a control element of being able to walk away. Like, being able to delete all your data, delete your account on Facebook, is very difficult.... it doesn't take a single click, which I think is what it should take. There should be a big red button that says, "Delete everything you've ever known about me," or like, "Forget me." (laughs) So, I think that coupled together can create a very different kinda world and create a- an incentivization that will, uh, lead to, like, progress and innovation, and just like, a much better social network, and a-a really good business for the future social networks. But, so I tend to see, like, control as naturally, uh, being a sort of a- a s- uh, uh, an outgrowth from the transparency. It should all start at the transparency, which is why the smart contract formulation is fascinating, 'cause like, you're- you're formalizing in a simple, clear way, any agreements that you're participating in. And as a side comment also, what's really inspiring to me is that I think there's a greater, I don't know if this is always the case, but it seems like from having talked to people on the psychological element, there's a hunger amongst people to- for transparency and for control. Like, transparency, another word for that is authenticity. If you look at the kinda stuff that people hunger for now, they want to know th- the reality of who you are as an individual. So, that means you can create businesses, you can create tools that are built on authenticity, on transparency. And then the same, I'm inspired by the intelligence of people if you give them control, if you give them power, that they would make good choices. That's really exciting. Of course, not everybody, but that means that decentralized power can create effective systems. So, couple that, there's a hunger for transparency, so we can move to a world where everyone is being just like real, you know, conveying their genuine human nature, and people are sufficiently (laughs) intelligent that if you're, if they're given power in a distributed mass-scale sense, that we're going to build a better world through that, as opposed to centralized supervised control, or only a small percent of the population know what the hell they're doing and everybody else is clueless sheep. I'm- I'm ... so, those two coupled together is really, to me, inspiring.

    5. SN

      Ju- just to really quickly comment on the stuff that you just said, which I think is super-

    6. LF

      Yeah.

    7. SN

      ... super, super fascinating. Um, I- I- th- I think that's all exactly right, I think everything that you said is- is right, and I think it's actually gonna be the same for social media and banking and every other type-

    8. LF

      Mm-hmm.

    9. SN

      ... of contract-

    10. LF

      Mm-hmm.

    11. SN

      ... is that all of those systems that house people's value for them and take control of- of either their social media value or their financial value or whatever for them, all of that is gonna be made available to people in like, this autonomous piece of code that does the same thing that the centralized entity used to do. So, they get all the features, but the autonomous piece of code gives them the ability to have control while getting all the features, right?

    12. LF

      Yes.

    13. SN

      So- so banks give you features, social media sites give you features, you know, whatever other system that you use online gives you features, and then it takes your data and it takes control of your assets from you in return for those features.

    14. LF

      Mm-hmm.

    15. SN

      Right? I think the whole big difference here, partly in line with, you know, the definition of smart contracts and its evolution, is that there's this uh, now there's- there's this autonomous piece of code that's giving you all those features without requiring the ownership and lock-in and control and unilateral kind of ownership of your data or your value or- or whatever it is that- that you're giving it, right?

    16. LF

      Mm-hmm.

    17. SN

      And I think what this'll lead to, fundamentally, is just more of a free market dynamic among how people make ... I- I think with the social media folks, you should- you should just make some kind of law or something where you can just export all your data from them, everyone should be able to get their data exported by another application, and then the network effect of all these social media sites will kind of crumble 'cause people will just combine your Twitter data with your Facebook data with everything else into an application that you control, and there'll just be thousands of different interfaces competing for how to consume all the social media data-

    18. LF

      Mm-hmm.

    19. SN

      ... because it isn't locked in in one centralized actor's control. And so this is- this is just the recurring pattern of what I think all of this will do, is it'll give pe- it- it gives pe- it gives people a better deal, right? It gives them features without ownership of data, without ownership of value, and- and- and that's really the difference.

  7. 28:5345:39

    Hybrid smart contracts and oracle networks

    1. SN

    2. LF

      So, I think this is a good place to talk about smart contracts, then. Can you tell me the history of smart contracts and the basic sort of definitions of what is it?

    3. SN

      Sure. So, I- I think smart contracts as a definition has actually gone through some- through some kind of changes or an- or small evolution. Initially, I think it was actually a conception of a digital agreement that was tamper-proof and could know things about the world, right? So, it could get proof and it could define that something happened and it could conclude an outcome and release payment or do something else. That's actually the definition of smart contracts that I began working in this industry with seven or eight years ago-

    4. LF

      Mm-hmm.

    5. SN

      ... when I started making smart contracts. That is the conception that I had of a smart contract. Then what happened was, that was really hard to do, right? Building that type of tamper-proof digital agreement that could also know things about the real world and release payments back to people about those events that were codified in this tamper-proof format-

    6. LF

      Mm-hmm.

    7. SN

      ... was actually a very tall order. Turns out it's consistent of three parts, it's consisting of the contract, the proof about what happened, and you know, the release of value. The way things have evolved so far is that the definition has now come to mean on-chain code, right? So, it's come to mean the codification of contractual agreement on a blockchain, right?

    8. LF

      Mm-hmm.

    9. SN

      So there's some code out somewhere on some blockchain that defines what the agreement is.Now, that eliminates the part of the definition that's related to knowing things about the world, and it partly eliminates the definition about payments and, and stuff like that. But basically, it's, it's on-chain code.

    10. LF

      Mm-hmm.

    11. SN

      Right? We, in, in, in our recent work on, on the second white paper, have actually put out a different definition that we call hybrid smart contracts-

    12. LF

      Mm-hmm.

    13. SN

      ... that actually tries to go back to the initial definition that I started with seven or eight years ago, which basically says that there's some proof somewhere that's proven to the contract, and the contract can know that, and the contract can gain proof. Then it can use that proof to settle, um, the agreement that's codified on a blockchain. So you, you both need a mechanism to provide proof, you need a mechanism to codify the contract in a tamper-proo- proof way on something like a blockchain. And then, as with all contracts, there's a presumption that there's some kind of release of value.

    14. LF

      Mm-hmm.

    15. SN

      So, I think a smart contract, in our industry right now, means on-chain code-

    16. LF

      Mm-hmm.

    17. SN

      ... which limits it to whatever can be done on chain only. And then in, in, in our internal definition for us, um, and for us at Chainlink and for me, um, it's hybrid smart contracts, which is actually the original definition. It's the, it's the idea that a contract can both know what happened and automatically resolve to, to, to the proper outcome based on what happened.

    18. LF

      So you're referring to the Chainlink 2.0 white paper, which is a paper that I recommend people look. It's a very easy read, and very well structured, and very thorough, so I really enjoyed it. Very recently released, I guess.

    19. SN

      Yeah.

    20. LF

      Can you dig in deeper, what is a hybrid smart contract? You mentioned sort of this idea of data, or knowing about the world, and on-chain and off-chain. So what are the different roles in this? So hybrid, by the way, refers to the fact that it's on-chain and off-chain contracts. So maybe digging deeper of what the heck is it and what does it mean to know stuff about the world? From, like, how do you actually achieve that?

    21. SN

      Yeah. Ab- absolutely. So the on-chain part is where the agreement itself is. That's the smart contract itself, and that's where you codify certain conditions such as the conditions under which an interest payment is made, or the conditions under which the p- the contract pays out the full amount that it holds to someone based on a derivative outcome or, or something like that. Now, what the on-chain code is very good at is creating transparency about what the core conditions of the contract are. It's very good at taking in money from other private keys that send it tokens and send it value to hold. And then it's also very good at returning money or returning value back to other addresses or other private keys. It can also be involved in governance, it can be involved in a few other private key signature-based operations. But primarily, the on-chain part of a hybrid smart contract, from what I've seen so far, defines the agreement, takes in value, and returns value, uh, based upon the conditions codified in the agreement on a blockchain. The second and equally important off-chain part is where the term oracle c- an, an, an, an oracle comes in, or an oracle mechanism, or a decentralized oracle network, as we describe it in the paper. And this is another decentralized computational system that has a different goal, right? So blockchains have the goal of packaging transactions into blocks and connecting them in a crypto- cryp- cryptographically unique way to create security and assurance about that chain of transactions. Oracles and decentralized oracle networks achieve, um, consensus, and they achieve decentralization about the topic of what happened. Right? So blockchains structure transactions. Some of those transactions might be the state changes in different pieces of on-chain code, and then th- those on-chain, um, pieces of code require input. I think the thing that people, um, get kind of a little bit thrown by is despite being called smart contracts, the on-chain code on a blockchain cannot actually speak to any other system.

    22. LF

      Mm-hmm.

    23. SN

      So blockchains are valuable and useful as far as they're tamper-proof and secure, and to be tamper-proof and secure, they're made this kind of walled garden-

    24. LF

      Mm-hmm.

    25. SN

      ... that is able to know and interact only with the highly reliable information that's within that system-

    26. LF

      Mm-hmm.

    27. SN

      ... which is basically tokens and private key signatures.

    28. LF

      Mm-hmm.

    29. SN

      All the other world's information is not available in a blockchain inherently, and a smart contract, or a piece of on-chain code can't just say, "Hey, I'm gonna go get some data from over here," because the API they would get it from creates a whole bunch of security concerns for the blockchain itself and a whole bunch of consensus issues about how to agree on what that API said or what the truth of the world is, right? Because it's not even agreeing on what one API said. It's moreso creating a reliable form of decentralized computation that can give you a definitive proof of what happened and not just what one API said. So for example, some of our most widely used networks have well over 30 nodes and well over 10 data sources that are all providing information about the same type of data, and then there's consensus on that one piece of data which is then written in and essentially given back into the on-chain code to tell it what happened. Because you can't really make an agreement unless you know what happened, right? If you and me were to make an agreement and set some contractual conditions but our agreement could never know what happened, it, it would be completely, you know, useless. However, if you and me made an agreement and there was another system called an oracle mechanism or a decentralized oracle network that proved what happened definitively, and you and me pre-agreed that whatever this mechanism says is what happened-

    30. LF

      Mm-hmm.

  8. 45:391:03:45

    Applications of smart contracts

    1. SN

      to our industry.

    2. LF

      Yeah, it's funny, you, you, you talk about the, the currents of decentralized world of DeFi, but decentralized services world is primarily just tokens, and is basically just financial transactions. And the kind of thing, the reason why it's super exciting, the kind of thing you're doing with Chainlink and oracle networks, is that you can basically open up the whole world of services to, into this kind of, um, decentralized smart contract world. (inhales deeply) I mean, you're talking about just orders of magnitude greater impact financially and just socially and philosophically. Are there interesting near-term and long-term applications that excite you?

    3. SN

      Yeah, there's, there's a lot that excites me and, and that is how I think about it. That it's not just about, we made a decentralized oracle network, it's about, we made a decentralized service or collection of services-

    4. LF

      Mm-hmm.

    5. SN

      ... that's going from hundreds to thousands, and then people are able to build the hybrid smart contracts, which I think will redefine what our industry is about. Because for example, for the people that only learned about blockchains through the lens of NFTs, they understand blockchains through NFTs, not through speculative tokens or Bitcoins, right?

    6. LF

      Mm-hmm.

    7. SN

      And I think that wo- that, that will continue. I, I think the use cases that excite me, they vary between the developed, uh, market, uh, the developed world's economies and emerging markets. I think the, in the developed world, what you will see is that transparency, creating a level, a new level of information for how markets work and the risk that is in markets, and kind of the dynamics that put the global financial system at systemic financial risk-

    8. LF

      Mm-hmm.

    9. SN

      ... like 2008. And my hope is that all of this infrastructure will s- will soften the boom and bust cycles by making information immediately available to all market participants, which is, by the way, what all market participants want-

    10. LF

      Mm-hmm.

    11. SN

      ... except for the very, very, very small minority that are able to game the system in their benefit and benefit from booms but avoid busts because of their asymmetric access to, to information, which really everybody should have, and which this technically solves.

    12. LF

      Mm-hmm.

    13. SN

      I think in the process of doing that, and which is happening I think right about now, you see a polishing of the technology such that it can be made available to emerging markets.

    14. LF

      Mm-hmm.

    15. SN

      And on a personal level, I feel that, um, the emerging markets will benefit much more from this technology, just like the emerging markets benefit much more from the internet or from those, you know, $50 Android phones that people can have, because it's, it's such a massive shift in how people's lives work, right?

    16. LF

      Mm-hmm.

    17. SN

      I have always had access to books and a library, which has been fantastic and, and very important. But there are places in the world where people don't have libraries, but they, now they have the internet and a $50 Android phone and they can watch the same Stanford lecture that I watch. I mean, that's kind of mind-blowing, real- realistically, right? They, they, they just went from zero to one in a very, very dramatic way-

    18. LF

      Mm-hmm.

    19. SN

      ... I think all of these smart contracts, and in, in my case, I think the one that I seem to keep coming back to is crop insurance, where partly 'cause it doesn't have a tokenization component, partly 'cause it's actually much more important than, than, than, than it might seem, um-

    20. LF

      What is crop insurance?

    21. SN

      Right, so, so-

    22. LF

      (laughs)

    23. SN

      (laughs) Exactly. So, so this, this is, this is the nature of why it's sometimes hard to see the full value of what our industry does, because it solves all these kinds of backend problems that we don't have, right?

    24. LF

      Mm-hmm.

    25. SN

      So, crop insurance is if I own a farm and it doesn't rain, I get an insurance payout, so I don't need to close down my farm.

    26. LF

      Mm-hmm.

    27. SN

      Because if it didn't rain, I don't have crops, right? So, people in the developed world can get crop insurance, and there's all kinds of systems that basically pay them out, and then they can argue with the leg- with the insurance company if they don't get paid out properly and whatever. And this allows people to smooth out risk.

    28. LF

      Mm-hmm.

    29. SN

      In, in fact, a lot of the global options markets were, were about this, right? They were initially about people selling their produce or their crops ahead of time, so that if there was a risk of drought, they weren't impacted by it, right?

    30. LF

      Mm-hmm.

  9. 1:03:451:11:17

    AI and smart contracts

    1. LF

      do. I wonder if you think about the role of artificial intelligence in all of this? Because your smart contracts are kind of agreements, maybe you disagree with this, but at least the way I'm thinking about it, is agreements between humans or groups of humans. But it seems like because they r- everything is operating in the digital space, that you can integrate non-humans into this, or AI systems that help out humans, managed by humans. Like, w- what do you think about, uh, a world of hybrid smart contracts codifying agreements between, uh, hybrid intelligent being networks of humans and AI systems?

    2. SN

      Yeah, yeah. I th- I think that makes, uh, I think that makes perfect sense. In, in terms of AI, um, I'm not an expert, right, so it, it might be a bit simplistic or, or naive, my, my ideas in, in this field. I, I think, you know, everyone saw The Terminator movie, right? Everybody kind of saw The Terminator movie in the '90s and it was like, "This is really scary." Um, I personally think AI is, is, is amazing and makes, makes perfect sense. I think it will evolve to a place where people have, you know... j- just so you understand, I work in the world of trust issues, right?

    3. LF

      Mm-hmm.

    4. SN

      I work in the world of how can technology solve trust and collaboration issues using encryption, using cryptographically guaranteed systems, using decentralized infrastructure, right?

    5. LF

      Mm-hmm.

    6. SN

      So that's the world that I've been inhabiting for, um, you know, many, many years now, building smart contracts for seven or eight, doing stuff before that. It's, it's, it's, it's kind of what I'm focused on. So I view AI through that same lens.

    7. LF

      Mm-hmm.

    8. SN

      And I, my brain naturally asks, "Well, what is the trust issue that people might have with AI?" And my natural, um, kind of response is, well, let's say AI continues to be built and improve. At some point, I have no clue where we are on this now, I've, I've seen different ideas that were very far from this, I've seen other ideas very close to this. At a certain point, we'd arrive at a place with AI where we would be, um, a little bit worried about just how much it could do, right?

    9. LF

      Mm-hmm.

    10. SN

      We might be worried that AI could do things we don't want it to do, but we still want to give AI a level of control over our lives, right?

    11. LF

      Mm-hmm.

    12. SN

      So in my world, that's a trust issue. And the way that that trust issue would be solved with blockchains is, is actually very straightforward and I think in its simplicity, quite powerful. Y- y- you could have an AI that has an ability to do and control key parts of your and our lives, right? But then you could limit it with private keys and blockchains and create certain guardrails and firm kind of walls and limits to what the AI could never go past, assuming...... that encryption, right? That encryption continues to work, right? And assuming-

    13. LF

      Okay.

    14. SN

      ... that if it's not that AI's specialization to break encryption, that it wouldn't be able to do that, right? So, if you have an AI that controls, um, something very important, whatever it is-

    15. LF

      Mm-hmm.

    16. SN

      ... shipping or something in defense, or something in, um, you know, the financial system, whatever it is, but you're sitting there and you're kind of worried, "Hey, you know, this thing is unbelievable. L- it's coming up with things I, you know, we wouldn't have thought of in 100 years," but maybe it's a little too unbelievable. Um, how you would limit it, well, if you bake in private keys and you bake in these kind of blockchain-based, uh, limitations, you can create the conditions beyond which an AI could never act.

    17. LF

      Mm-hmm.

    18. SN

      And those could once again be codified in the very specific, um, unambiguous terms in which you described, which once again, in my trust issue-focused world, would solve the trust issue for users-

    19. LF

      Mm-hmm.

    20. SN

      ... and make them comfortable with using the AI or seeding control to the AI, which I think, in more advanced versions of AI, will continue to be a concern, right?

    21. LF

      This is fascinating. So, smart contracts actually provide a mechanism for human supervision of AI systems. For the do-

    22. SN

      With encryption, very encryption heavy. So, it's not about, like, is it smarter than us? It's about will the encryption hold up?

    23. LF

      Yeah. So, we- that's based on the assumption that the encryp- encryption holds up. I think that's a safe assumption, we can get into that whole discussion, but, w- uh, from quantum computing, but cracking encryption is very difficult, and that's a whole nother discussion.

    24. SN

      Right.

    25. LF

      We- I think we're sa- on safe ground for quite a long time, assuming encryption holds. I, um... There's a space that, uh, is at the cutting edge of general intelligence research in the A- AI community, which is the space of program synthesis or G- AI generating programs. So, that's different than what you're referring to, is AI being able to generate smart contracts.

    26. SN

      Mm-hmm.

    27. LF

      And that, to me, is kind of fascinating to think of especially two AI systems, between each other, generating contracts, sort of almost creating a world where most of the contracts are between non-human beings.

    28. SN

      I, I think an AI system, uh, as I think about it, and I... and once again, this is not my field.

    29. LF

      Yes.

    30. SN

      This is something I might watch a YouTube video on or just see something interesting about at some point. Um, I think if I were to just reason through it even, even now, I think the highly deterministic and guaranteed nature of smart contracts would probably be preferable to an AI-

  10. 1:11:171:22:19

    What agreements can be turned into smart contracts?

    1. LF

      I, I do wonder about this particular problem, and maybe you could speak to it, of how smart contracts can take over certain industries i- in a sense, or how certain industries can convert their sets of agreements into smart contracts, which is, uh... you mentioned sort of talking to Dave from the bank. You know, many of our laws, many of our agreements, are currently through natural language, through words. And so, there is a process of mapping that has to occur in order to convert the, uh, legal agreements, legal contracts of today to smart contracts, that by the way, AI may be able to help with. But as a... uh, by way of question, how do you think we convert the legal contracts on which many industries currently function today, or not even legal contracts, but ambiguous kind of agreements, maybe they're loose sometimes, into more formal, deterministic agreements that are, uh, represented by smart contracts?

    2. SN

      So, I, I think there's two, um, m- maybe two sides to this. Um, I think the first one is actually not a huge problem, where you have things like the instant master agreement for derivatives, or you have these agreements that basically already reference a system somewhere.

    3. LF

      Mm-hmm.

    4. SN

      Right? Like, for example, many legal agreements already accept eSignature. And so they're saying, "Hey, I'm gonna use this computing system over here around signatures, and I'm gonna consi-... and there's laws around that, and there's clauses that say eSignature is good enough for this agreement."... I, I actually don't think this is a big problem for the vast majority of legal agreements that use systems already, right?

    5. LF

      Okay.

    6. SN

      So, what you'll do is you'll swap out one, uh, repository or one or one set of contra- system of contract settlement-

    7. LF

      Mm-hmm.

    8. SN

      ... and you'll just say, "Hey, this blockchain system over here is my new system of contract settlement. Whatever it says is the, uh, state of the agreement instead of, you know, the centralized system over there."

    9. LF

      Mm-hmm.

    10. SN

      Right? And s- and so there's actually a huge amount of agreements that are already, um, able to, to do that, and I think will, will do that. I think there's another, um, side to your question, which is the amount of agreements that are very ambiguous that can be turned into smart contracts.

    11. LF

      Mm-hmm.

    12. SN

      And I think the limitation there is, is twofold. First of all, like, like you said earlier, the highly reliable smart contract and the, and the lack of opaqueness and the clarity of smart contracts is, is, is very, um, high and very powerful and very clear. And it's, in my opinion, gonna be much, much easier to take a smart contract and turn it into a set of natural language explanations-

    13. LF

      Mm-hmm.

    14. SN

      ... and just say, "Hey, um, you know, th- this is what this does," right? So, I think that many contracts are ... a- and even now in decentralized finance and DeFi and in decentralized insurance, they're basically being rebuilt in this format and, and, and that rebuilding will make them clearer, like you said, and then s- restating those in natural language and explaining to people well, you know, w- whether there's this, it'll ... I think it'll actually be a lot simpler to explain to people what the contract is about.

    15. LF

      (laughs) That's fascinating, mapping smart contracts into natural language. I didn't even think about that. So that's, that's ... you're, you're saying that's doable and n- natural and easy to do?

    16. SN

      Be- because they're so much clearer, right?

    17. LF

      Yeah.

    18. SN

      There's, there's that forced clarity that you talked about.

    19. LF

      Yeah.

    20. SN

      I, I think the second, um, aspect of this problem is the nuance around what contracts can be made unambiguous.

    21. LF

      Mm-hmm.

    22. SN

      And I think that comes down to, uh, often comes down to proving what happened, which is where oracle networks and decentralized oracle networks and Chainlink would come in. And, um, our experience there is, you know, quite extensive over the many years that we've worked on many different contract types. I think w- what it fundamentally comes down to is whether there is data. So, we're not gonna be able to make a hybrid smart contract about whether somebody painted your house the right color blue. We're just not gonna be doing that because there's no data feed that tells us that your house was painted blue or that it was the right color of blue, you know, unless somebody sets up a drone with a color analysis tool and they generate that data.

    23. LF

      Which, by the way, could be possible, right? They could, there could be ... if there's enough demand then the service would be created that has drones flying around that's telling you about the colors of, you know, all those kind of stuff. So, if there is actual demand, that that would be created. And, and because, because there would be value to connect that data feed to the smart contracts and so on.

    24. SN

      I, I, I think, I think you have it unbelievably right because there, there are already insurance companies that use drones to monitor construction sites from overhead-

    25. LF

      Yeah.

    26. SN

      ... and see how many people are wearing hard hats.

    27. LF

      Yeah.

    28. SN

      And if the percentage of people wearing hard hats isn't sufficiently high, then, you know, the policy is voided. And so in that case, there is a data source, and that data source can be put into a hybrid smart contract. So, the limitation of hybrid smart contracts is, is there a data source or a set of data sources to create definitive truth to settle the contract and eliminate ambiguity?

    29. LF

      Yeah.

    30. SN

      And then as y- as you said, I think as people realize that smart contracts are a format in which they can form agreement about things like that insurance product around, you know, how many people are wearing hard hats, if I'm the construction site owner, well, you know, I would really like a guarantee that your insurance policy is gonna pay me out if everyone is wearing hard hats. And in that case, there is demand for the data, and people will generate the data. And I, I actually think the insurance industry is interestingly a precursor of this because they're so data-driven. You already see insurance companies paying IoT companies to put data into their customers' infrastructure at the cost of the insurance company to generate the data that the insurance company uses to make a policy for the customer.

  11. 1:22:191:32:38

    Privacy

    1. SN

    2. LF

      Mm-hmm. You've mentioned confidentiality and privacy, that you don't- the parties don't need to necessarily know private data in this interaction, you talk about confidentiality in the, um, in the white paper for Chainlink 2.0. Can you talk more about how to, uh, achieve confidentiality in this process?

    3. SN

      Sure, sure. Ab- ab- absolutely. Um, so I think you once again need to think of the contract as existing in two parts, right? You have the on-chain code and then you have this off-chain system called a decentralized Oracle network.

    4. LF

      Mm-hmm.

    5. SN

      So the question is really what portion of the contract should live in what part of these two systems, right? So if you wanna create transparency, you should put more information on chain, because that's what blockchains are very good at.

    6. LF

      They're public, transparent, but they don't necessarily have privacy.

    7. SN

      Well, those- you can see how those two things are a little bit kind of-

    8. LF

      Yeah. (laughs)

    9. SN

      ... um, completely, uh, diametrically opposed, right?

    10. LF

      (laughs) Yes.

    11. SN

      So I- I do- I do think and I do see blockchains working, um, on on-chain encrypted smart contracts. That's very inefficient, it has a lot of, um, nuances around it. Th- that, I think, will appear at some point. I think until it appears, you have an option of taking a part of the computation and putting it into the centralized Oracle network.

    12. LF

      Mm-hmm.

    13. SN

      We- we actually did an entire paper about this that we presented at Stanford, um, in February of last year-

    14. LF

      Mm-hmm.

    15. SN

      ... uh, something called Mixacles, which basically talks about how you can take an Oracle network and you can put a portion of the computation into the Oracle network, assuming that you're comfortable with that limited set of nodes knowing what the computation is, and you can actually provide additional confidentiality through special hardware called trusted execution environments that you- that all those nodes are forced to run so they won't even know what they're operating.

    16. LF

      Mm-hmm.

    17. SN

      And so at- at the end of the day, if you look at a hybrid smart contract as gaining functionality from its on-chain code and gaining other functionality from its off-chain, the centralized, uh, Oracle network component, you can place the part of the computation that you would like to be private in the decentralized Oracle network because you can control this set of nodes, you can control the committee of nodes, and you can require that they run certain hardware to keep the information private, right? So you could basically make a derivative that- um, or a binary option is the example used in- in the Mixacles paper, where the payout happened on chain, but it was actually impossible to tell what the outcome of the contract was.

Episode duration: 2:59:56

Install uListen for AI-powered chat & search across the full episode — Get Full Transcript

Transcript of episode TPXTmVdlyoc

Get more out of YouTube videos.

High quality summaries for YouTube videos. Accurate transcripts to search & find moments. Powered by ChatGPT & Claude AI.

Add to Chrome