Krzysztof Gogol - Digital Asset and CBDCs Exchange using Layer-2 Blockchain

EthereumZuri.ch 2024 · April 2024 · 20:56

Krzysztof Gogol presents a novel architecture for trading digital assets and central bank digital currencies on layer-2 and layer-3 blockchains. Gogol argues that even with liquidity fragmentation, a multi-layer setup with several automated market makers is more cost-efficient than a single AMM on a layer-1 blockchain, making rollups a practical venue for this kind of exchange.

Speakers

Topics

From EthereumZuri.ch 2024, hosted by EthereumZuri.ch.

Transcript

thank you Ben uh for such a great uh introduction I'm very happy to be here as Ben mentioned I am a PhD candidate in computer science at the uh blockchain Center and spe specializing in my research on intersection of uh Layer Two blockchains rabs and decentralized finance and today I'm going to show you how those two words actually can uh come together for our uh benefits I mean if you want are not persuaded by the previous talk from niola why tokenization is great I will uh give you some more arguments you can see uh behind my uh back actually what was

happening when it comes to tokenization of us treasury bills last uh year jally last year was is known as a crypto winter when the tvl in defi was at best flat with relatively low trading volume but there was one asset class was performing quite well and these were those tokenized uh uh us treasury bills I mean one of the reason was is back then they were paying five or more uh percent Which is far more than you can or you could make from uh staking and what would be actually very cool if those assets could be put inside uh defi protocols like Ava to enable uh some

leverage it is uh today not straight for straightforward some Protocols are experimenting with with it but we hope yeah it will come uh it will come uh soon there are the major benefits why the companies are like I mean aarat and others decide to go for tokenization it's because of the very fast uh settlement on the blockchain which is happening within seconds compared to the days that uh at last in the traditional financial industry also the costs are relatively low especially when you are using Layer Two uh Layer Two uh

blockchains and then there is also the issue of trust that's may be a little uh philosophical question if we trust more regulations or if we trust more cryptography I believe that in the future this is where we are going yeah there will be no need to choose yeah there will be systems that will be based on those two uh pillars but there is yeah as I mentioned to you the nice thing about the uh disiz Finance is that we could simply think about using those smart contracts behind uh disiz Finance to further boost possibilities of a tokenized uh those tokenized real world uh assets so there are plenty of

applications of decentralized Finance I'm not going to uh talk uh about all of them uh today and how they could be used uh for tokenization but only focus on one particular use case which are decentralized exchanges and those decentralized exchanges like uh they function like Unis swap or a curve they have one uh magical trick which is called uh automated market makers and simply those automated market makers they decide uh to to whom and for how how much tokens uh sell or buy uh some other tokens like in a traditional Finance you typically have order books

you have some components that are doing Market making they are coming they are putting some uh orders on that uh or that order book and the Traders are are interacting with that putting such order book on a decentralized finance uh on the blockchain would be too expensive and for that reasons though automated market makers were uh were invented but one of the thing before actually we start using those automated Market maker is the question about interoperability because as you can see on a a chart behind me a lot of uh tokenization projects actually happening on a very different uh very different uh

blockchain this is just a snapshot about one particular class which is a tokenized debt so it's not not uh representing the whole class of real world assets I mean the interesting thing is is that Mo most of tokenization is happening on the ethereum compatible uh chains but still if we want to have in the future a very um very liquid and efficient market we need to think how to bridge uh those tokens together to have one uh ideally blockchain taking taking care of that uh interoperability and bridging and then there's actually another question that we uh actually we at the University ask ourselves and uh focus in

our research will it be really cheaper uh in the future to buy for example a bond or maybe to exchange uh euro into a fe rank using the blockchain uh then it is today using the traditional Financial system so we just put aside all of those um ideological aspects of the blockchain and then see L trying we are trying to calculate what is uh what is cheaper because I mean I believe that in the future the real bu adoption will come from that increased uh increased efficient efficiency so we were actually not the not the not the first one that look at those topics the interesting thing is is

that pioneers of applications of smart contracts from defi uh for uh Central Bank digital currencies are central banks and they already running a lot of uh pilot projects and experiments I just maybe mentioned the two one is Project Mariana the other is a project uh Agora in a project Agora simply central banks there are like seven together with a bank for additional settlement in Basel they are trying to uh bring all of the tokenized assets on one uh blockchain and they are experimenting with uh uh Bridges the project just started and in the project Mariana

simply what central banks uh central banks did they use they did a fork of uh curve on The Ether on the ethereum uh test net and they were experimenting with uh using it to exchange uh three test uh cbdcs one representing digital Euro one representing digital SS Frank and one Singaporean uh dollar and actually the interesting thing is a turn out that from the legal point of view but also from the point of view all of the processes it is possible it is possible and it will meet all of the requirements that the traditional Finance has to use those smart contract and a blockchain to move the whole FX

Market uh um on the blockchain and on the uh defi smart contracts and this is a huge Market because F FX Market alone even not touching that oranization is processing 7 trillion of dollars daily so you can imagine that uh what the Boost it would be to the traditional defi if those 7 trillions uh trading volume uh yeah would be moved uh would be moved there but looking at that uh project that actually Pro that it is possible we simply at University start asking more questions about which blockchain to use which IMM to use and how to parameter I them and this is what I'm going to uh

show you in the second part of our uh presentation this is actually when uh it starts to get interesting because the layer two and layer three blockchains are uh stepping in so I mean as we are the etherum suc I will not be explaining to you what is the rollup but I heard even during the talks uh in the corridor that some people questioning the sense of existence of layer threes on top of the uh roller and this is actually uh what I'm presenting to you is a very good um use case which is showing that we really need layer threes and layer fours and five in uh on top of those layer tws because uh layer twos and the rollups they offer a very low uh fees especially

after the the upgrade and introduction of the blobs I mean it went down almost to 1 cent for many many rollups but it's still a far too much if you think about moving the whole financial system and our daily operations there yeah we need to uh yeah we need to go with those gas fees even further and this is where those layer trees are becoming useful because according to the research uh gas fees on each layer are around 50 times cheaper comparing to the previous uh comparing to the previous layer so if today layer twos and rups are offerring gas fees 50 times cheaper than ethereum

mainnet then the layer trees can offer 250 times cheaper gas fees that of course is reading uh that increased scalability is leading leading to the challenges of a capital fragmentation between those uh between those uh different uh layer uh trees and simply what we uh did uh at the in our experiment we designed such uh desized exchange that is operating on Layer Two and layer three uh blockchains here you can see how that uh this I exchange is actually working uh maybe I start from the

bottom at the very bottom there is a public layer one blockchain for example ethereum or maybe in the future it will be uh Bitcoin and that layer is simply a settlement layer this is a uh this is a layer where in the future for the uh those toonize assets or cbdcs will be just using as a data uh as a data uh storage but then what will will going to happen on top of that there will be a layer two or a rollup that is responsible for integration of the uh data from another blockchains or another layer tools and on on top of that you have different layer trees that are operating uh decentralized Finance

protocols in a let's say traditional computer science which is not related to crypto it's quite common then you have a computer program we is having different layers like a database layer data integration user interface and so on an application layer and simply with the more complex applications for the blockchain we are going to see more blockchain layers also spe uh each blockchain layer specializing in different uh uh in different uh app ation and maybe the important thing is that in our uh simulation this uh Layer Two this rollup is a private rollup because sometimes it's being called

validum so uh this is like a permissionless uh this like a permission blockchain which you can have on top of a public uh blockchain this is quite a new new and interesting concept and even though that permissioned uh rollup is on the public uh blockchain like ethereum still all of the transactions are encrypted by the sequencer and here yet are only validity proofs stored in the uh underlying layer one uh chain so I mean thanks to that approach we can combine the legal requirements that are coming from the central banks or traditional Finance with all of the best things that are coming from the

decentralized finance and those smart and those smart uh contracts but then you I mean that was a beautiful design but will it really work in the reality as that Capital will be fragmented between different uh layer three blockchains each operating different uh defi uh protocols and amm we simply run a simulation and we look at the uh FX uh Market we look at those three currencies that were chosen by the central banks Euros fre strengths and Singaporean dollar and simply calculated how much it would cost to exchange those three currencies using

the blockchain and using automated uh market makers there are some uh benefits coming from that maybe such a future FX Market will be open 24/7 there will be a very low gas fees all trans transactions will be um settled automatically uh but uh the cost of such doing such swaps will be uh will change depending on the FX rate this is maybe not to nice property of automated market makers which is called a price impact or a slipage so typically like in it and computer science we are fixing one problem but we

are creating uh another problem in other also in our simulation we used the um we simply compared our solution which is running on a three layer trees with a one Dex which is a fork of a curve running only on one uh on one blockchain for example on ethereum and that blockchain is not having the capital fragmentation and here you can see the results of that uh simulation so I mean for the very small transactions when you are converting for example 5 euro into uh three strengths then the system which is operating on layer through uh blockchains is simply far more cheaper

than uh system running on the layer one chain it's a similar think actually is happening for the largest transactions that are yeah above 1 million however for the medium size transactions around yeah maybe 10,000 EOS being converted to another another currencies according to our simulation let's say the results were were very uh similar for both uh systems you can see the breakdown of those fees uh here maybe it's important to know that when you are using the uh blockchain for uh I mean that it also applies not only for tokenized assets and cbdcs but for every token also yeah

mem coins when you are using the Unis support curve you have different uh your fee uh is coming from a different elements this is of course a gas fee yeah which is paid to the uh yeah ethereum or rollup but there's also a so-called a swap fee or LP fee which is going to the liquidity provider to the automated Market maker and there is that slipage and price impact which is that inherent uh property of the um of the automated market makers and we simply uh break down all of those fees for the uh Dex which is running on layer one and on the layer twos and you can see especially that the gas fees are yeah uh

much much lower on the layer twos and also the sage actually is much lower for the largest and the yeah for for the largest transactions and then you can think why there is such a weird property that the uh that such a system is actually outperforming the smallest and the largest transaction and the reason is there is no perfect automated Market maker yet I mean all of the automated Market market makers that are there there are good in some cases like Unis swap V3 is good to trade uh token pairs uh where the volatility is not too big uh but you need to rebalance the

pool very often and pay gas fees for that curve V2 is good for uh trading stable coins back to the same coin and uh so uh to the same Target and so on but when you build a system which is actually uh using one amm for one type of the tokens another amm for another pull of the tokens then you can achieve a very good uh very good results and I mean this is important because you can see that when you are running a de on those uh l2s and l3s and then actually the majority of the cost is coming from the slipage here in the green this is actually the part of the fee which is

going to the liquidity provider G is on L1 almost no on L2 but the sage is actually very big and the sage is coming from the parameterization of those automated uh market makers and their choice what actually we are thinking right now at the university is how to apply the uh artificial intelligence and the Deep learning to minim minimalize that uh steppage cost because this actually uh also very important there is and there will be actually different amm for a different uh tokenized assets so we are going to use different amm to trade tokenized equities different IMM with a different parameterization for a

tokenize equities bonds and uh so on and maybe the last thing is we also organizing a site event uh to the ethereum TC which is going to take place on Monday afternoon uh also the University of TK but not this campus in the city center and you are very welcome uh to join we are going to have um a lot of Swiss banks we're going to have the founder of K also some FCS so it will it will be a few hours talking only about Defi and then thank you thank you very much kristofh um super interesting questions from the

audience let's head straight into that everybody stunned pretty much I see super interesting oh here we've got one yes thank you Christof uh for the presentation very interesting um what is your view on you know there layer one layer two layer three there are the sequences between is there not a risk that these sequen can be compromised and then nothing will work or what is your view on on the security side on the whole thing because there are a lot of small contracts involved in different layers so what is your view on this yes that's actually a very good uh very good question about the sequencers

so I don't think there is a security risk coming from especially that the nice thing about those rollups is this is already a tested technology because there are public rollups like arbitrum CK syn that are already there and we know it's working however what will come from Layer Two and layer three will be delayed in finality because yeah you will have to wait before until yeah each layer will settle and that might create some uh some risks that needs to be researched thank you any further questions okay so that maybe just one

word from my side really kristofh has an amazing uh substack where you can subscribe he's crazy like publishing every literally every day a new article I don't know where's your private life or anything like you read this story it's a really and super interesting like this depth it's not just the shallow and repeating what is out there he's really challenging new stuff so well done and thanks very much for the speech today and uh put your hands together once again for Chris thanks very much