[Music] And with that, we're going to go on and talk about DeFi. So for this talk, I'd like to bring on Angela from Uniswap Foundation to tell you all about hooks. Please give Angela a big round of applause.
Hello. I'll start with one simple question. Who in here just traded ETH for USDC at least once? A lot of people, right? But have you ever wondered what really happens when you buy or sell crypto?
No. Right? Let's say again you want to trade ETH for USDC. And I know we have plenty of options from like centralized exchange or fintech or even a decentralized one such as unis swap. But what's going on under the hoods really?
Or why are we using DeFi or decentralized finance in the first place? So let's take a step back. In in traditional finance, we have a bunch of permission infrastructure. Meaning most of the true aids go through our permission infrastructure. store from order routing, internal liquidity providers, market making algorithms and so on and so on.
And don't get me wrong, these tools are super powerful, but they are closed. Meaning not everyone can interact or use them. Can you maybe here from India, do you really have the possibility to interact with like let's say the US market? Easy peasy. No.
Right. So in 20 back in 2018, Uniswap launched the first time allowing anyone through our liquidity pools to really interact in a decentralized way with the finance world out there. These liquidity pools basically uh allow anyone to swap tokens permissionless, provide liquidity and earn fees and build on top of the protocol itself. The way it works, easy peasy. from one side connect liquidity providers and on the other the traders.
We're gonna get into that and that really was the start of DeFi as we know today. Basically, open financial infrastructure for the internet. When someone uh asked to me, but what is refi really? I'm not talking about you, but maybe my family or my friends. It's just a new way to interact with infrastructure uh or with finance out there.
And since then, DeFi has been growing a lot. Just naming unis swap uh from three trillion all-time volume or four billion total value locked. It's a lot for sure, but to be honest, it's just a small percentage of the financial globe out there. And the way that we can be part of the future is just like having more innovation from the protocol layer. Right?
So, let's recap now. How a swap works? The way it works again is the connecting liquidity provider. What happen is if I want to trade ETH for USC, I have ETH send the ETH to the pool and something similar to X multiply uh Y equals Kate happens in the back end. That way I can get my USDC back and then the liquidity provider is going to have like the fees.
I know simple, elegant, permissionless, but also static. And until the launch of B4 earlier this year, you really couldn't customize the behavior of that pools if you are working again in the future of the finance and no built-in customization means slower innovation and fragmentated liquidity. couple of talks before mention about that issue at some point. But today we have a some sort of like way to add custom logic from the swap cycle. Meaning before the swap and after the swap if you want it, you can add some sort of like custom logic.
So that way now you have external contracts that modify the pool behavior. We call that hooks. And just to check a little bit the flow when you are building let's say a D5 application out there no matter if you're a developer or business development in the protocol ecosystem out there the swap starts and then the system check before the swap flag meaning did you add any custom logic or not really okay continue execute the swap now check the after swap flag and then did you add any custom logic okay continue and that ends the swap. that allows us to have plenty of possibilities out there. These are some sort of like few options.
Let's mention some of them. A time weighted average market maker or T1. Basically, let's say we want to swap $100 million in crypto. Not that easy as you might think. Um the way that we can do this is like by splitting some of the transactions and like slower ones and like smaller ones.
And that way from the price execution for the trader is going to be better and also on the other side for the liquidity providers as well. Let's talk about dynamic fees for example based on volatility or other inputs. What happens in a bull market lot of activity right at some point back in 2021 I remember swapping was really really expensive and what happens in like shopping markets. Can we somehow add some logic in there so that way in the future no matter the amount of volume that we have we can have better fees for the users out there now it is possible you build it onchain limit orders meaning when you are trying if you're a trader let's say you're a trader not financial advice but for sure if you are uh looking for trading activity do you prefer to use centralized options today or decentralized ones one most of the times it is a centralized because maybe yet we don't have the best trading experience right but now it is possible if you want to create some sort of like this onchain limit orders and if I go back real quick something important is that only one hook can be add pool but then one hook can serve many other pools so meaning if someone today's build some of these applications in the future this is composable and any other one can add in their protocols if they want it. And we have plenty of other options, you name it.
We just don't have hooks, but also the B4 protocol on top of Uni Chain. Now, it includes any other some sort of like features um such as the singleton contract and the flash accounting backing B3 or like other versions of the D5 protocol. If you wanted to trade ETH for D, at some point you had to go first from ETH to USDC and then from USC to D. That really happens under the hood in the past. But now everything happens in just one contract.
And at the same time with this flash accounting and the other features everything happens in just one trans friends tax action really meaning that now it is really possible to build a better seamless trading experience out there. So hooks TLDR from a personal standpoint are a new kind of Legos and if you wanted to be part of the financial infrastructure future you can now build it using of course the current protocol. what you could do. Let's say you are a developer, not just for the for the weekend, but working at a D5 protocol or you are a founder or you are business developer at a D5 protocol out there. Just to mention some of the options, let's say you're building a mini app in workcoin.
What if we build any KYC verify pool out there or you are working at a lending protocol? So maybe we can create better experiences in order to auto auto borrow repay for for lending pools. Any of these ideas can be a hook itself. So again it's like money legos for liquidity um logic and this QR code you can find some other ideas and options. And now let me introduce the UNISO Foundation just to give you a little bit of context now that you understand why having these Legos is important for the future of finance.
In pursuit of a more open and fair financial system, the UNIS swap Foundation supports the growth, decentralization and sustainability not just for the unis swap community but rather the defi ecosystem out there throughout and like many other um initiatives. We support key focus five areas protocol and innovation developers. We are here over the weekend to support you guys governance, research and security and we've been developed a bunch of initiatives. So any other uh developer team company out there can be part of the future along with us. So let's mention some of the unis swap builder resources that we have from grants education and so on.
I think it was Austin at the beginning that mentioned that it's important to have all of these pipelines so people can be part from the beginning to the end of the ecosystem. So if you scan that QR code, it's going to uh take you throughout a thread uh on the UNISA foundation page that is going to mention if you're just starting, if you already build a project, if you need some sort of like audit subsidies, if you need some sort of like support from the GTM, if you need some sort of like support on the incentive level, everything, you name it. But I really want to mention like a couple of them so I can explain you better. The first one, it is a hook before template. If you are a developer out there, you're going to find like the first clear steps for you to deploy your first hook.
Um, then if you are a founder or working as any other career in this space, there's a hook directory in case you want to take a look to some ideas that people that's been building in this space. This in particular is the results of like many hackathons in our HM Academy or the hook incubator meaning the brilliant developers at all the space from now around the globe. They've been building different ideas and if you're a developer you can also go there and apply for our next cohort that is going to start I do thing early October. Then we just launched a different updraft before course. So if you just want to explore and understand what's happening under the hood of unis swap, it's a free and open course that you can check out out there.
And then who is going to hack during the weekend? Nice. Cool. That's great. We also uh developed this UF hacker uh token, meaning you're going to find all of the resources that you can use during the weekend.
uh the information about our bounty uh and basically how to connect with us during the weekend but most importantly after the weekend and again of course the the hackathon can be just the started and then we can support you along the way. My two cents from this talk is basically DeFi just started even if we've been building during the past 10 years now the DeFi applications is it's just the beginning regulation is just starting like some other fintexs are just starting and joining this space so at least for me investing time in learning about this thing is understanding that programmable liquidity is the foundation for the next decades of open finance. ance and again we have some sort of like builder journey uh created for you. So from the building funding building building plus funding security uh and growth uh you can be part of that journey for sure. This is basically our hook doyo community meaning our whole team is here IRL but also online to support you in case you wanted to connect with us.
And like finally my name is Angela Cando. I am the developer community at the UNISAW Foundation and my mission really is just to talk to you, understand your struggles and how can we connect you with some of our current opportunities. So yeah, hopefully you are not just here to learn over the weekend but for being part of the future infrastructure. Thank you. [Music]
Automatic transcript — names and jargon may be misspelled.