Episode 28

DeFi

Watch on YouTube

About this episode

In this episode of Untangling Web3, hosts Alec Burns and Jack Davis delve into the complexities and innovations of decentralized finance (DeFi). They begin by discussing the fundamental shift from centralized entities to technology-driven solutions in DeFi, highlighting the role of smart contracts as self-executing contracts distributed across blockchain networks.

While acknowledging the transparency benefits of smart contracts, they also caution about potential risks like bugs. The conversation then turns to the ERC 20 and ERC 721 standards crucial for building tokens and NFTs and discusses oracles, vital for feeding external data to smart contracts, thereby broadening DeFi protocols' information scope. However, they note that oracles reintroduce a level of trust into the system, albeit distributed among multiple parties.

The hosts explore key components of the DeFi ecosystem, including the practical applications of oracles, the importance of stablecoins in accessing monetary systems within DeFi, and the dynamics of lending and borrowing through smart contracts. They compare the risk-reward profile of DeFi lending and borrowing with traditional finance and introduce decentralized exchanges (DEXes) as alternatives to their centralized counterparts. They describe two types of DEXes: order book DEXes, similar to traditional stock exchanges, and automated market maker (AMM) DEXes, which rely on smart contracts and liquidity pools.

Wrapping up the episode, Alec and Jack address the broader implications and challenges in the DeFi space. They discuss the risks of centralization within decentralized platforms, the anonymity in liquidity pools, and the debate over the comprehensive effectiveness of smart contracts. The conversation also touches on the potential of AI in enhancing smart contracts, the role of digital identity in DeFi, institutional adoption, regulatory challenges, and solutions like off-chain computation to address Ethereum's scalability issues. The episode concludes with an acknowledgment of the need for further expertise for a more in-depth understanding of the rapidly evolving DeFi landscape.

Transcript

Auto-generated from the episode audio.

oracles are effectively ways to access real world data it could be prices say if we're talking about exchange rates you know I've committed to some smart contract that says Okay um on this date I want you to submit this trade and the Oracle could plug in on that date the actual exchange rate say from pounds to USD or a stable coin whatever it is or it could pull in weather data or something like this and it basically enables smart contracts to have a wider repository of data right and pull data from external sources that aren't necessarily in the blockchain itself or on the defi protocol itself welcome to another episode of the untangling web 3 podcast so in the last episode we covered basics of traditional Finance or trafy or centralized Finance or Ci or whatever you want to call it and that sets us up quite nicely to talk about decentralized Finance in today's episode um I think one of the most important things that I took from the last episode is there's a

lot of inefficiencies and a lot of issues that come about because of these inefficiencies in Trad and I think the fundamental philosophy of defi is around shifting from you know centralized entities to technology-driven Solutions and shifting trust from these centralized entities to more transparent technology and maybe more predictable technology but yeah I guess this episode is to really unpack that yeah exactly um I think we've covered all the kind of foundational concepts of of Finance so some of what we talk about today should make a lot more sense now because a lot of the stuff in defi is trying to replicate some of those financial products and systems in a more efficient way as you say or in a slightly less centralized manner where you don't have I mean I've seen it described as kind of the centralized Finance world it's like a hub and spoke model where you have your financial institutions in the middle and everyone else is connected to them and then in you know def we're talking more about a distributed

system where you're interacting directly with your your peers your cter parties rather than having third parties in the middle but yeah I think there's lots to cover in in defi in and of itself that's why we couldn't do it in the same episode as the tradire one so I think maybe let's start with just going through some of the basic key Concepts and I I don't think we'll cover everything today there's so much to talk about but um I think it makes sense to start with smart contracts right they're kind of the building block for for all these things yeah definitely I think when we started this podcast we actually said let's do a whole episode just on Smart contracts and we almost certainly will because they're super important I think the term is misused in a lot of ways I know you agree with that Jack but yeah smart contracts at the highest level are self-executing contracts you know with the terms in there written in in lines of code and distributed across the

blockchain network and quite importantly that they will execute based on these predetermined conditions and obviously this creates a degree of transparency in their actual execution yeah exactly I I don't love the term smart contracts I know a lot of people don't as well I tend to try and think of them as kind of like interactive contracts because they're they're just contracts they're not living they don't have their own agency but you can interact with them and a lot of these blockchains like ethereum or binance chain uh they are what we call Smart contract platforms where you can put a smart contract on there and then you can interact with it later and that's kind of the basic model and then these smart contracts in the defi World they become the foundational building blocks so if you have a protocol for doing a certain Financial product for doing an exchange or something then that gets put into the logic the the functions within the smart contract that you can then interact with you can basically give

it some inputs it will give you an output that kind of thing maybe the inputs is the tokens you're putting in and then the output is sending tokens to somewhere else you're getting tokens back out of a different kind that kind of thing so yeah it's very broad but they are the Bedrock of the whole the whole system really yeah and the kind of the benefit is quite obvious there there's no need for a third party the middle or you're effectively remov you're replacing say an actual individual or an entity that would facilitate the demand Supply kind of trade with a self-executing contract and that should in theory be more efficient more transparent and all these things that we keep saying so that's Central party which is classically an entity maybe has some I don't know procedures that are a bit unknown complex hidden becomes much more transparent with by replacing with a smart contract and like I said there's a lot of benefits that come with that and it's completely foundational piece in everything

Defi and you say you know in theory and you're right it should be more transparent more efficient than the centralized Finance World in reality we'll kind of come on to some of the risks and drawbacks of defi later but you know that's not always the case but yeah in principle having a single set of rules that's public and transparent that everyone can interact with is at least improving on the opak andess of the centralized Finance World um there are there are lots of caveats with it you know like it's it can be very complex to correctly simulate the same logic you need there can be big failings as we've seen you might write this more contract incorrectly and and there's been kind of a quite a brutal trial and error process for lots of these protocols over the years so it's not it's not like a Magic Bullet and this is completely uh it's in evolution right it's not reached the final stage yet but but you can do some pretty amazing things with them

I think yeah I mean you're completely right like the idea of being able to you know hardcode or put everything in life into a binary format represented in a smart contract is quite a difficult one for me to get my head around like there's so much complexity in life how can a smart contract really include every single potential outcome or input and I find that really hard to actually get my head around when you talk talking about like borrowing and loaning that's quite binary there's only so many things that can happen I give you a little bit of money I expect a little bit more money to be returned the next day if not you will pay these fines but when you start to talk about much bigger things no when you're talking about business logic and talking about how this can be app applyed to security derivatives like trades with a thousand different people in a thousand different terms like that that is no longer a simple smart contract it's much more it's non-trivial

to kind of actually to to create that and to more importantly probably enforce that as well yeah I would I would probably add to that what you gain with the transparency of the smart contract is and again you said like the the complexity of simulating the complex business logic is very difficult and one of the things you don't get because it's been become you know blockchain based you don't necessarily have recourse right you can't code into a smart contract well how do I resolve a legal dispute you know you don't really have that concept so much in smart contracts it's it becomes it's very much um you have this term code is law that people use often to talk about smart contracts they say whatever is defined in this this smart contract that's how the thing works like forget about the legal system which is a little bit scary and I don't think it you know I think that's probably a misunderstanding but for practical purposes that is kind of how it works right now

if something happens in a smart contract and the smart contract has a bug and it all goes wrong a lot of the time then you're going to lose your funds so that that's why it's also quite an experimental Wild West space at the minute as well right you have to be very careful when you when you research and get involved with with a D5 project yeah and I think one thing that is hard to get my head around so times is how do you get the data into it like say you have these predefined conditions and I say you know you know I pay back £10,000 on xate and I know that's actually quite an easy one to prove in in in defi generally but what about other data like how do I say prove exchange rates had I prove that some event has happened that's actually separate to the D5 protocol I think that is much more complex and we'll talk about some of the Mechanics for that yeah and I think just before

we kind of move on from the smart contracts because as you said we need a whole episod talk about the specifics of that I think we will but some of the terms you you will have potentially heard one of them is erc20 so this is a standard and that's one of the good things about smart contracts is that they have a huge developer Community around them already especially in ethereum and binance smart chain and other and other you know blockchains that exist now you have big developer communities standards have emerged kind of organically over the years for how to create certain types of smart contracts if you want to go and create a token protocol if you want to build a lending protocol on top of ethereum or one of these other chains then you have the standards there so as I said erc20 is how you go and build a fungible token a token that acts more like money there's also one erc721 for nfts and those are kind of defining okay what the

contracts look like but there's all these other tools on top as well things like open Zeppelin which is a library for building these so you you can it takes about 25 seconds to to build a token system on ethereum if you want right it's crazy you can just go and you know pick a logo pick a trading name for your your token and then you're away right it's it's it's quite mature now how you do a lot of these things and this is what you're doing on your in your free time right on the weekends just starting all this stuff up no I think you're right like one of the big things that we're talking about is in general benefits of def5 is that things are open protocol there are standards that allow you to move from say different application to different application and that's a massive benefit of anyone building on a D5 protocols we've talked about previously which is the same benefit of web 3 the fact that aren't closed off means that

people can feel much more comfortable creating like this community Vibe building on top of things that you know are going to be stable in the future um yeah I mean that's really important I think so one of the things that we just mentioned with to do with smart contracts is how to get data into the smart contract and this is one that I find particularly interesting this is we call these oracles and oracles are effectively a way to get well I guess data generally from external sources onto I'd say blockchains quite generally but maybe smart contracts if we're talking specifically about defi so it will have oracles are effectively ways to access real world data it could be prices so if we're talking about exchange rates you know I've committed to some smart contract that says Okay um on this date I want you to submit this trade and the Oracle could plug in on that date the actual exchange rate say from pounds to USD or a stable coin whatever it is or it

could pull in weather data or something like this and it basically Ena smart contracts to have a wider repository of data right and pull data from external sources aren't necessarily in the blockchain itself or on the dii protocol itself yeah I can tell you're more enthused by the Oracle side of dii than some other parts maybe because you know then it gets you into the world of iot and data feeds coming into the blockchain uh and just to kind of add color to what you're saying right I think it's worth mentioning when you have these smart contracts normally they don't really have any awareness of context outside of the the rule set that is say ethereum right it knows how to valid when you have a transaction happening in ethereum that's interacting with a smart contract it can access things about that transaction but it won't be processed with any knowledge of you know what scor is in the Man United game right if you're doing a gambling kind of type use case it won't

know what you know what by what massive score man united lost this week so the oracles kind of also ruce a little bit of trust which is you know it's a a point of contention but it it provides a way to inject external State data like prices like General news uh information that kind of stuff into the the blockchain and how you can have semi trust there is you tend to have it signed by many different people so you're kind of you're trusting a little bit but it it still distributes that trust amongst many parties so you might have five or six different trusted verifiers that all are saying okay this was the price of this asset on this date um and that's why you tend to have these oracles exist as Oracle networks right so chain link is the kind of the biggest example of an oracle Network where you have lots of different machines that will provide uh different sources of input data and then the aggregate of that becomes what you can

use in a smart contract yeah I really like that example you gave your own gambling it's like if I want to bet with you on say Man United match or something like that and you say okay I'll bet1 pound that Man United win 2-0 for example and you'll say you'll give me some return like you'll give me10 pound back if that is correct anything else then you take my 10 and that's the end of it set up a smart contract very easy to you know get that those conditions that logic into there but the only thing that really matters is what the score is at the end of the match right and you say the Oracle there is a way to actually get the data from the match say some trusted Source be 365 I don't know what it is and pull that data in so that it can execute based on two potential outputs either Jack wins takes all the money because it wasn't two- nil or I win because it was two nil

and I take the money and that's a really good use case I think you are right the reason I like oracles so much is because it makes things practical and tangible you can give examp examples that actually work with people's everyday lives and I think one thing that you mentioned that's really important is that you know we're saying things like the blockchain Bitcoin these open Protocols are battle tested and really trusted and that that's very important and the more we abstract from these trusted distributed networks like Bitcoin for example the more risky they are right the less trust we actually have in those systems and this is a big one for oracles you know you have the most battle tested defi protocol or smart contract Pro call in the world and then you all of a sudden say okay well it's all dependent on this Oracle that takes data from an external Source well that is the you know the in the armor right there like do we actually trust this Oracle and that's quite

an important thing to understand yeah exactly as I would to use your favorite term that's kind of where the web 2.5 comes in right when you introduce oracles you introduce semi-trusted environments for doing you know this is would be a classic thing would be if if you're not doing a gambling use case or something would be like an insurance product that that depends on um you know certain temperature in a region for a farmer getting insurance for crops and things that's a good example I've seen but yeah I think it's interesting but that's you know it's it can be controversial because of the The Trusted nature so that's the first two big components of what makeup defi right smart contracts these these things you can interact with to implement logic and then oracles which help you add data into that mix and you know do more interesting things with that logic the third one that I think we should touch on is actually stable coins right because a lot of these things you know we're

talking Financial products but we're we're talking about web 3 we're talking about things like ethereum and binance or whatever and to get into that ecosystem you need your money right my money in in my my bank account can't interact with that and stable coins are we've you know we've covered them in episodes tend to be pegged to the US dollar for example have a stable value but they are web 3 tokens so they are kind of the fuel that is used a lot of the time to on and off board into these def5 protocols and I just thought it's worth mentioning because in D5 there's a huge Reliance on them right without the liquidity you get from those stable coins a lot of this couldn't really happen and your main point there is that stable coins are a means for people to get into you know monetary systems that they use every day like the pound that I can actually buy my grocery with into def5 protocols like tether or whatever it is because that's

what def5 protocols are built on it's just an access point right right that actually allows to use get the benefits of defi without actually having to you know try and use tether down the shops or something like this yeah exactly it's like if you think of going from the real the real world and you want to use a defi app or protocol then you you don't have to jump into the defi world and back out every time you can convert some assets using an exchange into say tether USD or something like that a stable coin and then keep it you know going in and out of the tether between exchanging between the tether and the and whatever the token is you're using for a def app or def protocol so you don't have to leave the whole ecosystem to to kind of keep your storing your value somewhere basically and we do have an entire episode about digital cach and cbdcs um so there's a lot more information you can find out on there but

it will be interesting to see if we get more and more usage out of stable coins and cbdcs where we care less about the on andof ramping and more about the actual you know staying in the system itself and that'll be quite powerful um so the next big thing is kind of I guess what a way of actually using these D5 protocols and that's around lending and borrowing and this seems like quite an obvious one it's effectively a way to use Smart contracts um you know as simple function for earning interest if I give you say you know I want to borrow A1 pound I could cize some asset that you agree is worth more than a 100 pound but actually doesn't give me the liquidity that I'm actually after say if I have a a good example of here might be I have a piece of art that's worth1 120 pound but what I really need is the liquidity of100 pound I say Jack look at this nft I have it's worth £120 you

agree to that it's all all covered I say I'm going to put this up as collateral if you'll give me100 pound and you'll say yep that's completely fine if you give me1 110 back in a month or two months then everything goes ahead I'm happy fine if not I'll take that nft and that nf's ownership will be transferred to me and that's quite an easy to understand way of actually keeping everything in the web three space right yeah exactly and and this is you know this is a very simple use case in D5 but it's also one of the original ones right so in I think as as far back as 2015 right defi has been a thing you had maker da which was one of the very first protocols was effectively a small lending and borrowing platform that that came about and one of the interesting things about defi lending and borrowing is you have this idea of what's called over collateralization so normally you might think of okay well if I'm gonna take

out a loan then you have to put up some collateral that the the bank can take if you if you default on your payments on your loan right now because uh you know we say this is great because you don't have as much counterparty risk in defi because you're just doing it to Anonymous entities potentially interacting but how how do you know my credentials for repaying this loan you don't know my credit history so it's a good thing that you can access loans and credit effectively without needing a credit score that's a good good point about these things but for the counterparty then you have the risk of will you be able to repay it and that's why you have this this over collateralizing ation so if I wanted to borrow 100 then normally they'll ask you to uh put down assets worth about £120 or something right to over collateralize um so that you can pay the interest plus the the principal amount that you're borrowing if you if you do default so this

this lack of trust actually makes it a little bit more expensive in general for Lending and cuts down some of the use cases so it's it's one to kind of be aware of but it may be more limited in scope I think yeah that makes sense I guess the point is that it's more efficient because we can interact peer-to-peer and maybe not have processes like kyc verification all this kind of stuff but the problem with that is if you don't have a central party that runs and mediates everything is there's no way to have legal recourse and this has been a big thing for you know centralized web to legal enforcers and all this kind of stuff is how can we work on bitcoin when if I accidentally send 100 you know Grand to someone or someone doesn't pay back a loan when they were meant to there's no way for legal recourse this a big powerful thing about Bitcoin is the mutability right the finality of Bitcoin and I completely understand why in that

instance you need to say reduce the risk by having more collateral on the line to actually say okay this is going to be fine if if say you can't pay back the loan in time yeah and in defi you exactly that the risk reward profile of all of these things we're going to be talking about is genuinely more extreme than in the the trafi CI World um you tend to see higher interest rates you tend to see I mean there's this thing called a flash loan which is like like a a loan with a lifespan of like seconds or minutes which is blows my mind but it's because you have people with higher risk appetites quite frankly who want to borrow large amounts of money to do a small Arbitrage trade to make a small percentage and then you know pay it back with what they've earned on top so you you have a lot of people taking a lot of risk and offering quite High rewards for taking risk and I think that's why

you know it's alluring for some people but when it goes wrong it goes pretty badly wrong as well yeah yeah so the next big one which I'm really think relates to what you've just said is around decentralized exchanges like this is a big one hot in the news constantly what like so I think this is a Hot Topic that we will spend a lot more time on in future episodes but it kind of uses a lot of the principles that we've spoken about already the point is rather than you know me and Jack want to trade some assets we go through a centralized exchange that make a bit of money on top of that bit of commission we can interact on a peer-to-peer basis um through one of these decentralized exchanges but with a lot less Reliance on that and it takes a much smaller margin or in theory it takes makes a much smaller margin and effectively just linking us up rather than actually facilitating the trade itself um that sounds great but you

know some of the issues that have been associated with that is it's effectively unregulated right and you know for for example Unis swap is one of the things we're going to speak about a bit later there was no there's no kyc required for that in a lot of ways so I don't need to identify myself if I am to scan people it's really hard to actually have some recourse to even find out who I am in the real world to even start that process and again like we were saying for there's a tradeoff there efficiency but at the cost sometimes of actually having the ability for recourse that's a common theme right it's it's all slightly more accessible it's all people like to use the term censorship resistant right it doesn't really stop you from entering the system but the risk reward profile is very different um and something about the dexes the decentralized exchanges I find interesting is they actually there are two different types that they they've basically been trying to build so

one being what's called called an order book decks which looks very similar to what the ones we talked about last week in trafi like simulating what happens with your normal stock exchanges stock Brokers they have an order book matching buyers and sellers um building that on the blockchain is is quite difficult and is not really that popular to be quite Frank because it involves a lot of the problems you just mentioned uh but but with additional like lack of trust that you don't have in the old world you have a central party there the other version which is again a lot more interesting and where a lot of the innovation has been in defi is what they call amm dexes or and getting into this acronym soup now so amm standing for automated Market maker and we talked a lot about Market making in the last episode well one of the really Marky Innovations in defi is building these automated market makers and we we'll get into how they work in it just a bit

but they they're essentially a completely new mechanism to make markets that only really happens via Smart contracts right now yeah I mean maybe we can dive into it right now because I think like you say amm or automated market makers are big in the space and they're effectively like say how how a lot of decentralized exchanges work so my understanding of this I'd say is is quite shallow but it's effectively in defi in the whole protocols and things you just talked about it let you trade assets without the need for a specific buyer or seller right yeah basically yeah okay and they they work using these pools of money I mean to facilitate trades and the price of Assets in these pools are determined by some formula and not actually by individual sellers or buyers like in traditional systems yeah exactly this is It's a good demonstration of what we talked about with smart contracts so your automated Market maker the the maker is actually your smart contract right you build a smart contract that

has certain logic in it that defines how you know what rules this Market maker follows so when you interact with it how does it respond to you basically and they're all pretty much based around this concept of the liquidity pool whereby you'll take a smart contract and you say I want this to be a market maker for a specific trading pair so you'll say Okay I want this to be ethereum to the dcoin Dai which is the makeer Dow coin I mentioned so I want to make a liquidity pool I want to make a market for trading between ethereum and die coins then this liquidity pool effectively gets established and set up with the smart contract and you put in tokens for ethereum and you put in tokens for D and the ratio of tokens in that pool is what sets the price so that when we talked about getting data in and out of the system the smart contract doesn't need to know a kind of global market price from an exchange like coinbase

it determines it based on how the level of of coins in this pool fluctuates and as you said there's a kind of they have different models but the the most popular one and one of the original ones is called the constant product formula have you come across this one Alec no I haven't but guess is what the the ratio of one to the other has to be constant or something like like this yeah basically the number of tokens of one multiplied by the number of tokens of the other asset so x times y has to be equal to a constant all the time so what does that actually mean if you want to kind of interact with the pool then any trade you do because you're basically trading with the pool right you have a pool of assets you can buy and sell from the pool and what it does is it will let you buy and sell from the pool of one of the tokens but in such a way that the change in

tokens of both sides is always constant right so that just basically means the number of tokens will change one of them will go up one of them go down the product is the same and then the price is is changed based on the ratio change so that's a little bit too technical what we normally do but is it's worth looking into and there are more complex ones but that's that's been the model right Unis swap was the Big Marky one the first big successful you know I think it's it's billion dollars now or something this is huge but that that's what that uses typically and I guess what the incentive for people contributing to this liquidity pool which effectively enables all this is they take well some margin of margin of all the trading fees right yeah exactly they get issued if you if you contribute funds you lock funds to one or both sides of that pool and then you get these liquidity pool tokens LP tokens in return right and then based there's

a small fee on every transaction and then you take a portion of the fees according to how much of the lp tokens you've got you can see this complicated quite but yeah it does work by by the looks at things okay well that's interesting I guess that kind of relates to some of the other things we want to mention like yield farming for example which is quite similar to I guess staking which you just talked about a little bit which is effectively lending to defi protocols like Unis swop right and you know you're automatically using strategies to extract the maximum yields from a from crypto Capital typically using multiple def5 protocols at the same time yeah yeah yeah exactly and and the farming idea I mean it introduces this concept of composability I think we mentioned it in the Trad episode but because you have all these smart contracts that can interact with each other as well and you can build much more complex systems by making them talk to each other and then you

can do much more complex strategies to to extract the most yield the most money out of the system and again it becomes very complex uh much riskier when you start doing this you know taking out loans to put put down collateral to reinsure you know another product it becomes very complex quickly and then the next one is staking I guess most I mean I've staked I think most people have who own crypto assets generally have come across this content mistake I think coinbase first supported it for ethereum 2.0 right and this is the idea of locking up assets so you're ethereum as collateral for example to support a new blockchain so people would lock up their you know ethereum for the new stake ethereum 2.0 to actually support and be used in that so for that one specifically you'd lock up your ethereum so that you could eventually contribute to say be a validator which required a certain threshold of ethereum to actually say you've committed resources to you know care enough about this blockchain

to be able to validate the the consensus mechanism going forward yeah it's this idea of staking is very closely related to locking in a defi protocol or um providing liquidity to an automated Market maker it's another way of putting in assets and getting rewards for doing so staking generally refers to adding assets to help secure a blockchain like ethereum whereas the Locking and um liquidity provision for other things is more about di5 protocols uh kind of on top of ethereum but yeah as you said I think it's like something like 32 ethereum you need for for to be a validator so I don't know if you've got that much hanging around Al if you're if you're one of the validators but quite a lot maybe if this podcast goes big maybe we'll talk about it one day so I think one of the big ones that people will know about is D which is decentralized autonomous organizations right and this is been quite a controversial one but it's effectively you know you have like stocks

in a company it's similar to owning like a web 2 company but effectively you there's no Central coordination you are Distributing this all over the globe and the amount of say I know tokens associated with ownership actually correspond to your input into the company and it's really difficult it's actually quite tricky in terms of legality like how people are held accountable or liable if you know there's individuals all around the world interact on this peer-to-peer basis maybe not even knowing the identity of these people how to hold a company accountable if they say do a rug pool for example yeah and we'll come to rug pools in a little bit but Dows are yeah we've also mentioned them before we mentioned Constitution da in last week's episode they're really like the the defi equivalent of a trafi company right it's just you can pull resources together to set up this kind of pseudo company structure where your tokens the number of tokens percentage of tokens you have is like your equal to your voting rights

essentially it's quite simple um but you know people seem to like them I'm I'm not that interested in them personally I think I'm quite happy with how companies tend to work in the real world but um yeah I do see the value in the crowdfunding aspect as we said Constitution da I I I think find it hard to see how something like that would happen without this smart contract based crowdfunding yeah so I think we've like talked about a lot of the key Concepts and related to chadf as we in our previous episode maybe we should just go through some of the history of how defi has evolved in some of the leading examples of successful maybe even unsuccessful defi projects I think um this is an interesting one most people seem see say that defi really started in 2015 but surely it started with Bitcoin was that not the first like popularized example of you know a decentralized financial product in some form yeah this is a really contentious point of debate actually I

think it depends if you cast The Net wide enough for defi to mean any kind of financial thing like digital cash like peer-to-peer cash that Bitcoin was if you mean anything that involves a distributed system personally I think people see defi as something that involves a smart contract or an interactive contract which is why it's Associated so much with the birth of ethereum right because that really became a smart Contracting platform and it's not to say Bitcoin can't do smart Contracting or interactive contracts really but it it wasn't really used in that way for a long time and lot the capabilities were kind of neutered slightly so I think yeah it makes sense why I people think of it as as as being born with ethereum I think yeah and I think when we talked about the origins of blockchain we mentioned ethereum as kind of popularizing the term World computer right and I think like you say there's connotations there of being able to easily input or upload the the smart contract or automated

execution programs onto a blockchain so it was really ethereum that enabled a lot of the di5 protocols that we talk about today and like when we start to talk about all the projects that are built in it almost all of them are built in ethereum right now mostly because of footfall first mover all this kind of stuff but yeah it was really ethereum that started let's say started off the the defi movement I think one way you can say is like in ethereum smart contracts are treated very much like first class citizens they're kind of given equal status to user accounts let's say they're called externally owned accounts which I hate the term but in um in something likeit coin uh you have to do a bit more work to make smart contracts kind of easy to use basically um but yeah so I think yeah for me it starts with ethereum in in my view the modern understanding what we're talking about automated market makers they're all on ethereum and similar platforms right and

then you know one of the as we've said on the the Pod before the Dow hack was one of the big first events that happened in D5 we're classing Dows as part of defi then the 2016 hack was like the first evidence of okay this this stuff can go wrong really badly right yeah I mean the point there was that people there was vulnerabilities in the smart contract itself right and then someone worked these out some hacker and was able to actually siphon funds off and they siphon like was it tens of millions or hundreds of millions and as we said previously this led to the split of ethereum versus ethereum classic yeah it's a kind of I guess ethereum is the best example the first example of something that enbl D5 protocols to really flourish but there's also some uh some actual examples of how it can go wrong that are quite important and we'll reference these throughout so if ethereum is the first big thing you want to talk about on the history

of Define the next one which is another heart topic is unis swap which started in 2018 we've already talked about it a little bit but this is effectively a marketplace where you could swap cryptocurrencies for one another in an entirely automated way without requiring any middlemen and one of the things that we mentioned which quite interesting about this obviously lots of efficiency gains enabled cheaper transactions all this kind of stuff but are really interesting things about uniso is that there was no kyc right you didn't have to upload identity have to prove who you were and this made accountability um really tricky and actually quite a Hot Topic yeah and and um you know Unis swap is interesting right because it's now kind of it's one of the first big users of this amm model for decentralized exchanges and it's become huge it's like something like two billion plus in uh in the value of the they said the term is tvl total value locked inside the protocol right it's huge and it's really it's

it's great because the bigger the liquidity pull you have backing a given decentralized exchange amm is that you have much less kind of price slippage and the price is much more stable you know if you if a single person wants to transact then it impacts The Price Less it changes that curve on the constant product a little bit less yeah it's seemed quite ambitious and quite beneficial to society I think the goals really were to as we say with a lot of these things was to remove unnecessary intermediaries but really to also make exchanges more accessible and to remove barriers to people actually using these Services democratizing access and sometimes that comes to the detriment of you know identification and knowing who you're actually interacting with but it was it was an extremely interesting and still is an extremely interesting project yeah and that was around for kind of a few years before we got to what's now called defi summer right when when these things just exploded it was in summer of 2020 right

so when everyone was at home nothing better to do than sit in their bedrooms looking into defi finally that's when the whole market like completely exploded right it went from something like 1 billion to nine billion total value locked in these protocols in just a few months right so it had this wave where everyone was because I'd heard the term since 2018 and then in 2020 it became this okay this is a real thing and it became a kind of household name that didn't last too long as we know but um you know there's been several kind of high profile called crashes you said rug PS as well which we'll get on to but um it's just worth noting that was the height of of Def now it's kind of in a consolidation phase where there's there's still lots of building but I think people are struggling to make as much money as they once were on it and I do wonder how much Co actually had to do with the kind of the takeoff

of this defi summer I like I imagine that maybe like traditional or Trad bu systems because of the need for face-to-face interaction and you know kyc all this kind of stuff maybe there was an all of a sudden an understanding that defi is the way to go or maybe it was as you said people just had a lot of time in their hands and they like what can I spend that time doing and I think one of the interesting things about this D5 Su that you're talking about was because there was this boom of projects out of nowhere jumping onto networks it actually had a lot of downsides for ethereum right there was a lot of congestion on the network we say everything is built on ethereum a lot of congestion and this is really one of the first times that people well may not people but the general public site to see that ethereum maybe not be as scalable as it claimed to be like it was actually really expensive to start to use

ethereum day to-day and use it for you know real world applications and all this kind of stuff and this is what I think this one of the first sus around 2020 was I started to understand about all these kind of other solutions for scaling off chain side chains all these kind of layer two solutions because of the problems that this actually put on ethereum yeah you're right I mean history repeats ethereum had its its crypto kitties moment a number of years before where you know this one project got popular and it completely congested the networks same thing in defi summer became very very expensive to transact and a lot of that efficiency gain we talk about with defi the theoretical efficiency was kind of wiped away I think that's probably a nice way to segue on to kind of well what's like let's put the the pros and cons out there what are the benefits and drawbacks of of defi in general right because we we now we Define the main components we know some

of the actual protocols themselves in more detail what are the what are the big let's start with Benefits right let's be positive what do you see as the big benefits Beyond just the fact that it's decentralized because some people some people say that's a benefit but that doesn't convince me but yeah what is it for you I think the big one is like the ethical I think it's an ethical one for me it's like the inclusivity the accessibility like the fact that a lot of these protocols maybe they I believe in it or don't believe in it but they kind of go with the philosophy that open protocols decentralized Financial protocols alha better Financial inclusion for individuals and and businesses as well like I know to the detriment of you're saying you don't need to kyc people you don't need to you can't have like full identity attestation for a lot of these things but there are definitely use cases where I don't necessarily need to know who I'm interacting with and I think that's

a a kind of I think the ethical for my mind especially for maybe low um low order magnitude transaction smaller transactions higher higher frequency transactions I get the financial inclusion aspect I don't think you need to kyc everyone for every single transaction and I think yeah the accessibility is a big one for me for a lot of these yeah I think that's that's fair enough it's a much more open transparent Financial system right whether the whether the transparency shows you that it doesn't work is another question but I agree like the fact that you can have easier access to some forms of capital again I don't know how much it helps um kind of from a financial inclusion perspective with that over calization of loans like if I want to get a loan then I need to have more money already to to put down as collateral but but I think I agree like having less friction right Less kyc in some cases and letting people take their own risk is is fair I think

there's a market for it I just think maybe maybe not enough education around people knowing what risk they're taking when they do it um and and this idea of sensorship resistance I kind of railed on it a little bit earlier as you know in a jokey way but there is something there I think the fact that it's a platform and that something like a theum is broadly agnostic to who is using it and what you're doing on it right the ethereum network just processes things I think that's good it can help people in in very extreme circumstances to move money to gain access to to certain assets to to you know get loans and things like that I think it def definitely has benefits there that are compelling to me I think like just to jump on a point that you just said it kind of although I'm saying it's more accessible and it's hard to say restrict people from using things like this you assume technical literacy right to actually be able to understand

these smart contracts that you're actually say giving or receiving loans from so maybe there is it works I think it it's not as clear-cut as just it makes it more accessible for people I think there's assumptions you have to make for the people that are using themselves um another big one that I know you're going to mention as well is liquidity right I think it's a principle of blockchain that we've mentioned previously in assets based on blockchain nfts tokens all this kind of stuff it's the idea of making exchange and representing value in a more liquid and easy easily accessible tradeable way I think that's a fundamental benefit of a lot of web3 Technologies yeah exactly and that's you know we said one of the really cool things about automated market makers is that you can quite easily see how much liquidity these assets have based on the pool sizes and therefore you know roughly the price stability so I think that's a really positive thing and even broader than defi said with tokenization making

very IL liquid classically illiquid assets qu more liquid and making it more accessible for people to to trade and even doing derivatives right dydx is kind of does derivatives as a protocol in defi I think yeah it's interesting that you have these very different ways to access these Financial products where normally you you would have to go through a lot of Hoops the the barrier to entry is very very high to doing that and then yeah liquidity provision being more transparent is good I don't want to go into the the disadvantages yet but it it's they all kind of have a two sides of the coin right because with liquidity then you then talk about well lots of the stable coins and mediating a lot of this and we don't know how liquid the backing is of those but we'll come back to that one um composability I also mentioned earlier right I think this is likewise it's good and bad because it means you have all these different protocols these smart contracts that can

talk to each other do different things you can build very interesting applications with them that give you functionality beyond what you can get potentially with the Trad fight world but this introduces a lot of complexity and the more the more complexity the more risk the more attack vectors the more ways it can go wrong are introduced so you know they they may be getting high leverage opportunities from them but again treated with caution is is always what I'd say is you never know the kind of systemic risk of some of the these protocols yeah and it do relate like composability to interoperability and there something we talk a lot about in the context of web 3 you say web one was super open anyone could build everything you had this like um extreme uh you know many many projects being built simultaneously on web one protal like smaller projects and then web 2 became much more monopolized closed Gardens all this kind of stuff and I think we see that obviously trafi is a perfect

example of world Gardens there's like four you know terminal chip and pin payment providers in really Europe and America and I think that's to the detriment of competition like monopolies tend to not be good I would say in most cases and the fact that def is interoperable composable it allows smaller companies to build up and compete and also like you say the interaction between multiple companies obviously just adds benefit to the users users being able to jump between different protocols is a good thing for the users I'd say yeah % agree and I like like ending it to inoperability right that's exactly what it is and that's why it's good that we have all these standards because they are almost inoperable from their Inception because they're built using similar standards so yeah I think and it's good that you can see the protocols and how they work you can analyze them it means they're more robust in the long term um one of the other ones that people talk about as an advantage and I

agree with but with a big caveat again is that you don't really have a central point of failure in these systems necessarily because you don't have a single party that can you know say suspend your trading like you have with a typical exchange but I I do still think you can consider the smart contracts themselves a bit like a central point of failure and you normally have someone who builds a smart contct even when it's open source you have someone who can manage it you potentially sometimes have back doors right and there's been examples of people saying oh there's this treasury wallet associated with all the fees collected in this protocol and it's locked forever and then it turns out it's not locked that kind of thing so again it's a sliding scale between how much of a centralization risk you have with these things but the fact that it gives you better up time for these things the fact that you don't have quite the same level of single party failure risk as as

traditional Finance I think is quite a good thing yeah and I think the big one that you mentioned earlier was around reduced counterparty risk like you said defi aiming to minimize you know the trust needed in in counter parties generally with you know peer-to-peer interactions with smart contract enforcing the rules all this kind of stuff that provides a degree of trust but like you say the way you do that because I don't necessarily have recourse to actually punish you if you don't meet the criteria of our smart contract is you have to put up much more assets than is actually involved in in the deal between you and I I think that's quite annoy I understand why you would do that but it is a big inhibitor for me to actually yeah having this as a benefit but we're not getting into the downsides right yet now are we well maybe maybe we should I feel like I'm ready to nowly said all the positives I can I mean and to be fair I think

I've I've said quite a lot of them already right because a lot of these are good and bad and I've kind of given the the that sides away I think one of the biggest risk is that obviously it is all experimental for at the moment and because we're putting so much Reliance in the SM contracts when there is a problem with them then as I keep saying it goes really really badly wrong and it's not trivial to just update that we've seen you know thousands of hacks and very high-profile hacks in the past you mentioned rug PS right this is when founders of a D5 project abandon a project and take all the money you know there's been examples of this like a a decentralized exchange called THX think it's about two billion in funds taken from that so it's not small change that's been lost to these produ calls and you know as as with anything if you wherever you introduce the the individuals and the companies into this again you have risk of

Bad actors in the space which is is something we have to be aware of yeah I think a big one as well that we kind of mentioned is a potential benefit of D5 versus Trad five systems around the financial crisis where we said you know all this complexity this lack of transparency all all of that could be potentially solved with Defi and smart contracts and all this kind of stuff but the fact is like just because I'm putting smart contract which is just you know ex automated executable code on a blockchain doesn't mean anyone's going to be able to read that that requires like a high understanding and Technical understanding of the details of that it doesn't make it more readable just because it's transparent and I think like you say with a lot of these smart contracts it is very complex and difficult to read and that that's one of the reasons why we have so many bugs so many hacks is because even the people that claim to understand them don't always understand

them yeah that's the complexity piece right the more bells and whistles you add to this the more difficult it get and one of the other big issues you've already hinted that scalability the fact that when these things were popular in in defi summer then that the chains underneath them couldn't really handle the demand and because of that people are moving to Layer Two scaling Solutions and lots of other things like rollups which I'm sure we'll cover at some point but again the more layers you add to the system the more integration and connection points the more risks you have the the more ways it can go wrong the less it's understood how they interact and you have a slightly different security model so now people are using defi but from Layer Two right which is kind of a bit mindboggling and uh and I'm sure people don't know exactly the risks of associated when they start doing things like that right yeah and a big thing that I think you told me was around the

centralization of these decentralized platforms is that the top four decentralized exchange exchanges actually make up 54% of the entire market share and that's a that's a big problem right we're saying that you know when we talk about distributed networks and decentralized networks the point is to have Network resilience but if everyone is coming through you know one node provider or one exchange then it kind of removes the point of having a distributed Network because if that one provider goes down then everyone's access to this distributed network is gone so it's no longer resilient Network dages which is one of the points of blockchain right and actually one thing we should have mentioned on that just to extend what you said I completely agree is that in something like a liquidity pool how do you know that it's not one person with many many different addresses and many many different source of funds who's that you know who could just try and pull it all out obviously there there's some protections against that based on how

it's set up but we still don't know necessarily because of this lack of identity exactly how it's set up so yeah and I think one more thing I think this is like maybe more philosophical thing is around the idea of the smart contracts in ethereum I would say generally people that work on ethereum think that the entire world every parameter every outcome can be coded into a smart contract and I do have a problem with that I think that it's possible and for a lot of things it's it should be done because it's efficient but there's always going to be you know it's the unknown unknowns right when you and I enter into an agreement we can't possibly quantify and qualify every single event that could happen related to that agreement right and I think this is kind of something that people in the space have to get their head around you can't code everything up not the whole world and every outcome isn't binary and I think there has to be some means for

recourse say if you and I enter into an agreement where I give you a loan and based on some parameters you'll return me 10% on that if it don't doesn't happen you give me collateral even if the the worst case scenario you can't pay me back there should be some mechanism for recourse that if the interaction goes as we say it is with the two outcomes that's fine but if not there's a third party involved that doesn't have to be involved continuously for interactions just in case something goes wrong we can then go to them and have the ability to rec and get technical this is like a two of three multi or something like this right yeah I think that's a really important Point actually um and maybe kind of because I wanted to close things off by just saying is there anything like future looking that you're really interested in in the defi space and one of the things I'm in kind of intrigued by is this idea of reputation systems interacting with

uh defi protocols where you can build reputation but pseudonymously right so you don't have to disclose your actual identity in kyc information but you can still build a reputation as a trusted lender or a trusted borrower or something like that I think that will be really really interesting and I you know not to be too met there's kind of potentially ways we can do that with maybe even proof of work itself but I'll leave that thought for another day probably I mean what about you is there anything that like really gets you excited for the future of defi I think it's just all the buzzword right I think like the was talking about the the difficulty with having full kyc process and no kyc process I think when we start to apply some of the principles and Technologies of digital identity where we kind of meet in the middle like I do potentially do upload my digital identity but don't reveal all my information I think there's a powerful overlap there obviously the biggest buzz

word AI like I think of smart contracts and how we can take them from just you know simple executables to something much more complex and I think that maybe one amalgamation of that would be smart contracts using AI or AI based smart contracts to actually kind of start to do things that a bit more more intelligent than just give him the money back or else you have to pay all this money um another one would be big players moving into the space like when we started to see you know institutional adoption regulation just to make it more comfortable for people to operate in this and I think a weird one that I've seen a lot of movement on generally just to spitball everything is offchain computation like you say there's all these scalable scalability issues with ethereum and like people are starting to realize that they're not usable for the type of volume of transactions is actually needed to compete with trafi well something happening now is rather than having these side chains and layer

twos and layer threes and all this kind of stuff is to actually do the computation off chain and have some kind of verifiable provable way to link that computation back on or the results of that computation back on chain and this is a big body of work sign happen now called verifiable computation um and that'll be quite interesting to see if that can solve some of the the the scalability issues that we've talked about interesting I think uh we're getting into some very very difficult Concepts to talk about now so maybe let's come back to that one in a year and see see how far along it is yeah it was great I mean I think we've solved dite right it actually um wasn't that bad I think it was really useful to set the toad with tradire last week yeah it's a really interesting area we're going to have a lot of follow-up conversations follow-up episodes and definitely followup guests who have much more expertise in this space than jackar but on that thank

you for listening wherever you may be and join us next time as we untangle a little more of web thanks for tuning in to another episode of untangling web 3 produced by Emma caleri don't forget to send us your thoughts questions and comments on social media and be sure to follow us on your favorite podcast provider to catch the next episode see you next time to untangle a little bit more of web the views we express here are our own and do not reflect the views of our

Topics: Blockchain & Crypto

Related episodes

All episodes