Episode 40

Layer 2

Watch on YouTube

About this episode

In this episode, Jack and Alec dissect the multi-layered architecture of blockchain technology, with a focus on the details of Layer 2 technologies.

We begin the conversation with Layer 0, emphasizing its role as the network infrastructure essential for blockchain interoperability. Next we cover Layer 1, the core blockchain protocol responsible for recording transactions and maintaining consensus.

We then dive into exploring Layer 2 solutions, highlighting their significance in enhancing scalability and transaction speed atop Layer 1 blockchains. Through examples like Bitcoin and Ethereum, we shed light on the challenges and innovations within each layer.

The episode concludes by stressing the importance of these layers in advancing blockchain scalability, security, and decentralization, hinting at the future evolution of blockchain technology to meet growing digital demands.

Transcript

Auto-generated from the episode audio.

big blockchains at the moment are really Limited in their scalability because they' pushed this security decentralization kind of philosophy so the question is what can we do are we doomed is there no such thing as a layer one anymore do we just go back to web two essentially the idea is then you have layer twos which are designed to help scale layer one blockchains what are Layer Two scaling Solutions well they are just things built on top or third- party systems on top of the base blockchain designed to enhance efficiency scalability of the underlying blockchain and The crucial thing is they're designed generally to take computation or data or both off chain so welcome to another episode of the untangling web 3 podcast today we're going to be talking about a very interesting topic we're going to be talking about the layers in blockchain technology so so these are kind of banded around a lot we have the terms you know layer zero layer one and Layer Two and they refer to different layers of

the blockchain infrastructure and they each serve a distinct purpose in the blockchain ecosystem and understanding these layers is actually extremely crucial for grasping how complex blockchain networks can actually operate and how they can be scaled and optimized and yeah that's the topic that Jack and I are going to be exploring in today's episode but before we get there Jack how are you doing today my friend yeah all good thanks Alec uh feeling PR good excited to cover this topic actually this is a very important one and it's a bit of terminology that you really have to get right I think to talk about all sorts of other topics right and we're going to be talking about zero knowledge systems in future episodes so this is definitely an important one so maybe just to start things off we've mentioned already layer zero layer one layer two I've also heard the term layer three coming in recently but we're not going to cover that in today's episode maybe in a future one but just to set the

scene so we we've done episodes already on blockchain we covered blockchain in detail we all understand what that is for the purposes of today's episode consider blockchain as layer one right that's what we're thinking of as layer one so layer one is then sandwich between something below it layer zero and then something above it Layer Two and essentially the idea is layer zeros are basically infrastructure to enable and build layer ones blockchains on top of and then you have layer twos which designed to help scale layer ones layer one blockchain okay so that's at a high level kind of what we were kind of hoping to to go through today right boom done episode over we've solved it no just kidding um that's the high level intro and now should we just jump into it I guess it makes sense to start at the beginning which really is layer n but it's a bit more fluid than that right I guess um so layer n is as Jack said the network infrastructure layer and this

is really foundational and it's quite a broad concept I guess like it's kind of this I guess includes all of the hardware the networking technologies that underpin you know not just blockchain technology but underpin messaging internet all these kind of things when we talk about you know TCP IP the actual communication protocols this is really what we're talking about and they underpin absolutely almost everything we do in blockchain technology so that is layer zero yeah and I think basically now we're talking about what's known as an abstraction layer model and you have an abstraction layer model for the internet itself right forget web 3 for just a moment so we have in web 2 we have what's known as a tcpip model transmission control protocol and Internet Protocol model and that splits up how we understand the internet into a series of layers so everything from the network layer the base layer as you said how messages get communicated up to the application layer which is kind of what you see when you're online and

when you see on a website or an application or something and when we're talking about layer zero layer one layer two in the blockchain web Tre world this is kind of a separate abstraction uh model that we're talking about here in practice most blockchains and L Zer L1 L2 all actually operate on top of the tcpip abstructure model so just before get out the gate it's important to understand that we're talking about something separate but when we're referring to layer zero in the web 3 context it's similar or analogous to the network layer in tcpip right that base layer that you can build all the blockchains on okay that makes sense and I guess what the so the reasoning here is that when we think of like say blockchain technology that's kind of underpins most of what we do in web 3 we talk about like distributed networks right and that kind of assumes a degree of messaging between nodes that spread across a different regions different areas different actors and it's not we don't

actually have to say that it's completely necessary to use the internet to do that to achieve that right we use the internet to communicate say what the state of play is transactions between two parties with the network for example because that's the most efficient way to do it right now but we could in theory use mobile connections we could use I know RFID tags Bluetooth all this kind of stuff we just kind of refer to the interet TCP IP because that's the most efficient way as we all know to kind of transact and transmission around the world yeah and it's obviously battle tested we use it in everything else in web too so it makes sense that most of it is built on top of on top of tcpip um but kind of crucially with layer zero in a blockchain context to think about what you actually need right why do we need networking well as we say Bitcoin as an example you have the software to run so even if you're going to be

validating and building transactions and blocks and things like that you have the software but then you also have this network of other nodes you need to communicate with right you need to send transactions and blocks to other people even if you're not running the software yourself you might need to send it in from your wallet for example so there isn't a there is a notion of networking or network connectivity that you need from all the different actors and layer zero is referring to everything at that kind of layer now there's also just to muddy the waters a little bit more there's also what people call layer zero blockchains okay so you don't need a layer zero blockchain for a layer one blockchain to work and it just gets complex very quickly I think we'll talk about L zero blockchains in a separate episode because there are the whole thing unto themselves but the thing they're focused on is not necessarily just letting blockchains exist lzo blockchains are these kind of special general purpose chains or

networks designed to let other L1 blockchains communicate so maybe your ethereum and your salana to communicate with one another and there's a few examples of that like polka do Cosmos you'll have seen which we'll definitely go into in a future episode but it's just crucial to know that they're all about this kind of interoperability idea in web three okay that makes sense but for now we're going to try and keep it simple and say that this is just you know the underlying infrastructure that enables us to build blockchain technology on top of right now right exactly yeah okay so that's layer zeros the the hardware the infrastructure the protocols that enable basically the network to propagate transactions to really support the things that are going on top which is the layer one now this is the bread and butter of the podcast hopefully you've listened to our second episode I think which is on blockchain technology where we really go into some of the details of what a blockchain is but just to recap some

of that um the layer one like we said is the blockchain architecture this includes you know the blockchain protocol itself if we're talking about Bitcoin it can be you know the consensus mechanisms how blocks and transactions are propagated we can have ethereum as an alternative layer one for example or other Standalone blockchain Technologies and quite crucially I think typically when we talk about blockchains it's a decentralized ledger and they just record transactions across many computers and we kind of we've talked about it a few times now we refer to this as like the piping of web 3 but I guess that gets a bit confusing because maybe the layer zero is really the piping and this is like what the infrastructure is built on top of the piping maybe the toilets whatever that is yeah that's what I mean it's very abstract when you go down to the L zero stuff that we were just talking about but I think it's much easier to visualize and understand what we mean with L1 as we said

the network of Bitcoin nodes for example or ethereum validators who are maintaining the blockchain directly who are adding transactions propagating transactions to to other people and things like that so this is yeah as you said this is the bread and butter this is what we think of in our Mind's Eye when we talk about blockchain a lot of web 3 this is what underpins everything on top of it right that's kind of idea with the layering is that each lower layer under underpins the next layer and for most intens purposes all you'd ever need to worry about is okay what blockchain am I using and then what applications on top of that uh using that layer one blockchain but yeah so as you said blockchain we know the characteristics broadly it's a distributed Ledger for recording transactions immutably and and doing payments and things like that also doing smart contracts in some cases with various blockchain platforms it's the facilitator for all of the fun stuff we can do web three yeah and you know

when we're kind of talking about the layer zero stuff there very like few important kind of protocols that we're talking about very standardized very used across the board that's why the internet is so successful when we talk about blockchains the layer one stuff well there's thousands of blockchains right there's maybe like 30 or 40 that are incredibly popular each of them being slightly different which you know the lack of standardization there actually probably doesn't help the ecosystem generally and we've kind of said in previous episodes we expect there'll be maybe a few that kind of end up being the victors and everyone uses them as their layer ones to build everything on top of but yeah Jack highlighted the key characteristics there which are the consensus mechanism maybe the native token they use the security model all this kind of stuff but importantly to lead us on to you know layer twos and the need for having layer twos there's kind of three characteristics that we really want to focus on for layer ones we'll

go through them right now so the first one is scalability so this is effectively the blockchain's capacity to handle a large number of transactions I think Jack and I have spoken about this in detail is that you know a lot of kind of the major blockchains right now Bitcoin ethereum they don't have much scalability that's the kind of the conception is that most people don't think they have the kind of the level of scalability to support you know the internet of value if a blockchain was to really be the internet of value right now which is the piping of web 3 to handle all the data that is transmitted theoretically that would need to handle around five exabytes daily which is 1 billion gigabytes daily and obviously that is not feasible on say Bitcoin for example you know if Bitcoin alone was to just be the digital Cash System of the world right now it would need to do billions of transactions every day so scalability is the first kind of characteristic we want to

talk about when we consider these layer ones and as you can probably tell already it's not actually suitable or fit for purpose in the current implementation yeah it's one of the hottest topics isn't it in web 3 scalability and you know five exabytes per day half of that's probably just your search history Alec and God knows GPT don't give it all away don't give it all away but no so yeah scalability is hugely important the second piece of the puzzle or the big characteristic that people talk about with the l1s is obviously security and it's one of the big value propositions of something like Bitcoin or ethereum is that they're deemed a very secure way of transacting right and and holding funds building applications because they're public networks they're in the public they can be attacked and are probably being attacked constantly typically the bigger ones like Bitcoin ethereum don't have many vulnerabilities or they haven't shown themselves to be vulnerable right so the mechanism by which they are secured is different in different cases

so obviously in Bitcoin we have the proof of work model alongside the kind of the fact that everything is public and you can see what's going on transparently so that you know only very dedicated individuals these miners contribute really to the security of the system but you have them investing a lot of money a lot of power resources electricity for example in securing the network so you have a lot of backing basically a lot of people say it's backed by energy which I think is a kind of fun oversimplification and then in ethereum you have you know a similar thing now with proof of stake where it's secured by uh basically people who've got a lot of tokens who've invested a lot of their capital in owning the tokens and becoming validators in the network so again we we understand quite well I think now how blockchains are secured but that is still one of the main things that people are interested in because you know that's fundamentally why they meant to be good digital

cach systems or good defi platforms because we know they're secure in practice and it'd be interesting to see what actually happens because we talked in depth around like proof of work being very well battle tested right but proof of work is no longer the most popular kind of consensus algorithm right a lot of chains are moving to proof of stake as we've talked about proof of authority there's lots of Alternatives as well which are maybe less battle tested so it' be really interesting to see how this kind of security characteristic plays out in all the modern chains that are kind of being designed to I don't know maybe compensate for some of the weaknesses that people kind of assume for proof of work which is typically any energy and scalability right but the the last one the last characteristic of the three that I want to come to is this term decentralization this taboo term that me and Jack sometimes use or maybe we should say distribution is probably the better term but they're kind

of one and the same how we're using it here and this principle is around the kind of the control and operation of the blockchain being amongst distributed actors right and we've kind of talked about this is one of the The crucial points of a blockchain technology is that we're actually Distributing the data and the people that can validate the data and contribute to the data in in a blockchain to multiple parties and this removes the idea of a single point of failure really should help with say if there's a bad actor there's ways to catch them out and ensure that good actors can actually contribute positively to to the overall system and we've kind of talked I think we've talked in detail about you know what is distributed is a thousand nodes enough or is what is three nodes enough and this is a really interesting topic but it's the third characteristic that that's quite important for the conversation that we're having in this episode today you can go back and watch our decentralization episode

we go into this topic in detail because it is an interesting one again there's lots of different opinions on how decentralized different networks are you know Bitcoin is effectively controlled more than 90% by like five or six different mining pools mining entities so it's it's an interesting characteristic but as you said it's about the single point of failure ultimately and that's one of the the kind of beautiful things about the design of blockchains is they're meant to be resilient to ever having a central point of failure they shouldn't arise you shouldn't get one in a blockchain so yeah that's three main characteristics right scalability security decentralization Now where leer two comes in is what's the problem with layer one blockchains well it's to do with this Triad or they call it a trilemma right have you get all three of these properties at once it's something in computer science about threes they love to put three things together and so you can't have them all at the same time right but the reason we have

layer twos now is because people have decided I think metallic butterin was the one who kind of popularize this idea that you can't solve the scalability trilemma using just a layer one blockchain you can't have scalability decentralization and security at the same time and I think that's the interesting thing right is this has kind of come about because the scalability wasn't really an issue because no one was really using blockchains at scale until maybe the last five years or something like this so they kind of cryto took off until Jack was the primary user of crypto kitties and he took off and blew up the ethereum but yeah like so these blockchains were EX in kind of in isolation in like Labs basically for academic as academic brain Childs right but now they've kind of Hit the mainstream and people are actually trying to gain utility and use them for the scalability problems we were talking about earlier billions of transactions a day to hit some of the digital cash thresholds that we need then

yeah this trilemma problem really came to light and like you say vitalic popularized that and it's really interesting they do play off each other right so let's like talk about how how they actually how they we have this problem of Threes right so if we want to scale like we want to actually get say ethereum or or Bitcoin to process millions of transactions a day theoretically then what happens so the first one we're going to talk about is the scaling at the cost of decentralization so when a network increases its scalability it tries to actually process more transactions per second it often leads to a centralization so you know larger block sizes might consolidate mining power to entities with more resources reducing the number of nodes that're actually able to participate and it kind of makes sense right like if I have to send every transaction I process to 50 other actors well that's as soon as I'm processing millions of transactions that's going to be Sav to send like 50 times that million transactions

out there into the environment but if I have to send it to one person or a couple people or even if I have to hold it all myself well it makes the whole process far more efficient and this is one of the things that we talked about earlier about the different Bitcoin Forks right is that actually this is something where we have the big blockers and then the small blockers that are actually trying to have a bit of philosophical debate around this topic and whether people do need to actually process the entire blockchain history or not yeah it makes sense when you think about you know why does it cause centralization why is it only big entities can then run High scaling blockchains well think about the web 2 world we have with Twitter Facebook the things that have the highest throughput on the internet are run by these huge companies by massive massive data centers you know all across California and all parts of the world they're humongous data centers that require a lot

of resources a lot of cost to maintain and actually uh keep up so yeah it makes sense that if you want to just scale a blockchain in terms of the space the block size then it's going to reduce the people who could do that second way you can scale is to change the time parameter right so if you want to maybe decrease the time between blocks so you get more transactions through per minute or per hour or something like that you know you have 10 minutes on bitcoin ethereum is actually much shorter you can play with that idea but that method of scaling also then comes at the cost of security for example because if you have faster block times then you might be more acceptable to different kinds of security risks okay because there's less time to validate transactions in between blocks and to think of kind of an analogy for this I like is if you've ever used a crypto exchange then typically they'll say you need six confirmations or you'll need to

wait till there's six blocks built on top of your transaction before they'll actually release the funds and let you trade them now you could take that down to one or zero but you're increasing the risk of there being a conflicting transaction or a problem with your transaction in the network so it effectively that would be scaling the crypto exchange but at a risk of lower security for you as a user basically way I was thinking if this is if you want to try and get people into a club right and you have a bouncer at the door searching people down like if they spend one second searching people down they're obviously going to let more people in than if they take two hours searching people down right and that's an analogy for this like the higher the security concerns the less easy it is to have high scaleability um and then yeah obviously the counter to all of this is that decentralization and security if you want to have a high level of decentralization a

high level security obviously comes at the cost of scalability and you know for example BTC Bitcoin they prioritize security and decentralization and they have really low slow transaction speeds and much higher costs for example at BTC I think we said on average is around seven transactions per second ethereum is around 30 transactions per second so it's uh it seems like the big blockchains at the moment are really Limited in their scalability because they've pushed this security decentralization kind of philosophy so the question is what can we do are we doomed is there no such thing as a layer one anymore do we just go back to web 2 know that would probably be the end of the show and not a good thing for us to talk about yeah I mean then we'd be back in 2017 right where everyone was panicking that you know what can we what can we do about this problem so what can we do are we doing to stay in this web two world and just give up on

all things blockchain well one obvious thing we can do is actually try to revise and upgrade some of the underlying Tech technology right and we've seen this play out a few times we talked previously that BTC has several major Forks that are kind of around upgrading the scalability without trying to detriment the decentralization and security too much so they have like Bitcoin cash bsv and and these are different protocols ethereum has been upgrading its protocol to proof of stake for a long time now but this in itself creates problems right if you have this kind of community that's all banding together towards ethereum or Bitcoin you don't want to then divide the community into different forms like vks can create a lot of problems it's actually quite difficult to do you have a lot of people relying on you and you don't want to all of a sudden change the underlying protocol because lots of bad things can happen yeah and as you say right when you when you split the community that also is

going back to the point about sacrificing security you then split how much of the hash power or the staking money that you have in the network you split that across different factions so it's not even perfect from that kind of scalability perspective but yeah so what else can we do then the other option if we don't want to just Tinker at the Basel ler is to build on top of it right and that's exactly where layer twos come in and also building on the side things like side chains but I think we'll focus on side chains again in a future episode and we'll stick with just Layer Two for now so what are Layer Two scaling Solutions well in short they are as we say just things built on top or third-party systems on top of the base blockchain that are designed to enhance efficiency scalability of the underlying blockchain and there's lots of different approaches to doing this we'll kind of go through a couple of those but the crucial thing is they're designed

generally to take either data or computation or both off the layer one chain and something that's on the layer one chain we'd say is onchain and then it's designed to take computation or data or both offchain that's the core thinking behind l2s yeah I think one of the things that I seen is that the term bundling like say you have I don't know the layer one's trying to process like 100 transactions per second well you kind of extract some of that and say you process 90 of those transactions in a different place someone validates them on your behalf and then you'll just bundle them together and submit some reference to the transactions that you've done off chain and like I say this has become extremely popular we'll talk about some of the examples but just to name drop a few we have the lightning Network which is obviously a very big one and we'll talk a little bit later about um what's going on in El Salvador because they actually base all their infrastructure off

the lightning Network which is a bit mad um but do you want to talk about some of the examples and some of the ways that we can actually do this in a bit more detail yeah ex definitely and you know the nice analogy for the whole picture is as you said like bundling and or batching you have a similar thing in the old kind of traditional banking world so you have what they call realtime grow settlement systems rtgs which is kind of for moving money in real time between Banks so when you make a payment from One bank to another then they're using this realtime system or you can have what's called net settlement so instead of doing every transaction they'll just let all the bank accounts independently debit and credit all their and then whatever the net is whatever the final state is at the end of the day they'll settle that and layer 2 is much more similar to that net settlement idea so you're just kind of recording the end state so

on that with that example in mind one of the first and earliest ways of doing Layer Two was actually what we call State channels and this is basically what lightning Network in Bitcoin or something like the Ryden Network in ethereum are actually based on so State channels are a way of taking your money your your account for one of better word of your wallet and treating the state or the amount of money in it as this offchain thing that you can go and pay so me and Alec could set up a state Channel together and it's quite peer-to-peer actually so you know him and I would say okay we both got five pounds each and we're g to start playing Tiddly Winks for 10p 10 P ago so you know I might win a game win 10p he might win the next game get 10p back so the money constantly going back and forth between us and at the end say I've won 100 games and he's only won 10 because he's not very tily

Winks then I would end up with that larger balance and we'd settle so we do this net settlement piece at the end right so again this is what lightning network is based on and it's very similar in analogy to opening a bar tab right and then just paying at the end what the final state is so how does that work in practice so typically again it's peer-to-peer normally so you'd have two people like me and Alec who want to start one of these channels so we have what's called an opening of the channel we set it up we both lock some money in there so basically have um our initial balance in this channel set up then we do our number of offchain transactions back and forth you know while we're playing tiddlywinks and then finally we'll close that Channel at the end and basically all that goes on chain is the start the opening of the channel and the ending the final balance and how we close the channel and release our funds again

so all the time between our funds are effectively locked in this Channel and we're just passing it back and forth based on whatever we're doing and there's only two events to go on chain so that's fundamentally how the state Channel model works yeah I've seen like comparisons of this to if someone's say doing I don't know job for you like they regularly submit some kind of jobs and they want to instead of I say do a Year's worth of work I can say upfront put 100 Grand into one of these channels and every time you complete some bit of work for me I'll give you one grand of that 100 Grand that's on chain but rather than me sending a grand every single month or every single week for the work you do and incurring lots of transaction fees as a result of that if I just lock a 100 Grand into that you know that there's some kind of security and I have some kind of proof of fund so you feel that okay

actually I'm going to give you the money and then offchain I'll basically give you some transaction that you're allowed to submit at any time which enables you to actually gain say the first Grand and then after two weeks with with the second Grand the third Grand and at any point in that state Channel you can actually submit the transaction say okay well actually I've done enough work now I'm going to take 50 Grand of that 100 Grand and job's done and we've settled and that's the channel ended yeah it's quite a powerful tool right especially when we kind of think about you know microtransactions or multiparty stuff like when you want to spend lots of frequent transactions and we kind of talked in previous episodes about the idea of people wanting to break down monthly payments into daily payments into secondly payments potentially and these kind of these offer a really cool solution to do that yeah and as you said that's really crucial right there's different things in place to protect your money and

the fact you know if you have been paid so many times then you still want to be able to get out what you should be owed at a given point in time because when you set up that channel you actually are normally predefining a future date when you're expecting to close it so if anything goes wrong in the interim there is actually a way you can get out of it and there are a few different models for doing these State channels one of the biggest and most popular ones is Hash time locked contracts which is what is exactly what's used in the lightning Network right now I said they were peer-to-peer and that's the ideal way and lots of the oldest ones which go back to like 20134 were peer-to-peer in the lightning Network it's a bit more complex because actually you have as the name suggests a network of people that you try and root your funds through so it's kind of recreates this very complex web of money flowing around and you know

again we'll probably cover that all in a future episode but the good thing about them is that if you take something like Bitcoin the fees are very high if you want to directly pay onchain if you move to the offchain lightning Network the fees are actually significantly lower because you're not demanding block space in Bitcoin the Bas layer layer one every time you want to transact you're just keeping a lot of it offchain in the interim yeah so that is State channels which you said is kind of gain popularity light Network things like this the other type that we have that's gaining popularity is rollups or zero knowledge rollups there's actually a few different types of this but like I say we're going to cover zero knowledge proofs because zero knowledge technology generally is gaining a lot of popularity is very critical for web 3 going forward so we'll do an entire episode on that but these zero knowledge like Layer Two rollups effectively similarly to what Jack was talking about bundle multiple transactions off

chain and they validate them using these zero knowledge proofs right and then submit a single proof of the entire kind of bundle of transactions back to the main blockchain and this has a couple of other benefits as well it maintains data privacy reduces the load on blockchain simul before and significantly improves improves the scalability and efficiency yeah I I think rollups are just generally very interesting as you say the core idea behind rollups broadly is batching as we said before but there are different flavors so there are two broad types that are used and again lots of this is ethereum based because that's where a lot of this work's going on the first type is what's called optimistic rollups which is funny because actually what they do is they assume your transactions are valid by default right so it's like again doing that lack of checking at the door of the bouncer and you're going into your club they're not really checking but you can be challenged with what's called a fraud proof later and

if you do have a valid fraud proof that says well that transaction you should have checked him he's brought it in something he shouldn't have then the person who produced that block will be slashed this idea of losing some of their block rewards so that's the optimistic case now we don't want to focus on that as you said we want to focus on these much cooler zero knowledge rollups because they're much more powerful and they don't assume that it's valid by default they actually provide proof up front they say actually no this is valid and here I can prove why but it as you say uses the zero knowledge proof and zero knowledge snarks they called but we're not going to go into that today that's the techn uses and it's very sophisticated cryptography it's a field that's moving very fast right now that can help you basically prove things about generalized computation right so you can prove that this smart contract executed in a given way but you can prove those statements to someone

and convince them without having to give them all the data without having to have them reproduce that whole computation themselves so zero knowledge rollups are this idea of batching a bunch of transactions together and then providing a really small compact proof that this whole batch of transactions does rep present the last thousand transactions that happened in ethereum okay that makes sense I think one of the things I've read is that it's actually quite hard to generalize these computations right in a lot of ways so the actual creating of the computation right now is probably as difficult as maybe the cost of actually doing them on the main chain anyway but it seems like becoming more efficient and more scalable so this could be like a really positive direction for layer to scalability in the future yeah definitely if you'd asked this question like three years ago when I kind of first heard about them then people were saying well this stuff is fine it's clever but it's not very efficient and it's still true it's

not as efficient as doing some of the other techniques and you know State channels and things potentially but it's getting faster all the time and that's why I think it's so exciting because there's so many people working to improve on that base technology and yet as you pointed out really importantly making it useful for general purpose computation is hard enough in the real world and you know it's kind of been solved more or less now but then making it compatible with the evm the Ean virtual machine is a whole other challenge which has only kind of seen breakthroughs in the last year two years maximum so now we are starting to see what can you do when you have evm compatible zero knowledge rollup systems and it's really exciting but again the key take-home Point without going into the detail is that you can batch all this stuff up and you can prove that all these things happen off chain so yeah it's very impressive stuff not to get too far down the zero knowledge

path but the most popular rollups are still the optimistic type so there's about 11 billion locked in the most popular optimistic rollups protocols right now called arbitrum um there's only around 500 million in ZK sync which is the most popular zero knowledge one and it's going to be shifting over the next few years so I think we just got to keep an eye on it okay so I think it's kind of obvious we kind of hint at it throughout what some of the pros and cons of layer tws are but just to highlight those well the first one is increase throughput right we're saying that there's a scalability problem and say ethereum and Bitcoin a lot of the layer ones by bundling transactions on a layer two and then referencing them back on chain on the layer one that means we can have more scalability more throughput more transactions processed per second effectively and as we hinted at there as well this can also reduce the gas fees if we say processing atheris and transactions

offchain and only putting one transaction on chain you'd hope that the transactions on the layer two are much more cost effective than they are on the underlying layer one yes exactly and you know that's the key as we said is like taking some of the data or computation off chain being able to interact with the blockchain the layer one IND indirectly but at much much lower cost so that's that's a clear benefit of using these systems as well as the fact that you get you know especially with the zero knowledge stuff that we're talking about the Privacy enhancement you get from this now I say privacy enhancement because you could flip it on its head in a minute and call it a con but you be by minimizing the amount of data you put on the blockchain you're also minimizing the attack surface from a privacy perspective for that yeah I guess one of the things I've read There is that you're involving more parties though in the loop potentially as well by starting to

do things on layer twos and it's like what's the and we're probably going to get to this in the end like what's the point of involving a layer two like an additional party and like all this kind of stuff is actually a weakness of the whole thing um so yeah let's talk about some of the cons we've kind of only talked about layer twos as a benefit to everything but one of the things that we hinted that was complexity like it's actually really difficult to implement some of these things especially on the ZK rollups and ZK snarks that Jack was talking about earlier just because due to the cryptographic complexity of trying to prove a thousand transaction in one transaction that's actually really difficult to do it should be simple to verify typically but the actual generation of the computation is quite tricky to do yeah and as it is improving all the time but it's always going to be more variables you're adding into the system as compared with using it as a layer

one so I typically say ideally you would use layer one if the costs were lower that's what you want to do right because you get much faster confirmation you get better guarantee that what's happened has happened but the complexity is you know as with all these things it is improving over time it just happens to be starting from a very complex place to start with the other issue I think we should mention is this data availability issue so you the Privacy benefits of not putting everything on chain kind of rear their head as a well you can't necessarily prove everything about a transaction you can't go and check everything that happened you might have this compact proof that the net result again rtgs versus Net settlement you can prove what the net was but you can't necessarily prove all the states between you can't go and prove that actually Alec won the first 50 games of Tiddly Winks before I won the next thousand that kind of thing they'd only see what the final net

result was so that's not ideal right yeah and I think um one of the last things that we probably is a con on this stuff is around the inoperability between like different layer twos you talked about layer norts chains providing inoperability underneath the layer ones and it's kind of well we're getting more and more isolation potentially by having you know layer twos that are just based on layer ones and kind of fix seen that and maybe it's also linked to the fact that we have more intermediaries involved in the loop with their own kind of set private custodial or whatever you want to call them that kind of separate this stuff off I guess yeah the big question here is you know does this actually solve the Trimac cost are they actually a layer two is actually solving the problem right now yeah this is a big kind of bug bear for me well I actually have an issue with the premise to begin with but I'm gonna maybe Park that for a minute about

we know whether the trilemma even exists to start with but you know let's let's assume it does then yeah have we actually solved that with layer twos because as you said you are introducing these additional third parties for me that is essentially sacrificing some element of trust you are typically giving up some trust and we haven't given the details of how the ZK snarks work yet but part of that you know depending on which implementation it's not just magic right the math behind it can seem like magic but there is some kind of level of sacrifice happening you don't just get the benefits of it for free so to my mind it is strictly less secure and I'm willing to kind of go out and say that it's strictly less secure than if you were using it again directly natively on layer one so yeah you're getting more scalability but at some extra cost and it's not even easy to quantify that cost right and does it matter that's a whole other question but I

think it's important to know that there is something you lose by going to Layer Two yeah I've seen like articles and there like a lot of news in the past around these layer twos being security problems and like hacks and breaches happening at the layer twos because they're typic Ally fairly un battle tested compared to the layer ones that they're built up on and just like you say a complete single point of failue there if you're sending all your transactions off this unknown party effectively and not knowing how secure they actually are so yeah it's a big question do they solve the trma problem or do they just solve one part of the tremma problem so some interesting facts around this area one we mentioned earlier is that the lightning network was adopted by El Salvador like obviously they want to use it as legal tender they realized that Bitcoin was the angle they wanted to go for but for day-to-day transactions they knew they didn't have the throughput so they're actually using right now

the lightning Network as a scalable solution to actually transact with which is quite an interesting one I think early days this well initially was a huge Boon right people were saying this is incredible when this was first announced at one of the big Bitcoin conferences saying this is a huge step forward you know El Salvador making Bitcoin legal tender and saying we're going to go kind of full in on this idea and then there came a year of maybe memes against El Salvador because there were teething problems not every wanted it there were I think some demonstrations in the public against it but now if you ask people their actual day-to-day experience people say you can very much use Bitcoin at the lightning Network daily for all your kind of daily needs so yeah they they've done something that no other Nation on Earth has really done which is quite exciting and shows it shows that there is something there to to using a layer two scaling I think yeah I mean it definitely helps

that Bitcoins currently very up and I think their investment in h Salvador has actually come through if You' have asked them like two months ago maybe they wouldn't have been as popular yeah it is an interesting one and kind of on that point as well it's another big thing is that it's interesting that ethereum's road map actually kind of states that there is going to be this transition and a heavy emphasis on layer 2 scaling Solutions you know vitalic was one of the big proponents of this trilemma problem and it seems like ethereum generally has kind of accepted it as a flaw in the system and they have to be reliant on layer twos to kind of take the scalability forward and ensure that ethereum can be deployed and a high trans actions around the world which is I think it's a bit sad really they kind of given up a little bit and improving ethereum to the point at which you can do everything right yeah and I think it comes back to the

fact that people hold this idea of decentralization or this perception that having many nodes validating is decentralization whether or not you agree with that that idea is so powerful in the minds of many of the people influential in crypto and many of the users that they are simply you know that's that's the mountain they're willing to ey on so yeah that it I see that this trend of moving to Layer Two kind of broadly across the industry is only going to continue and speaking of Trends one of the other interesting things is we've seen some of these newer networks like your polygons for example which kind of I've seen it described as a layer zero and a layer two which doesn't help for this episode but think of it as you know it's still it's a it's aiming to help scale ethereum at its core and that has been adopted very widely for all sorts of different things right it's been used by Major platforms like Starbucks Reddit Nike I'm pretty sure at one point

there was also an integration with Instagram for nfts with polygon so you know it's made really big inroads and all of this has been on layer to infrastructure because lots of the big Brands and the lots of big companies who want to dip their toes into web 3 they one of the immediate problems they have is the lack of scalability the high cost of doing so so naturally they have chosen to use these Layer Two Solutions as the first way to kind of test the waters with what they want to do yeah I think they used to be called Matic or something like that right when they were just a scaling solution for ethereum and now they're kind of I think their angles like multi-chain system and they're going towards this more interoperability layer which is I mean it worked quite well I mean polygon's like always in the news these days right I think Mark cuan invested in them as well which is a major adoption like on every exchange obviously I think they're

pushing quite heavily into the gaming sector which is always a big one for this kind of stuff and I think yeah we're kind of coming to the the closing section of this episode it's like what's the future look like for this space and I think one of the big things when it comes to adoption is cost right it's how much do it cost to use these things and can it keep up with my daily transactions and I think most people will see a layer two as a way to do that they'll look at okay what are the transactions per second and how much it cost me to use it and immediately they'll be like well this is cheaper and faster that's better I'm going to use it and I think as soon as you say we've got the security of ethereum but we're cheaper and faster unless someone's doing their due diligence and looking into actually okay how are you achieving the same level of security as a eum you're probably not for example I

think that it's going to help with adoption but there might be some security problems that probably come from these yeah I agree and if you're thinking about the future one of the trends I would actually see is this revival around layer one scaling right because you've had something like salana come along which is basically trying to be a layer one scalable version of ethereum that is actually not just saying let's shift it on to Layer Two they are trying to do as much as possible on layer one you've also had other entrance like apos and sui with some really smart people behind them trying to solve things from layer one and I I think one thing we haven't really mentioned is that layer one scaling and Layer Two scaling are not mutually exclusive you can do both right so I would like to see more work being done in both areas I think all the developments with ZK rollups are great and they will be very useful for all blockchains in the future potentially because

they are typically you know can be quite agnostic to different chains too but the layer one developments are almost as is important if not more important so to get this used by everyone and to have all our internet activity mediated by a blockchain I think we almost certainly GNA have to have cracked it in both of the two domains for sure yeah I saw someone say something along the lines if if you need Layer Two then you're L one's not right and I think with the big chains like Bitcoin ethereum maybe it is tricky to get those substantial upgrades done like you've seen how long it took for the the ethereum 2.0 to come but like a chain like salano you know smaller community they're a bit less risk averse maybe they can actually achieve what everyone's trying to achieve on the layer two at the layer one but it's probably is tricky with the momentum that ethereum Bitcoin having the people on there right now to all of a sudden overnight change the entire

protocol to be like he this is how we get more scalable yeah layer ones ideally but there's always probably going to be a place for ler twos I guess in the future yeah well I think that's a decent place to wrap this one up I think it's a good self-contained topic layer zero layer one layer two we didn't go into so much detail on layer zeros because again I think that it's such a complex and Abstract thing we probably want to talk about that in a separate episode similar with the Zer knowledge Tech that's going to require much deeper commentary on right to explain exactly what they are but the most important thing to take away is that we have effectively these three layers these core components of most web 3 systems now and it's good to know you know where it sits and whether you're using typically whether you're using a layer one or a layer two that's the big question so yeah I think with that we'll say to our audience thank you

for listening wherever you may be and join us next time to entangle a little more of web 3 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 entangle a little bit more of web 3 the views we express here are our own and do not reflect the views of our

Topics: Blockchain & Crypto

Related episodes

All episodes