Episode 63

Smart Contracts 101 with Keir Finlow-Bates

Watch on YouTube

About this episode

In this week's episode of Untangling Web3, we are joined by Keir Finlow-Bates, a prominent blockchain researcher and author. Today, we delve into the complexities and potential of smart contracts, exploring their implications for the future of blockchain technology.

Key Highlights

  • Foundations of Smart Contracts. Keir provides a comprehensive overview of what smart contracts are and how they differ from traditional contracts, emphasizing their role in automating transactions on the blockchain.
  • Technical Mechanisms. The discussion covers how smart contracts operate within blockchain ecosystems, particularly focusing on their execution and the conditions under which they operate.
  • Practical Applications and Limitations. Keir discusses real-world applications of smart contracts, including their use in various industries, and addresses common misconceptions and limitations, providing a balanced view of their capabilities.

In this episode, Keir underscores the importance of understanding both the technological underpinnings and the broader implications of smart contracts. He advocates for ongoing education and critical examination as essential for harnessing the full potential of this technology, ensuring its ethical and effective integration into future digital systems.

Read Keir's Web3 primer here: https://www.linkedin.com/posts/keirf_fairly-simple-technical-guide-to-web3-activity-7082394134883237889-O8qd

Keir's YouTube channel: @Thinklair

Transcript

Auto-generated from the episode audio.

Welcome to another episode of the Untangling Web3 podcast. Today, we have the pleasure of welcoming Dr. Kia Winlow Bates, a renowned blockchain researcher, prolific inventor with over 40 patents, and the author of Move Over Brokers, Here Comes the Blockchain. With an MA from Cambridge and a PhD from London South Bank University, Kia brings a wealth of knowledge and a touch of humor to the complex world of blockchain. Today, we'll be discussing smart contracts. So, get ready for an enlightening and hopefully entertaining discussion with one of the leading voices in blockchain technology.

Well, thank you very much. It's nice to be Yeah, I was really excited to have you on. I I saw you, you know, all over social media on LinkedIn. I think the first thing that I saw was you walking through, you know, your your garden, which is in the woods in the middle of Finland with a snowy backdrop talking about blockchain. And one of the first captions that came up was blockchain Gandalf, and I was like, "Who is this guy? We need to have him on the podcast.

This is someone I want to talk to immediately." So, I'm really excited to have you on. Well, it it's really nice to be here, and it it's not my back garden. It's actually the Finnish wilds. Um, it's it's proper forest. Okay. Yeah, I've actually been watching your your videos, you know, for about as long as I can remember them being out, to be honest. I feel like it was during the pandemic years, and I and it was really nice cuz you were about the only person going out every day and wandering through the woods, you know, and and enjoying it.

But actually, I I found the videos really really interesting. The way you not just talking about the technology, but talking about the societal implications and you know, just getting a nice kind of I guess a layman's perspective on it as well cuz obviously, you're not a layman. You're very deep into the technology, but you you the way it comes across when you talk is I I think it's exactly what we need in the industry. So, I think we should really spend some time getting into the kind of the nitty-gritty of what are smart contracts and contracts generally.

So, let's start before we get into the smart version. How would you define contracts as as a concept overall? Well, I think that's actually where the original problem starts, right? Because a contract is a legal concept. And there are some pretty good definitions out there that it's an agreement, a binding agreement between two parties. In most jurisdictions, there has to be something called consideration, which means that you're paying something or providing something, and you're getting something in return. And ultimately a a legal contract is enforceable through a court.

So, when you have the term smart contract, it triggers a thought of what we all feel a contract is about. Everyone's signed a contract at some point in their Um most people in entrepreneurship have signed hundreds. And and that I think leads you down the garden path. Because it it's it's not about encoding the law in software. It's about something slightly different. Okay. Yeah, cuz I think that's one of the things most people have tend to maybe get wrong, right? Is that they they go down the uh code as law.

How do we How do we put the law into code? And obviously, when you do that, it's very hard to account for all the edge cases, right? That's why we have lawyers. That's why we have such a uh a long and detailed legal process for lots of things because it's very difficult to get to the ground truth of things. So, what is that alternative model then? What are we What What do you think we should mean when people start talking about smart contracts? Right. So, rather than trying to encapsulate something that may well be subjective, right?

Have you done the job well enough? Or uh are the goods satisfactory? With a smart contract, it really is just about deterministically moving value around. That's what it boils down to at its core. Um a smart contract is a small computer program, and they are typically very short by computer programming standards. Um a one might only be 600 lines, which anybody who's a programmer will know is nothing. You know. companies that produce software are looking at hundreds of thousands of lines of code. So, they're they're they because they're running on a and the blockchain creates these tokens, which we ascribe value to, um those programs can decide under what circumstances and what conditions the tokens get moved from one party to another.

So, it's it's kind of more like automated banking in a way than it is about the legal aspects. Um I like that. I I actually really appreciate that. I remember like seeing when this kind of smart contracts was the buzzword and everyone talking about it and saying, you know, the entire legal field is going to disappear and smart contracts will replace everything. And what you're kind of saying there, and something I definitely agree with, is that actually what smart contracts can do is a real subset of the overall contract space.

It's very simple, I imagine quite narrow field, like very transactional. And there's so much nuance in law as we know it. I actually really dislike the nuance, I think most people do. But you're saying the nuance has to be there for so many reasons and smart contracts won't replace all of contracts. It's just the simplistic deterministic things. Yes, it really boils down I mean, that's the first thing. And we can talk about other things you can do with smart contracts further on in the program, but um to start with, um it all kind of builds on this fact that blockchains are creating these digital tokens or cryptocurrencies that have a real dollar or pound or euro price attached to them.

And then you start thinking, well, what can I do with those digital tokens? How how how do I set out the circumstances under which I'm going to move them around. And of course, um maybe we could say take a step back and talk about Bitcoin briefly, right? So there you have the first blockchain. It creates these things called Bitcoins. There can only be 21 million of them. At the moment, I think they're priced at about 60 $5,000 a Bitcoin. Um but they're created by a computer program that's running on lots and lots of machines at the same time.

And that gives a programmer a really unique opportunity. If I want to write some software that moves pounds around or moves dollars around, I I have to possibly get a banking license. I may have to sign up with a payment processor like Stripe or PayPal. I'll need to learn about banking APIs. They're all different from bank to bank. and I need to get these institutions to agree to allow me to do what it is I want to do with their service. So, my local bank here is not going to be very happy if I say I want to start um moving euros from bank account to bank account using code.

You know, that might make them feel a bit edgy. But with blockchain, it's out there. It's open source. It's open. It's permissionless. Anybody can run a Bitcoin node. And so, if you're a program and you're running a Bitcoin node, there's an API that allows you to uh send commands to the node to spend Bitcoins that are in your address, in your in your wallet. Um but the issue there is that you're writing an external program to do that. So I can run a Bitcoin node. I can write a piece of software that runs on my computer and that looks out for things happening on the Bitcoin ledger and reacts to them and does stuff.

But it's just my computer that's doing it. Um so the the big step that uh Ethereum, the first smart contract platform, took was saying, "Well, what if those applications that Bitcoin developers are are writing uh were actually put on the blockchain as well? Then everybody can see them, and then you have some transparency where I can write a piece of computer code that says, "Under these this value will move like this." And everybody else can check that that's indeed the case. And and that, I think, is the sort of the initial origins behind um the idea of smart contracts.

But then it gets a lot more complicated. Well, I hope we go into some of it, but thanks that the step back really does help that it kind of sounds like you're saying we really needed blockchains, you know, Bitcoin laying the foundation, then Ethereum taking it one step further to really push this agenda. And I think one thing you mentioned there was the idea of institutions in banking. Traditionally, Bitcoin well, really tried to remove some of those unnecessary intermediaries. And that's one of the things that's often pushed around the concept of smart contracts is it's that you remove the need for intermediaries.

Isn't that Do you actually kind of prescribe to that fact? Do you you agree with that fact? Because it sounds like we're kind of offsetting the intermediaries to code as potentially the network itself. What do you think about that? Yeah, uh so it that was kind of the first generation interpretation of blockchain was that it was going to remove brokers, intermediaries, platforms, and actually put control in the hands of individuals Um and it hasn't quite panned out like that because it's a very There's a very small group of people who can just do it themselves, right?

and as the systems have become more complex, it becomes even harder it for everybody. And even as an experienced developer, you may you know, I I can't code stuff on Polkadot. I haven't spent time on it. I don't I don't um mess around on Solana. I'm very niche. It's for me, it's Bitcoin and Ethereum. like everything as time goes on the field expands and suddenly you know you know less and more and more about less and less until eventually you know everything about nothing. Um and and that's the way blockchain's been going.

Yeah, it can often feel like that doing this podcast to be honest. You speak to lots of different people about different blockchains and you suddenly realize how much you actually don't know about how lots of them work. And yeah, I think we're quite similar actually. We we tend to we use Bitcoin and Ethereum as our jumping off points right for understanding the general UTXO type blockchain versus account based EVM style blockchain. Um while we're taking this step back cuz I think I'm really glad you did that as well.

That was you know we don't want to put the cart before the horse here. Do you think then blockchain is a prerequisite to what we're calling like a meaningful smart contract? Do you think there would have been any other way to achieve what people are doing with smart contracts now if we didn't have a fundamental layer like blockchain you know what are the what are the distinct properties of blockchain over anything that came before do you think? Well, in a sense smart contracts already existed in databases.

In databases they're called hooks. So you have a database with data in it and a hook is a piece of code that will do something with that data when the conditions are the way it needs them to be. Um database developers hate hooks because they open your database up to lots of vulnerabilities and you have to check the code very carefully because if a hook gets triggered in a circumstance that you hadn't predicted you could end up with data corruption or um a hacker exfiltrating the data.

But in a sense database hooks very very similar to uh smart contracts on blockchains. But the big difference is that a a database is a private thing. You have to have permission to use it. and your typical database doesn't instantiate value. And that is and there we're moving out of technology and into psychology and sociology, right? It's why why are people describing value to these things on the blockchain? And the it's a very difficult question to answer. Why why do we ascribe value to money, right?

Is the kind of question you're asking. You're digging into that aspect of humanity. But as a developer, it's very easy cuz you just say, "I don't really care. The fact is that ether has this value and Bitcoin has this value and I can use them as building blocks in my software. Um except that they have this great extra property which is people are willing to pay for them. And uh so that that's one of the things that I found very appealing even back when, you know, Bitcoin was just a couple of dollars.

The fact is it felt like you were writing code that was moving money around as if you were running your own stock market or your own commodities market or your own bank. And that was one of the early slogans for Bitcoin, be your own bank, right? I really like that. I think that the kind of smart contracts kind of implies a lot of things and I've had a lot of people come to me and be like, "What's so smart about these contracts? Like, do they do intelligent things on their own?

Are they fully autonomous?" All these kind of things. Especially with the AI bubble as well. It gets really weird some of the questions I get. And I remember my last place we ended up so I we started to call them just um automated programs. That's it. They're just automated programs that are hosted on a blockchain. The two main differences between them and like normal code is like you said, one is you can have in value, intangible value being executed there. And the other thing is that they're distributed.

They're open. Anyone can kind of access them. And I think that kind of helped with the definition of people's understanding a little bit. So you you've kind of talked a little bit about, you know, the idea of contracts and then then being hosted on an open distributed platform and that's what blockchains did, right? Could you take us through, you know, the more depth into how they actually work? Then you talked about value exchange and all this kind of stuff, just at a high Right, okay. So, let's let's stick with the Ethereum then.

So, out there we have a god, I don't even know the number now, probably in the tens of thousands of computers that are all running the same uh well, not necessarily the same software, but the same protocol encoded in software. And there are a few versions. You don't want it it all to be the same software because there's a mistake in one, it's it's good to have um different versions of the same thing. I suppose that's a bit like us having Apple and Windows and Linux, right?

If if one of them has a disastrous security incident, I'm not thinking of anything recent here, at least you have two other um platforms that are still running and the whole world doesn't collapse because of one badly pushed out uh software update, right? Um but they're all running the same protocol. They're all speaking to each other in the same language, even if their brains are different. Um and they're all synchronizing a kind of massive global which from a programmer's perspective, you can kind of think of as a database.

Um it's storing data. It stores it in a particular structure. And a subset of that data is this native cryptocurrency, which for Ethereum is Um so, there's god knows how many millions of Ethers out there. And it's recorded who owns what amount of Ether. So, that's like a that's again like society. We all have records of how much money we own. And it's locked down because everybody's watching and because everybody's agreeing on how the data can be updated, you can't sneak in and up your bank balance by uh you know, 1,000 Ether cuz everybody else is looking and saying, "No, no, that's against the rules.

We'll discard that attempt." Um which is a problem that uh you know, a solution that the banking industry doesn't have. We have In banking, we have lots of auditing. Um and there are like amusing Well, amusing in quotes cases where I think there was an Indian bank that was messing around with international transfers and creating money out of thin air, and they were doing it in such an obfuscated way it took years for them to get caught. Uh because it's not transparent in the uh in the international banking system.

You're relying on auditing to make sure that uh everything's done properly. So so you've got this big ledger saying who owns what. It's all stored in data. The data gets changed according to a set of rules that everybody agrees to. And so what you really have is tens of thousands of computers all running the same code to get the same result, and then you know that you have a single view of the truth. So that view may include me having one ether and Jack having two and Alec having three.

And Alec decides to transfer one to me. If it's a valid transaction, they all pick that up, include it in the uh the database, which is called a blockchain cuz it's a chain of blocks of Um and now we have a an updated new single view of the world where I have one more ether and Alec has one less. And in in a sense, it's as simple as that. It's It's kind of like us all sitting around in a circle trading with everybody watching the trading, so at the end we know that everything was done fairly.

I really like that description. I think that that's much better job than we ever did describing blockchain. So thank you for that. Um I did expect that you would you would kind of school us on this. So sticking with that and taking it one step further then, you described in this kind of database that is the blockchain, you have these entities or accounts or where you said, you know, we have money associated with them. You can debit, credit, that updates the state of that database. So, in my mind, one of the things that Ethereum did, cuz you mentioned it's a smart contract platform, right?

Which is a differentiation and an evolution from what what Bitcoin was really, because you only had kind of a restrictive uh option. limited scripts. You can hardly do anything with Bitcoin scripts. Yeah, and I think one one way I like to frame this is about people call smart contracts first-class citizens. So, in that database, the entry could be essentially a a person, like you or I, so it's effectively my account of my money, but then you can also have these smart contract accounts. So, they become their own entities.

So, would you be able to describe like how how does that work then? How do how does a smart contract become an entity? How do people interact with them, right? What does it mean for it to be a first-class citizen in the blockchain world? Mhm. Well, well, you're right. In a sense, the smart contracts are like uh the sort of uh when you have the concept of legal persons in law, so like a a company is treated as a person. and in the smart contract world, a smart contract is treated like a person, like you or I.

And and the way that works is that uh your identity on the blockchain is through your um your blockchain address. And that is like uh your bank account number on the blockchain. Except, unlike a bank account number, you can create them yourself, as many as you like. Um so, that kind of goes back to the being your own bank. And uh it uses something called uh asymmetric key cryptography or public private key cryptography. You create a private key that only you know. You derive a public key from that, and then you derive the blockchain address, your account number on the blockchain from that.

And then when you own stuff, it's registered against that account number. In the same way that when you have a bank account, your balance is recorded against your bank account number. Um so that's all great, and we could briefly touch on the fact that because you have the private key, you can digitally sign the transactions, and that gives you the authority to make decisions or submit transactions that only relate to your um your blockchain account. the neat thing with Ethereum is when you create a smart contract, it's also given its own account number.

And so from the outside looking in, you can't tell by looking at uh an Ethereum whether it's a person with a private key who is signing transactions or whether it's an address that's associated with a smart contract. So from a technical point of view, um as far as the system is concerned, you know, it it's an account number, and it doesn't in one sense, it doesn't really care whether it's a person or whether it's a computer program that is controlling the assets that belong to that account number.

Mhm. I guess one differentiator between, say, an individual account holder on Ethereum and a smart contract on Ethereum is that the smart contracts can't generate transactions themselves, right? They only relay transactions, um which I guess is is is one differentiator at a high level. We've kind of I guess we've talked about a little bit about what smart contracts can't do, that they're you know, very niche within a niche of the general contracting landscape. Uh but aside from transparency, why is there so much hype around them?

What are some of the advantages to smart contracts, you know, based on blockchain technology, actually bring to society? Okay, so so still sticking with the the money side of things, If you think about financial innovation, right? We have like direct debits or standing orders. When they first came out, the idea that I could pay my magazine subscription in an automated way by saying, "Every month keep paying that um publishing company this sum of money, and then they send me the magazine that I want. Um and I don't have to think about it anymore." That was at the time quite a revolutionary idea for a finance.

But uh you know, you don't have to remember to do the payment every month. It's automated. Um so, and what smart contracts can do is they can do that kind of thing, but massively powered up. So, it's not just a recurring monthly payment. It It could You can you can write programs to do all sorts of weird complicated things. You can say, "Well, it's going to do the payment every month unless something else like somebody else I can write a program that says, 'Pay this account every month this amount unless that account has a balance of zero, which means they've taken all the money out of it, then stop paying on the assumption that maybe it's been hacked, right?'" Mhm.

Um so, that Now you've got something that's like a two-step standing order. Um and you can layer it as deep as you like, right? You You can write programs that will allow the the value to be moved around much more complicated uh manners with many more inputs and um many more actions than just something as simple as a direct debit. Mhm. Um so, so that And that's just the start. Um one of the things we should talk about uh fairly soon is the way that you can write data in smart contracts to the blockchain and put conditions under which it can be changed um and retrieve it, because then we can start talking about how you can actually create your own tokens, create NFTs, uh have white lists, um where you like say who can use the program and who can't, um under what circumstances, things like that.

So, as a developer and an inventor, I find it fantastic because I can just sit down and start thinking up um possible things that you could do with them. you know, I've I've submitted inventions in the fields of Wi-Fi, of uh satellite navigation, databases, security. Um I've just found blockchain, and in particular smart contracts, to be the most fruitful area to be inventing stuff. It's so new that uh you can come along and do some pretty amazing things. Yeah, I think because we Yeah, we're talking about these as smart contract platforms, they have been pitched as very general purpose, and I think that's true.

You pretty much anything you can think of an application for a smart contract, right? You have these kind of um these distributed, decentralized marketplaces, lending of things like energy I've seen talked about a lot, so I 100% agree that the the expressiveness you get with smart contracts now in Ethereum-like systems, as opposed to what you have in Bitcoin, it is basically opening up all these possibilities, right? And you even now have because of the fact that smart contracts can communicate with one another, and they can they have all the the the thing you'd expect from normal programming languages like inheritance, so they can inherit from other contracts.

You can have these incredibly complex things from which I think is we have DeFi now, right? DeFi is what people refer to as this very complex kind of myasma of different things, and that might also come with some some pitfalls. What is your What is your take on using smart contracts for what people call DeFi at the minute? Um well, it's uh the first thing it did was make me realize that a lot of what is going on in conventional finance does look a bit like a game of Monopoly from the outside, right?

So, uh um cuz you I I came into a lot of uh uh conventional finance through decentralized finance. And you sort of see it and go, this this appears to be people trading stuff that they've made up themselves. And some of them are making profits off of them and some aren't, but it looks a bit like a game or gambling or something like that. And then you start digging into how, for example, um commodities trading with futures and options work. Um and you start realizing that this kind of stuff is going on in conventional finance as well.

And in fact, a lot of finance has become so disconnected from the original thing that it was meant to be involved with that it has become a bit of a game. I mean, the the classic example is uh uh futures trader on the Chicago Mercantile who was known for being an expert lum- uh green lumber trader. you know, was making a lot of profits and somebody asked him one day, "What is green lumber?" And he said, "I don't know. Some kind of wood that's painted green." Uh and the guy had spent his life trading this thing.

Uh but he didn't care what it was, right? He just knew how it behaved from a financial perspective, and he you know, how to uh how to trade it to make a profit. And as far as he was concerned, it didn't matter whether it was freshly cut trees or whether it was frozen orange juice or oil. Um you know, it just had to be a particular market he's familiar with. And so, when you look at DeFi, uh you're going to get the same kind of feeling, which is what is going on here?

What what what's the um But, it is starting to get more tied to a real-world cases and moving out of this this game. Um and part of that is because it it allows you to mimic a lot of the financial instruments that we have in traditional finance. Um and you're doing it in a way that is opening that up to more people. Um and that allows for more expressiveness again. So, you know, where if you're stuck with just futures and options, well, that's that. Well, you with um smart contracts, you could code up a contract that emulates futures with extra you know, if if you wanted to, you could have a futures that cannot be traded on prime number dates, if you really wanted to.

Don't know why that would be useful, but you could do it. You can't do that in the um uh in the traditional financial world um because there's no programming language to support it. You'd have to convince everybody that that's how we're now going to behave. Now, as I said, that was just a silly example because I don't think off the top of my head there is a use case for um futures trading that cannot be done on dates that are prime numbers, but you know, maybe maybe there are some other things that uh some conditions that you are of concern, just like automated automatic shutdown if uh there's a price collapse, for example, things like that.

So, um Yeah, that makes sense. I mean, we were trying we did an episode on DeFi, and we kind of understood most of the concepts. Well, to a high level, we understood most of the concepts of DeFi. Then we tried to We were like, "Okay, to do this to really do this properly, we have to do an episode on TradFi." And that got so messy. We were like, "What I have no idea what half the stuff half these terms how half this stuff works how it's legal." It was a really, really messy episode overall.

I felt more confused by the end of it than I did by the start. I I can imagine it. I mean, I I actually joined a project for nearly a year involved with trying to um automate trading, just to learn about what is going on with these things. You know, what is a put? What is the difference between an option and a future? What is a derivative? What is a synthetic? And and yeah, you just as an outsider, you just end up feeling baffled and think, "This is bizarre." And it's it's not just the fact that the terms are complicated.

It's it's a historic system. Some of these things have grown over centuries. And as a result, there's like years of human history behind them and quirks to it that do not actually make rational sense at this point in time anymore. Yeah, it is bonkers. I remember seeing an interview. I'm not going to quote who it was by exactly. It was someone really high up in the Fed in America. And the interviewer's question was something along the lines of why does America print money and then loan itself the money back to itself and then charge interest on it when it loans back to itself.

And the guy couldn't answer. And it was I don't know how much of it was fake or real, but he was like the head of the Fed and it was just like went everywhere with Bitcoin. Obviously, all the Bitcoin fanboys were all over it. Yeah, we could talk I spent a whole episode talking about some of the shortfalls of fiat and and trad fi and all this stuff. Um, but so back to smart contracts. We talked a little bit about misconceptions, maybe limitations of smart contracts.

We kind of talked about the big picture and what some people think they can do versus what they actually can do. What are some of the other misconceptions in your mind? Like we talked a little bit about, you know, they're very deterministic. They don't always cover the gray area. There's a lot of jargon around this stuff. Could you talk about some of the other limitations in your mind? So, trying to think now, kind of got a bit blank. I I I think the biggest one actually is that the smart contract can really only read what is on the blockchain.

Right. So, this touches on oracles, which is It's all great if you're trading tokens that are all instantiated on the same blockchain. And then the contract knows exactly who has what and what its relative value is. So, if we all create our own tokens and we all list them on a decentralized exchange smart contract, that contract has access to all the data it needs. When you start trying to bring in real world stuff, um then you start hitting problems because you need oracles. You need trusted entities to put the data on the chain for you.

Um and then you have two problems. Well, three. So, one is a delay in getting the uh real-time data onto a chain when you know, you may have to wait 12 seconds for each block to come along. The second is there's going to be a cost associated with that. So, now you're paying for your data. Although, I mean, I believe Bloomberg terminals are not exactly cheap. So, uh maybe it's not a fair um complaint to level at oracles. Um and then uh you know, the third thing is trustworthiness.

When there are potentially billions at if you have an oracle, well, the whole thing about blockchain is that you incentivize people to be honest because they make more rewards through the incentive scheme by following the rules than they get by breaking them. when you have an oracle, you may end up in a situation where the company running it could make more money by lying about some data and taking advantage of that lie than actually being accurate. So, um so that there's some That's an I think a really key example of the problem.

the term garbage in, garbage out kind of comes to mind as people tend to use the blockchain. And like the holy grail everyone's been pushing is that IoT is going to solve all the problems and you know, All right. I'm not sure that's we're any closer to that, but it's uh it's a nice vision anyway. Yeah, I mean, it's just like they say, "Okay, we'll put these sensors in a this van and then we can tell whether it went above freezing and the stuff inside is spoiled." But, anybody who knows anything about computer security will tell you it'll get hacked.

It's not just a question It's not a question of if. It's always a question of when. Yeah, exactly. I mean, and speaking of hacks, and you're also I think touching there on this whole idea of on-chain data, right? Putting raw data as well on the blockchain, which there's there are various potential applications for like the the simplest case would be something like if you are an NFT, a token, Mhm. where you have a JPEG associated this use case for an NFT, you know, the simplest one, then we've had these things in the past where, because of those costs of putting the image on chain, people will put a URL to an external source, and then the image disappears or it changes over time, that kind of thing.

So, that's that's one motivation for why someone would want to put data on chain, right? Just to preserve my NFT. Do you Cuz you were mentioning it earlier, do you have any views on that? Do you think there are good use cases for putting data on chain for other things? So, you know, aside from oracles, for things like price, um do you think there's any application for the immutability of data on the blockchain, even just for persistence of data and things like that? Well, I I have to think it's it's very good for uh storing and then retrieving data.

I mean, in that sense, it works as a public database. I can write a smart contract, I can um create data structures for that smart contract, and then I can fill them in as and when needed, and then other people can read them. And if I need to hide it from the world in general, then I can encrypt it. Um you course you have to be careful just because it's safely encrypted now, it doesn't mean it will be in the future. So, you can't You have to assume that eventually it's going to be readable.

Um but what you can do is you can put data on that in the short term it's fine if it's not readable, and then later becomes readable. Um and uh you know, you you end up with all sorts of great things that you can build if you have a a public store of data where the changes to the data have to be clearly defined, and everybody can see what the requirements are for those changes. So, that that's why for it's so good for registering ownership, for I think it's going to play a big part in But uh having an identity on the blockchain is a is a good use.

Mhm. You then you you can set access management stuff then as well. I can I can create a system whereby you can only call a function in my smart contract if you own a particular NFT. And then I can have a limited set of people who are allowed to use my contract uh because they are the set of people who have the NFTs and the rest of the world doesn't. and then maybe if that's a a smart contract that people want to interact with, well, then your NFTs will get more valuable.

So, now we're creating we're we're getting to a more version of smart contracts where the underlying system is the same. It's still code and it's still running on all these nodes. Um but we have value to move around and now we have perceived value of things that you and I can create on it. Um and when you think about it, that's quite amazing. But I I I can launch a contract, instantiate these tokens through the data structure, and then somehow they pick up value because they become desirable.

Yeah, I think I'm glad you're also a proponent of that idea. I I think I certainly am and and Alec is as well. Um of you know, there are endless applications for the properties you get for for data just by putting it on a blockchain. The immutability aspect is great for posterity of data. I really like you bring identity into it because that's a really nice use case where you can actually minimize the cost. You don't necessarily want to publish large amounts of raw data, but you want to make attestations.

You want to hash something or encrypt something on the chain that you can then use to prove later. So, I think that's a really good really good application that you mentioned. Yeah, and they all tend to be small amounts of data only, a URL, a hash, you know, things like that. Um there are chains out there where you can put more data on them. I I wrote uh um an NFT contract for uh Binance Smart Chain back in 2017 that put images on the actual chain just to see that it how it could be done to come up with a neat compression algorithm and get PNGs on there.

Learned more about uh data formats for bitmaps and PNGs than I ever really wanted to Um and of course uh as time goes on that data storage will get cheaper. I mean uh this is one of the things I find really funny is how I remember in 2015 2016 people saying oh the chain's going to get too big. Have you seen the size of Bitcoin? You know, it's it's going to be a terabyte by the end of the uh decade. It's like well I've got 4 terabytes of um SS you know, solid state drives in my uh computer here uh and I think I paid under $200 for them.

So I I've got I'm sorted for the next decade. Yeah. I think Bitcoin is a bad example, right? The the amount of data they're actually pushing is so small. Especially compared to some of the networks that are coming in now. But they but people were worried about that. People were worried about the small amount of data the Bitcoin had. In 2015 it was a serious discussion what can we do to keep the uh chain size down because we're talking about hundreds of gigabytes and home computers can't handle it.

Now it's 20 25 and home computers are Bitcoin no problem. Nobody's worried about that anymore. You're right that there are other chains. I mean Ethereum takes stupidly long to synchronize. Um I'm I run a uh Bitcoin node at home. I don't run an Ethereum node because it uh if I'm going to run one I'd like to run a full one not one of the cut down lightweight ones and it just takes to you know, I I I can't keep up. It's it I don't have a fast enough uh network uh even with 5G and um I I can't buy an SSD that's big enough.

I have to rate several together. So it's kind of like well I'll wait until hopefully computer hardware will overtake the ethereum requirements as well. But then there'll be the next chain that is even bigger. Yeah, well I guess this kind of comes down to the the idea of like immutability with storing data on chain. Like should there be future costs associated with that? You know, you put this this image back in 2017 and you know, there are miners probably who are still maintaining that and storing that somewhere.

And I've seen like more and more people are talking about the idea of pruning, you know, data that's not used and having these special archive nodes that cost more to retrieve the data. What do you kind of think about that? Well, I I think these are kind of um they're always short-term problems. They seem significant and then later they become irrelevant. So one thing you could say is yeah, okay, I may have put a lot of data on ethereum eight years ago and it's still there now.

The fact is I had a lost opportunity because I spent ether on it when it was like $10 or $50 a um per ETH. now if I instead of putting that data on I'd held the ETH, I would have a lot more money. So in a sense you are being as long as the price is going up, you are being retrospectively charged. Um and who knows, maybe in some point in the future they will go through and discard stuff. But it's difficult because how can you tell what's significant and what isn't?

Right? And just because nobody has called a smart contract in 10 years doesn't mean that 10 years from now it's not going to be important. Yeah, 100% I there's part of what we said about, you know, just putting things out there on the blockchain and then because we have this value transfer value component embedded in everything, you you kind of immediately test it in a marketplace, right? You you you find out if these ideas are good or if they're bad and that's why you see some projects taking off, some smart contracts taking a lot of adoption even when the costs are high.

You know, things going to stay there and people still use Uniswap despite the kind of exorbitant cost, but it's part of the whole entanglement of the of the value transfer and technology, I think. Um I'm I'm really curious to get your take on what applications really excite you for smart contracts? So, obviously I I believe your background is as a as a patent attorney, correct? And you're obviously also an inventor. well, no. I'm I'm a a pro se inventor. So, that means I represent myself. I don't I haven't got a patent attorney license.

I've never done a formal law course. Oh, wow. Okay. I Um my previous employer had a um what I thought at the time was a pretty generous uh reward scheme for employees who submitted inventions. It's quite common in American tech companies, you know, they give you $400 if you give them an invention and they give you another thousand or 1,500 when a patent's granted. So, um so, I thought that was fun. Um and I spent quite a bit of my spare time coming up with ideas and through that I got to talk to patent attorneys.

because they're paid by the hour, when I asked them questions about why the patent application that they wanted me to look at had strange words like, you know, why did they say, you know, the the database comprises A, B, and C? Why don't you say it includes it? And they go, "It's a legal thing." And um well, can you explain further? Um and why are the claims why do they look like a computer program written in English? So, um so, I wasted a lot of company time uh talking to their attorneys and getting a free education in um how the patenting system works.

And then uh once I got laid off, I thought, "Well, I might as well start filing my inventions myself." And then you read articles about how to argue with the examiner about getting it granted. Um the patent examiners at the patent offices really like talking, well, not all of them, but a lot of them really like talking to inventors who are representing themselves when the inventor seems to be clued up because it's kind of makes them feel like that was really the point of the patent system, not about arguing legal technicalities, but talking about the invention and why it's significant.

Um and I I think I'm at 16 granted patents that I own only 15 cuz I sold one. that uh uh I did it all myself. Right? Yeah. So uh You know, you were earlier you were talking about all the crazy things you can do with smart contracts that you're regularly developing outside of the patents. You were mentioning like white lists, patent well, NFT creation, all this kind of stuff. Which of those could you kind of dive into that you find as a really exciting real-world application of smart contracts?

You were talking about so many different industries and yeah, something like that. Well, I'm I I to me the obvious one has always been the gaming industry, right? Um I mean, we we've gone through the strange evolution of ownership in the you know, when I was young I had my record collection on vinyl and then on CD. I had my book collection on paper. and I had movies on DVD or VHS before that and I owned them. I I had a box and as long as I looked after them, I knew that I had them for the rest of my life.

And then we got to the point where um it became easy to duplicate CDs and copy MP3s and stuff like that. So um so we used to own our stuff and not only that, we could lend it to our friends. We could give it to our uh um kids, right? And then uh streaming came along and solved the problem that uh these media companies had in that they could uh uh rather than trying to solve things with a DRM, which didn't work, they they could uh they could lease us the movie.

So even if you go and buy a movie on Amazon Prime, right? You You don't own it the way that you owned it when you bought it on a DVD. Because when you die, you don't get to pass it on to your kids, right? Plus, you don't know what um they they I haven't read the 27 pages or whatever that the terms and conditions, but I imagine that it actually says there's no guarantee that you will be able to see your movie that you bought at some point in the future.

Cuz it's just too big a promise to make, right? And they have the responsibility to make sure the server's running. Whereas when they gave you a the responsibility was yours to make sure it didn't get scratched or lost or burned in a house fire, right? So um and I I think that blockchain may allow us to return back to that sort of golden age where you actually bought stuff and then you genuinely owned it in the sense that it was yours to keep forevermore or pass on to somebody else.

And I presume that'll come with extra costs. They'll keep, you know, streaming cheaper than actually buying it, but you'll have a real representation of it in digital form on a blockchain. and then I mentioned gaming and the reason I mentioned that is because my kids um are obsessed with amassing digital assets on Fortnite, on Roblox, Brawl Stars and things like that. Um and they think that a a Pokémon that they own on own on Pokémon Go on their phone, they they give that the same credence they give a Pokémon card, right?

So I'm I'm Gen X. To me, the card is certainly more valuable than the representation on the phone, but they they live in a world that they have a different view of the digital than I do. For them, the digital is much more real than it is for me. I imagine if they watch The Matrix, they'll just go, "Yeah, and?" Right? Um so uh, they're not going to have the kind of, uh, mind-blowing experience I had when I watched it. Once I got over the wanting that phone that went click.

Yeah. So, uh, So, and I think there you may end up with a situation where they want to own their game assets and know that they really own them. That if the game eventually shuts down, they still have the assets that they they obtained. And to me, clearly, the blockchain is the way to do that. Right? Now, we're not relying on a company continuing to run the service. Now, we have decentralized data storage, decentralized, um, blockchain, and other people ensure that it keeps surviving. So, um, So, that So, that to me has always been the first use case.

But, uh, the game industry didn't like it. So, they did a PR hatchet job on blockchain to start with. And they got the gamers thinking that this was going to be bad for them. Um, how genuinely owning your gaming assets could be bad for you as a gamer, I don't know, but, uh, it worked until now. Maybe the tide is starting to shift. Mhm. Yeah, I I I I I certainly hope so as well. We we've talked a lot about gaming and and the potential for blockchain native digital assets.

And I really like how you knitted those two examples of, like, the big potential future use cases together because they're kind of two sides of the same coin there and how you described it you know, I I I also saw I I just looked it up. The the Bruce Willis reported story of suing Apple over being able to give his iTunes library to his kids. And apparently it was it was not a real story, but everyone knows it. It's one of those kind Everyone knows it.

It's one of those Yeah, exactly, right. It's one of those kind of uh, Mandela effect moments or something. Everyone knows that story. And but it but it resonates. That's probably why, okay? And why is it why is it not possible, as you said, why can't Apple give that guarantee? Well, it's because what's the lifetime of Apple? You know, they're a super company, they're a huge But, will they outlive most people, especially if you're, you know, under 30 or something right now? And exactly what you just said there, that's one huge distinction with the blockchain is it doesn't need a single entity to keep running.

It can keep replacing with the fittest entities, right? It can continue going on by replacing who's running it over time. So, I think that's a really, really nice way of explaining. And as long as it's providing value, there will be people who will run the nodes. And which I I mean, I I don't I'm not going to make any predictions on how long the Bitcoin chain or the Ethereum chain are going to continue running, but I I suspect I strongly suspect that they're going to be some of the longest-running forms of software that we're going to have.

That these these things are going to you know, I think DOS is a fairly long-running piece of software and it's pretty much died now. but uh and there are some Unix libraries that are now continuing in in Linux, but I I I think as a kind of big piece of visible software, um the various blockchains that we're seeing just arising now could be around potentially centuries. Yeah, definitely financial advice from Keir, I think. So, we best buy Bitcoin and Ethereum before we put this episode out, Jack.

Well, I I just I don't see any reason why not, right? As long as they keep providing value. Um and then and and they may die off in the same way that currencies die off, right? Money continues, but uh every major European country seems to have had a go for a century or so at being the reserve currency until it went over to America. Um so, I I don't know which particular ones will die, but I suspect the there's what's it called? The Lindy effect, right?

Which is the longer that something continues, the longer it is likely to continue. So, uh you know, Bitcoin's been around 15 years. It's probably going to be around for another 15. And if it manages that, then it may well last 60. So, who knows? Um if we're all still around as a functioning planet in a couple of hundred years, there could still be that uh you know, um what was the Satoshi quote at the beginning in the very first block? Um Chancellor of the Exchequer considering raising rates for second time or something like that.

I should know it off by heart really, but I but uh it'll be it'll be there, right? Yeah, I think um I think I also subscribe to that that idea. I think it will probably be or at least a couple of the chains we already know will be the longest surviving, you know, things we have in software. So I I I I think that is a very a very fair prediction for us to end on. And and you know, Kia has been such a great conversation.

Before we let you go, we do have kind of two extra questions at the end if you All right. Let's hear them. We we ask these to everyone cuz it's quite a bit a bit of fun at the end and we like to see how how they answer Oh, thanks for the heads-up. No worries. It's I'm sure you'll If if if anyone's going to be able to do this off the cuff, I think it'll be you. All The first one is in one sentence, how would you describe Web3?

What does it mean to you? In one sentence. Okay, well, I've got a nice little PDF that I produced that explains Web3. So really what I should do is um It's just ChatGPT. That's right. Yeah. I was going to just say the URL, right? Provide a provide a pointer to it. Yeah, I I I think it's the fact is that uh Web2 is a is websites with databases where the databases are controlled by the company, so Facebook or LinkedIn or Google or whatever, and you or I can change stuff in them with Right?

And Web3 I see as now we have a a kind of back-end data store we as individuals get to set the rules as to how that is altered. And then you can go on and and one of the uses for decentralized data store is that you can use it for value, which is what people focus on. They say, "Oh, Web3 is the internet of value." Well, I think it's um a lot deeper than that. But the first surface application is you can then use the the database that everybody can access um Mhm.

for keeping track of who owns what. Um later, I think there's going to be a load of other things. I mean I I I spent some time with a guy I know from LinkedIn looking into if we deploy websites on the IPFS and we use the blockchain as the data store. Cuz you see you have this problem if you have a decentralized website, where do you write the data that people putting into it? Otherwise, it just becomes a static site. It's not not exciting. And the answer is it can um write it to the blockchain.

Except for one thing, which is that it has to go through Infura or Alchemy. It has to go through a node. once everybody has the blockchain node in their browser then then it does you truly have the possibility of fully decentralized websites that you just push out there and forget about. And if they're popular, they survive. And if they're not popular they disappear. Mhm. I I love that description. And I I love that idea as well of of blockchain effectively blockchain hosted uh website content. I was hinting earlier about like the internet archive.

I think it's a great application. And I when I asked that question about one sentence, I was actually think I was thinking of just saying it's redundant because you have that brilliant PDF. It's probably one of the most shared PDFs after the after the white paper in all of in all of Web 3 and crypto. So we popular. Yeah. Yeah. And well, it's because it is so succinct. So we will definitely link that in the episode show notes. Don't worry. We'll we'll definitely share it cuz I personally love it as well.

Okay. And the final question, Kieran, is Oh, sound a little bit like I'm doing a political interview now. That was weird. I'm doing one of the debates. I refer this honorable gentleman to the answer I previously gave. Oh, wow. I knew we were going to get politics in it somewhere. Anyway. if you could pick one person from throughout history on the planet with us today or could even be someone fictional to sit down and talk about all these things, Web 3, smart contracts with, who would you pick and why?

Uh John von Neumann. Okay. Right. So he's the Hungarian uh who went over to the US and worked on the Manhattan Project and um was a lecturer there in mathematics and I mean, uh immensely smart. One of the smartest people that's ever lived on the planet. Um but capable of talking to ordinary people. And uh I think I mean, he just when you look at the conversations he had with people like Claude Shannon, the father of information theory, and Richard Feynman, Norbert Wiener, and people like that.

I mean, he he just seemed to be able to talk to anybody about anything. and I think he would have been fascinated to see blockchain. Plus, I I went to visit his birthplace when I went to Budapest to see him. My my wife gave me a week a long weekend off from the kids. Said, "Go go to Go and Go and do fun things in Budapest." And I went and stalked dead mathematician's John von Neumann and Paul Erdős, the two personal heroes of mine. She was very disappointed.

I love that answer. That's definitely We've not had that answer before, I can tell you that. Um but yeah, I definitely agree with that. Like yeah, well, who is it? Feynman who said, "If you If you can't explain something to a 6-year-old, then you don't really understand it yourself." So yeah, I think a real show of intelligence tell intelligence is being able to explain things simply to people that don't necessarily understand the topic. That's a great answer. Um thank you, Kia. Like this has been such a great episode.

You've Yeah, explained so much in such layman terms, and I've learned a lot. So thank you for that. And I hope we get to get you on the show again. Um and all that's left to say is thank you to those listening wherever you may be, and join us next time to entangle a little more of Web3.

Topics: Blockchain & Crypto

Related episodes

All episodes