Bankless - Announcing Uniswap V4 With Hayden Adams

Episode Date: June 13, 2023

Hayden Adams joins us to announce the release of Uniswap V4! He walks us through innovations new to Uniswap like hooks and singleton contracts in addition to a new upgrade that can lower gas costs up ...to 90%. To launch V4 we need your help, the community, to contribute your opinions and decide the fate of this new protocol. ------ 📣 ASYMETRIX PROTOCOL https://bankless.cc/asymetrix  ------ 🚀 Unlock $1,000+ in Perks with Bankless Citizenship 🚀 https://bankless.cc/GetThePerks  ------ BANKLESS SPONSOR TOOLS:  🐙KRAKEN | MOST-TRUSTED CRYPTO EXCHANGE https://k.xyz/bankless-pod-q2   🦊METAMASK LEARN | HELPFUL WEB3 RESOURCE https://bankless.cc/MetaMask   👾STADER LABS | ETHX LIQUID STAKING https://bankless.cc/Stader ⚖️ ARBITRUM | SCALING ETHEREUM https://bankless.cc/Arbitrum   🗣️TOKU | CRYPTO EMPLOYMENT SOLUTION https://bankless.cc/Toku   🎮IMMUTABLE | GAMING ECOSYSTEM https://bankless.cc/Immutable   🛞MANTLE | MODULAR LAYER 2 NETWORK https://bankless.cc/Mantle  ------ TIMESTAMPS: 0:00 Intro 5:56 Introducing Hayden 7:37 V4 Launch Date? 9:12 What Goes Live Today? 10:28 How Far Has Uniswap Come? 12:14 Can Uniswap Get Any Bigger? 13:52 Are Centralized Exchanges Competitors? 16:28 Why Do We Need V4 20:10 V4's Flagship Feature 24:47 Introducing, TWAM 28:29 A New Uniswap Fee Structure 33:57 How V4 Solves Efficiency 38:27 Singleton Contracts 41:08 The Gas Refund 43:29 The Hook Centric Roadmap 46:59 What Rollups Will Uniswap Live On? 51:34 Who Will Be Building Hooks 58:20 Fees On Withdrawals 1:05:35 Why Hooks? 1:10:18 Will Liquidity Migrate To V4? 1:16:34 How V4 Is Like a Centralized Exchange 1:20:47 Is This The Last Uniswap Upgrade? 1:22:38 Has Defi Peaked? 1:30:10 How To Get Started On V4 ------ RESOURCES: Uniswap V4 Blog Post: https://blog.uniswap.org/uniswap-v4  Hayden Adams: https://twitter.com/haydenzadams   Uniswap Labs: https://twitter.com/Uniswap   Hayden Last on Bankless: https://www.youtube.com/watch?v=9fqJzS08pPc   ------ Not financial or tax advice. This channel is strictly educational and is not investment advice or a solicitation to buy or sell any assets or to make any financial decisions. This video is not tax advice. Talk to your accountant. Do your own research. Disclosure. From time-to-time I may add links in this newsletter to products I use. I may receive commission if you make a purchase through one of these links. Additionally, the Bankless writers hold crypto assets. See our investment disclosures here: https://www.bankless.com/disclosures

Transcript
Discussion (0)
Starting point is 00:00:00 One cool thing about the singleton design is it actually reduces current estimates have it reducing the gas cost of pool deployment by about 99%. Wait, what? Sometimes people pay when gas costs are high, like north of $1,000 to deploy a pool just at gas cost. And that same deployment would be something like $10. Vegas Nation, there's a big announcement for everyone in Defi today. Uniswap. Version 4. It's coming out. We have Hayden Adams on the podcast and tell us more. We talk about a few things.
Starting point is 00:00:30 What is uniswap version 4? V4? What does it do? When's it coming? How big of a deal is this from an order of magnitude size? Is this as big as V3? We also talk about hooks, this idea of a modular uniswap. What are hooks? What do they do? What is the future for liquidity on Ethereum? And finally, we talk about DFI. Has DFI slowed down? Has it diminished? Does Hayden still think we're on track to eat traditional finance? All of these topics unpacked in the episode today. Guys, before we begin, though, want to tell you about a prize-linked ETH-denominated savings account from our friends and sponsors at Asymmetrics. David, what is this? Asymmetrics. It is a way to make your ETH staking super-exciting, or super-boring, or super-exciting.
Starting point is 00:01:18 If you want that 4.5-5% ETH stake to range anywhere between 0% or 1,000% asymmetrics may be few. Okay, what the hell am I talking about? So, Asymmetrics, it's a little bit like pool together. Same kind of concept where everyone stakes their ether, but only the yield goes to one person who gets a lot of yield while everyone else gets zero yield. That's why Ryan called this a prize linked savings account. So if someone just feels like a little bit extra lucky and they want to add some excitement to their eth staking, they can go to bankless.cc slash h symmetrics to get anywhere between zero or 1,000% stake on their yield. Ryan, diving into, to this episode when I was learning about uniswap v4,
Starting point is 00:02:02 I really just got visions of a microcosm of Ethereum. So I'm calling this the hook-centric roadmap for uniswap, whereas Ethereum has its roll-up-centric roadmap. Uniswap now has hooks. And it allows for uniswap base to be extremely primitive, but hooks to reintroduce complexity into the uniswop AMM on an opt-in basis. And I think this really, really gives a lot of power to builders who want to make their uniswap pools very expressive.
Starting point is 00:02:35 Overall, it starts off as a very small update. V4 is a small update to V3, but the cool thing is, is that the size of how awesome and powerful Uniswap V4 is actually grows alongside the open source developer community around Uniswap. So I'm very bullish on this new update. Hayden's going to unpack it for us in this episode. Small disclaimer, Uniswap Labs is a sponsor of, bankless. They currently sponsor at the bankless podcast. But Uniswap v4 is an episode that we would never miss. And so we're having Hayden Adams, the inventor of the Unusop Protocol, on to discuss all about
Starting point is 00:03:10 Uniswop v4. So let's go and get right into the conversation with Hayden Adams. But first, a moment to talk about these fantastic sponsors that make this episode possible, including and especially Cracken, a preferred crypto exchange for 2023. If you are scared that the Operation Choke Point is going to choke us off, maybe you should get all of your Fiat money into the crypto world, and perhaps you should use your brand new account with Cracken to do so. Let's go hear from them right now. Cracken Pro has easily become the best crypto trading platform in the industry. The place I use to check the charts and the crypto prices, even when I'm not looking to place a trade. On Cracken Pro, you'll have access to advanced charting tools, real-time market data,
Starting point is 00:03:45 and lightning fast trade execution, all inside their spiffy new modular interface. Cracken's new customizable modular layout lets you tailor your trading experience to suit your needs. Pick and choose your favorite modules and place them anywhere you want in your screen. With Cracken Pro, you have that power. Whether you are a season pro or just starting out, join thousands of traders who trust Cracken Pro for their crypto trading needs. Visit pro.crakken.com to get started today. Mantle is a brand new, high-performance Ethereum Layer 2 network,
Starting point is 00:04:13 built differently from the other Layer 2 you may be familiar with. Mantle is a modular Layer 2 built on the OP stack, but uses Eigenlayer's data availability solution instead of the expensive Ethereum Layer 1. Not only does this reduce Mantle's gas fees by 80, compared to other layer 2s, but it also reduces gas fee volatility. Mantle has a decentralized sequencer set, eliminating the risk of downtime and censorship on the network. And because Mantle implements multi-party computation nodes, Layer 1 settlement execution is shortened from seven days
Starting point is 00:04:43 to as low as just one or two. Mantle is the first layer 2 built by a Dow and is backed by one of the biggest Dow treasuries in the world. BitDAO. Mantle already has subcommunities from around Web3 onboarded to help the growth of Mantle, like Game 7 for Web3 gaming, or edudow for the world of D-Side and bybit for TVL, liquidity, and on-ramps. Check out Mantle at mantle.xy-Z and follow them on Twitter at ZeroX Mantle. Immutable is at the forefront of Web3 gaming, on a mission to bring digital ownership to every player offering the world's best games and game development platform. Immutable lets game builders and players focus on great gaming experiences.
Starting point is 00:05:21 So, build your next Web3 game on Easy Mode with Immutable's leading full-stack Web3 gaming platform. It's built in UX features like the Immutable Passport are designed for games to scale to the next billion players coming to Web3. With Immutable, players can sign up with an email, pay with a credit card, and experience a frictionless purchase flow inside of games. So, discover your next favorite game and explore a network of 150 games building on Immutable, including such titles as Gossip, Gossip of Gossip, Ghetto, Guilds of Guardians, Illuvium, Embersword, and Metalcore. So join Web3's largest ecosystem of games and players. Build, play, and connect at immutable.com. I would love to introduce you to Hayden Adams, the inventor of the Uniswap Protocol and CEO of Uniswap Labs, a software company building on and around Uniswap.
Starting point is 00:06:06 And today, Hayden is here to talk about the vision behind Uniswap V4 and what it could mean for liquidity on Ethereum. Hayden, welcome back to Bankless. Thank you for having me. So excited to be here and to talk about Uniswap V4. Yeah, Hayden, are we getting a new Uniswap? Short answer as we are. Long answer is that, you know, the process of getting a new Uniswap is going to look a little bit different this time around. I think that, you know, a really important starting
Starting point is 00:06:31 point is that we see Uniswap as very similar to Ethereum itself, where Ethereum, where it's, you know, a core piece of infrastructure, public infrastructure on which, you know, thousands of teams are building, you know, hundreds of thousands of liquidity providers. And it's really just this, like, public infra for the entire space, right? It has about, you know, at times it has over 90% market share for on chain trading on, on Ethereum, at least. And so, You know, similar to how Ethereum has this, like, public process for it being rolled out. And there's a lot of time for people to respond and react and give feedback and input. There's time for all the different projects building on top of it to, you know, begin preparing their infrastructure and, you know, build on top of it.
Starting point is 00:07:14 You know, with this version of Uniswap, we really wanted to build it in public. And so what we're rolling out today is basically a, you know, vision for Uniswap V4, as well as a, you know, white paper and a, you know, a draft of the code. So the code is, you know, we have an initial code base and it works and it proves that it can work, but it's not final. And we don't expect it to be final for many months. Okay, so the big new announcement is Uniswap V4, Jazz Hands. Yay, we're getting new Uniswap. And also the way that Uniswap V2 and V3 were built was, it was built and then I think within a month, both of them were live on Mainnet. And this is not what is going to be happening with V4. There is no release date, if I'm correct, and it is just a very long open period for public collaboration,
Starting point is 00:08:02 community engagement, public conversation to tinker with Uniswap v4. Is that correct? Yeah, I think that Uniswap V3 was kind of like a Beyonce lemonade album drop where when we released it, it was this cool thing and it was entirely ready and it was a surprise. And, you know, I think this time around, and honestly, one of the pieces of feedback we got at the time was, hey, this is really cool. this is going to take me like a month to understand, let alone, you know, build an entire integration on top of. And so, you know, that was one aspect of it. The other aspect of it is that, you know, there were, even like, like, at the time that we announced it, the code base was basically frozen and already well underway of auditing. And so there wasn't time to incorporate any pieces of public feedback. And there were like very, very minor things that people call. I mean, it was like a very good code base. We did a really, you know, good job. But it was like, there was like minor pieces, very minor improvements people found at the time. and they weren't really able to be integrated. And so with Uniswap v4, there's going to be many, many months.
Starting point is 00:09:00 There'll be time for people to, you know, open issues, to submit PRs. There's contribution guidelines. And there's a lot of time for people to, you know, start planning integrations and start building on top of it. So what are we getting right now hidden at the time this episode is released? What can people go get busy with and start digging into? Yeah. So, you know, first we have the blog post, which just,
Starting point is 00:09:23 outlines a high-level overview of what it is, or at least what our vision for it is. You know, similar to like Ethereum, right, you sort of have a sense of where things are going, right? We had this sort of vision of proof of stake, and then everyone started marching towards it. So we have the decision for what UNSBOP4 is. We have a white paper that, you know, gives a lot more background and technical information, you know, and supporting, you know, math, et cetera. And then we have a code base. And the code base really just contains a full draft implementation.
Starting point is 00:09:51 So it kind of proves it works. it's definitely not audited. It's not production ready. And we are going to march straight towards audit or production ready. We're actually going to give space and time for people to contribute and to, you know, give feedback into it. And so, yeah, right now we have an initial implementation. We have a vision. Excited to talk about what that vision is.
Starting point is 00:10:13 And yeah. Before we get into the vision of V4, I want to just maybe zoom out for a minute because it's not often, Hayden, that we're able to get you on bankless and have this kind of conversation. But like, let's zoom out all the way back to 2018. And I'm wondering if you could kind of like share how far Uniswap has come from that point in time. I was reading the blog post a little bit earlier, something like $1.5 million or, sorry, trillion with a T.
Starting point is 00:10:48 My God, million, how quaint of me, trillion in value. flows through this platform. Give us some stats. Give us some of the numbers that you look at to understand. The flex. Uniswap's progress and its impact. Yeah, flex on us for a minute. Yeah, I mean, it's been an absolutely insane journey. We have the previous bankless episode we did, but we really went through a lot of the early days. But since then, it's just been absolutely insane. I guess a few of the things that we look at that are pretty interesting. Definitely like total all-time volume traded is north of 1.5 trillion at this point, which is pretty crazy. There's billions of dollars in daily trading, hundreds of thousands of liquidity pools created, hundreds
Starting point is 00:11:32 of thousands of liquidity providers, millions of traders. There's, you know, I think, you know, even just like the amount of, like the market share on Ethereum, it's like, you know, north of 90% at times of on chain trading on Ethereum. It happens through the UNISOP protocol. You know, You know, it trades off at different times. But, you know, it's been trading off with Coinbase in total trading volume. You know, all sorts of things that we look at to just show, like, the amount of activity happening at top. Definitely, I wish I had a number for the amount of projects building on top of it. My, like, intuition says tens of thousands, not just thousands, you know, just because of the number of, you know, tokens and projects that exist.
Starting point is 00:12:14 So given all this, Hayden, one question in my mind is, like, can Uniswap get even bigger? Like, I mean, haven't we seen all the growth? Aren't the growth here is already behind us? How can this thing possibly get any bigger? I definitely think that Uniswab can get much bigger. There's a few ways for it to get bigger. Definitely, like, in terms of like market share on Ethereum, it's hard to get much bigger. You know, there's very marginal gains to be had there, right, in the order of like 10 to 15%.
Starting point is 00:12:40 And so I'd say that where Uniswap grows bigger is about, you know, basically growing the entire space, about having, you know, more, enabling more, you know, things to be built on top of it, you know, basically growing the entire, growing the space around it. And really, you know, taking innovation that currently happens external to Uniswap and having that innovation happen within Uniswap. I think that, like, one, you know, pretty important, like, nuance here is that, you know, Uniswap has this, like, dominance in market share, but there is a lot of innovation today that does happen in the AMM space and a lot of experiments. And, you know, maybe, a little bit of a spoiler alert for some of the stuff that's coming, is that like a big part of
Starting point is 00:13:20 what we're trying to do with uniswap v4 is make it easier for people to, you know, experiment and innovate even within, you know, on AMM design and functionality, but having that happened still within the uniswap ecosystem. Well, what's the goal here, Hayden? I mean, I remember at one point in time when Dexes were still in their infancy and we were just hoping to get like a, you know, like 5% market share from centralized exchanges. So basically all of the exchange volume happened with centralized exchanges. And like, wouldn't it be great if we could actually get this whole decentralized exchange thing off the ground?
Starting point is 00:13:56 And we could like eke out maybe double digit percentage of volume. Like, how do you think of the competitive landscape these days? Do you consider centralized exchanges as competitors? Or would you, like, draw those lines differently than maybe we did back in 2018, 2019? Yeah, I think that it's, you know, a pretty interesting. I say that generally, like, decentralization offers some fundamental advantages and the way that we always think is how do we expose those advantages to more people. And so it's definitely possible.
Starting point is 00:14:27 Like, I think centralized exchanges are going to continue to exist. But I think that there are really strong advantages of decentralized exchanges. And, you know, even, like, things that are centralized exchanges today will, you know, start tapping into the liquidity from decentralized exchanges over time. in terms of where it actually ends, really, I think that, you know, first it's defy growing bigger than TFI, and then it's, you know, defy growing bigger than T-Fi. That's, like, the long term of it. And the purpose of that is not, like, for its own sake, but because we think that, you know, that leads to a world, you know, with fair, better, you know, financial system, you know, more accessible financial system,
Starting point is 00:15:08 you know, just a better world in general. These are what we call bankless values. And we don't talk about them maybe. Well, maybe we talk about them too much, David. I'm not sure. We'll let the listeners decide. But it's definitely why we enjoy having hated on the podcast to kind of re-articulate it. It's been baked into the DNA of Uniswap from day one to provide a bankless exchange experience
Starting point is 00:15:32 where user can retain custody of their private keys and their assets. And that is certainly, we don't talk about it as much now in 2020. 23, right? We're off chasing other things. But like, that is the core of this entire movement. I mean, that is why we're here. Yeah, I think, you know, it's what you said. Like, a lot of the time kind of people have been in space for a really long time, like take it for granted and instead of like, yeah, of course we're doing all that stuff. Let's talk about what's new. But, yeah, I agreed, like the values are super important and really important to like guiding, you know, even day-to-day decisions. So, I'll admit when Uniswap v3 came out and concentrated liquidity, uh,
Starting point is 00:16:11 added in just a whole entire layer of expression onto Uniswap V3, Uniswap in general. I was like, oh, that's the last Uniswap. That's the final completion of Uniswap. It's the logical conclusion that Uniswap V3 is now Uniswap. So clearly I was wrong about that. So what was incomplete about Uniswap V3 that we need Uniswap V4? So let's start unpacking the Uniswap V4 box. What does V4 bring to the table that V3 still had left to complete?
Starting point is 00:16:44 Yeah. So, you know, you saw V3. I don't think we, I think it was a really, really good protocol, right? It's really proved itself. There's a reason it has such dominance today. It's, you know, really efficient, really flexible for liquidity providers relative to previous editions. I think that like what the, maybe the one thing, right, that we really, you know, wanted to tackle with V4. is Uniswap V3 was also extremely opinionated.
Starting point is 00:17:11 And what I mean by that is, you know, when you have these immutable smart contracts, the rules for it are kind of set in stone at creation. And the more you can, you know, modify and upgrade the, in certain ways, it compromises on certain security properties and compromises on, you know, other things as well. And so I think that, you know, with, as an example, right, in the process of designing Uniswap V3, there were like a million tradeoffs that had to be made. And, you know, one example trade-off is the price oracles.
Starting point is 00:17:41 So the price oracles were really just, you know, basically at the beginning of every swap, the contracts store the, you know, the first swap of every block. It stores the price and, you know, adds it to these like accumulators. And with that, you can basically, other, you know, other applications can extract really efficiently average prices across any period of time in the U-Swap, in that U-Swap pair. And that's a really, you know, it was a really good, almost like, public good for the space. Many other projects have built on top of that feature. At the same time, running that logic for these price accumulators
Starting point is 00:18:17 actually is a gas cost that is paid by swappers every swap. You could think of maybe something like 10%, don't quote me on it, of all gas of swaps is going to like updating these price oracles. And that amounts to a huge amount of money that swappers are paying over a period of time. And the thought process was basically like, well, you know, if Unswap can be used in more ways and in more places, then ultimately that will lead to more, like, you know, usage of the protocol, more liquidity in the protocol, and that will, you know, be better for swappers and offset, like, the increased gas cost. Now, has that played out?
Starting point is 00:18:53 Maybe probably in certain situations, some pools, the oracles do get used, and they're tightly integrated into important protocols. And in some pools, maybe they don't get used at all. Probably the majority of pools, actually, they don't get used at all. And that's just like attacks on swappers paid over time. and the kind of opinionated way that V3 was implemented that isn't like a choice that you can make when you deploy a pool. So I'd say that like the flagship feature of UNISP,
Starting point is 00:19:21 actually before I even, I'd say like another area that, you know, is really interesting as it relates to like the sort of opinionated nature is like fees and how fees are implemented. You know, most like there's a lot of different people who kind of experiment with. We're going to build our own AMM. And usually what they're doing is actually just like experimenting with the fee logic.
Starting point is 00:19:40 Sometimes they're doing other things, but that's like the most common thing that people do. And there's like a few other changes. So people are building entirely new uniswap forks and what you're saying is like, and they're really just tinkering with the fee model. And so they're building out entirely new exchange just to tinker with fees. Sometimes. And maybe sometimes they're doing other changes as well. But sort of no matter what, they're probably doing more work than they should have to. If all they're really trying to do is modify the functionality of a pool.
Starting point is 00:20:06 And so I guess, you know, we'll get to the point of it, which is the, you know, the flagship feature of Uniswap V4 is what we're calling hooks, which are essentially, you know, modules or customizations that you can make when you deploy a pool. And, you know, anyone can build a hook. Anyone can, you know, can implement one. And anyone who's creating a pool can choose, you know, what hooks their pool uses. And these hooks are, you know, pretty expressive. And they allow you to add on new features, new functionality, modified parameters of the pool. in really interesting and meaningful ways. So, hooks. Okay, so you started off this conversation with oracles and then also talked about fees. And these are all things, opinions that you're saying uniswap v3 had. If you wanted to start a new uniswap v3 pool, you had embedded in it, this Oracle feature, whether you asked for it or not. And then because of that feature, swappers who touch the logic of every single V3 contract
Starting point is 00:21:06 every time they swap, pay for that complexity to be built into that V3 pool. So what you're saying is Uniswap V4 has these things called hooks that are like generalizable things to insert into a V4 pool. So I'm guessing a base V4 pool, a V4 Uniswap Exchange, has almost zero features built into it, just like by default. And then the idea is you can opt into certain features like the, oracle like fee structures, et cetera, after the fact. But the standard issue Uniswop v4 exchange is just like bare bones, primitive, reductive, maximally simple, maximally cheap, maximally efficient.
Starting point is 00:21:49 Am I on the right track here? Yeah, exactly. I think that the, you know, the funny enough, Uniswap V4 actually has like the base system has almost less features, right? Because the oracles have been taken out of the contract. And now they can be implemented as a hook. And so, you know, in the process of building V4, we also built a whole bunch of example hooks to show how expressive it is and the types of things that you can do. You know, the simplest form actually has fewer features in a certain sense. So Unislaw V4, I could just start going through some examples of what you can do with hooks. Maybe we'll make it more clear. Okay, so, you know, one example is definitely dynamic fees. So right now, you know, right now when you deploy a new pool, the pool creator
Starting point is 00:22:31 gets to choose between a few fixed fee tiers. And actually the reason we chose... In Unipot V3. The reason... Yes. In V3, you choose between, you know, there's like four different fee tiers today and governance has the ability to add more.
Starting point is 00:22:44 And the reason that there weren't like arbitrarily many is, you know, to encourage, you know, to kind of discourage liquidity from overly fragmenting and encourage people to kind of consolidate it around specific pools. With Unitsop V4, when you deploy a pool, you can choose any fee you want as a static fee or you could attach a dynamic fee hook.
Starting point is 00:23:01 And the dynamic fee hook could actually customize, you know, the logic of your fee in any way you want. One example would be that you could do, you know, you could basically try to do some sort of oracle that tracks on chain volatility and automatically adjust the fee based on that. And that's an interesting experiment we've wanted to run for a long time, but we didn't want to, you know, hard code it into V3 because it was unclear if that was the optimal design. And so with Uniswip4, people can experiment with a whole different, you know, world of fee implementations. you know, volatility-based, you could imagine Dow controlled, you know, etc. And so that's one example. I think that's like a hook that will probably get a lot of usage. Other, you know, pretty major features that you can add onto a pool, we have a, you know, implementation of a limit order hook, which allows you to place limit orders at ticks.
Starting point is 00:23:50 So right now, you know, you can, you can provide, you can kind of simulate limit orders a little bit in Unswap V3 by providing liquidity to very narrow ranges and withdrawing your liquidity after it's filled. But with Unswap v4, you could actually just create straight-up limit orders that execute at, you know, and basically, maybe to step back quickly, hooks are basically code that run at certain points in like the life cycle of a pool and a transaction. So you could imagine there's a hook that runs at the beginning of every swap. Before every swap, run this code. After every swap, run this code. At the moment of pool creation, run this code. Before adding liquidity, run this code.
Starting point is 00:24:26 Before anyone removes liquidity, run this code. And so, you know, the hook for a fee might be like code that runs before every swap or after every swap. Limit orders might be, you know, would also be code that runs, you know, during the swap transaction. So maybe another kind of interesting hook that we designed is there was this paper that, you know, Dan and Paradine put out a while back called T-WAM, which stood for a time-weighted average market maker. long kind of don't want to go way into the complexity and the weeds of it. But essentially, when you think about a uniswap pool and people who want to make very large orders, you know, very large orders, if you're relative to the size of the pool, you're going to get a lot of price impact and you'll get a worse price. And so usually when you have to make a very large order, if you want to trade it over at Uniswap, you know,
Starting point is 00:25:19 you would probably want to break that order up into many pieces. and you'd have to submit a separate transaction, you know, you know, span over multiple blocks. And that kind of like reduces the sort of price impact of your trade. And, you know, TOM is this idea of essentially creating long form orders on top of AMMs that would basically split up into little pieces and could execute over time. And you could have them happening in both directions. And it's sort of reducing the price impact of a trade and spreading it out over a long period of time.
Starting point is 00:25:47 So you could imagine like sell one million USDC over the next day or over. the next hour or the next week. And this is a really interesting, cool feature. And to do it properly, you can build it externally, but to do it properly and have it really benefit from the liquidity within the protocol, then you actually do need to have it, you know, run at specific points in, you know, you need to sort of guarantee that it's going to run before, you know, before swap to happen or before people add it or remove liquidity to properly do the accounting.
Starting point is 00:26:18 So you can build this entirely as a hook. And we think this can be really powerful. for, you know, one example is for like protocol treasury rebalancing, stuff like that, you know, or just generally large orders. And the nice thing is that it, you know, it executes your order of a very long period of time, but you only pay, you know, the gas costs at creation and closing of the order. Those are two examples. So the point is it spans from like, you know, customization of pool parameters, like the fee, like how fees work, which, which can be really interesting and meaningful and actually change the economics of a pool. You could try to have a pool
Starting point is 00:26:52 that favors passive liquidity providers more than active liquidity providers if that's what you want to do. But it also ranges to like entirely new order types like TUM and limit orders. Have a few other ones I'd be excited to talk about as well. I definitely want to unpack every single one, but I really just want to double down on the emphasis that this new hook feature inside of V4 pools brings to the table with regards to developers. So just going back to the fees hook example where right now Uniswap v3 has, you said, four fee tiers. I believe it started as three, then Uniswap governance invoted in a fourth. And so these are four fee tiers that a Uniswap V3 pool could be created under.
Starting point is 00:27:37 And like you said, the reason why only four is because we need to coalesce liquidity under shelling points, right? Just pick four of these. Don't like 10 is too many. One or two is not enough. but we need to have convergence of liquidity upon specific pools in order to have any liquidity at all. And you said that, well, we were interested, Uniswap Labs or Uniswop in general was interested in making a more dynamic version of fees that would be more flexible to incorporate wider ranges of fees based on certain parameters. But you all didn't want to create that because that was an opinion.
Starting point is 00:28:11 And you didn't want to make that as a part of a core V3 contract. But now, with hooks, we could have some one or some green. group of people create that logic for what is a flexible and adaptive fee structure for most types of uniswap pools. And that could become the new shelling point of the new standard. And so I'm assuming like over time certain hooks, certain apps, uni apps, uni widgets will be developed in public with many, many people. And one or a few will emerge as like the leading hooks for generalized fee tiers for Uniswap v4 pools. Or this is the leading, most incorporated,
Starting point is 00:28:56 most hooked in feature, most hooked in hook for on-chain limit orders. And this is now the on-chain limit order hook. Because this is now no longer being developed internally to the protocol, this is now developed externally as a part of like just building on permissionless open-source rails. And so like a lot of this complexity of how to make, a flexible, adaptive uniswap v4 pool is being pushed to the margins and allowing the shelling points of what are good hooks and what are good uniswap features to be kind of
Starting point is 00:29:26 determined by the free open source market. Is it my own track here? Yeah, exactly. I think, you know, we've definitely, I've definitely trended in my own, like, thinking, you know, just seeing how it plays out towards just more expressiveness, more flexibility over like super constrained shelling points. I think shelling points are really valuable, but I think that the shelling points will happen over the best designs. I will mention that there is sort of this, there are like a few other features of V4 that blend really nicely with hooks that I just want to quickly mention that help, which is like, so the other kind of kind of core feature is a bunch of architectural changes to the contract that we're calling Singleton and Flash accounting, which essentially are aimed at significantly reducing the cost of fragmentation across many pools and making it much more efficient to route across.
Starting point is 00:30:15 many pools. So we're, you know, we're entering a world of many more pools and pool designs. And what we're trying to do is, you know, say for pools within this uniswap, within the uniswap ecosystem, can we, you know, significantly reduce the cost of fragmentation and make it easier to route across more pools more efficiently. So the singleton design essentially is saying it, you know, basically has all pools live in a single smart contract. And Flash accounting is just a new way of doing some of the logic that basically makes it easier to, you know, right now when you make a trade that executes across many pools, it's basically like sending tokens between pools, and it has like a very opinionated order of operations. And the core idea of flash accounting,
Starting point is 00:30:59 kind of like the way flash loans allow you to like take whatever you want and then do everything you want, and then as long as you've paid it back at the end, unit swap V4 actually lets you basically like do anything you want across any number of possible order, you know, transaction types within all you to swap pools, as long as across all of it at the end, it's like, you know, it's sort of reconciled and solvent, and then only transfers net balances in and out of the pool. Or actually, you don't even have to transfer it in or out of the pool, but that's another little feature that we can come back to. But the general point here is that like hooks introduce much more expressiveness, many more
Starting point is 00:31:33 different pool types, and, you know, singleton and Flash accounting basically just make it, you know, more efficient to route across more pools at once. And also I think that the one other thing that I'll note there is that, you know, today there's sort of a cost to fragmentation across AMMs that's sort of imposed on the space. You can think about like the more AMM pools exist and the more places. There's like gas costs to constantly be arc. There's like sort of like, you know, Ethereum only has so much capacity to some degree. Obviously it's like a, and basically there's like, you know, a cost to constantly arbing across all the different AMM pools. And there's also a cost to splitting your orange.
Starting point is 00:32:11 or across more pools. And so one of the nice sort of things about Unswap v4, most like as a platform, is that if you build your custom AMM logic within hooks instead of externally, you actually get to benefit from this sort of like shared contract pool model, which will mean that, you know, building your innovations within Unswap
Starting point is 00:32:32 will actually lead to more efficient routing across everyone else building within Uniswap. And it's sort of like a nice network effect and benefit to doing that. Okay, I want to pull, two things out of this hidden. So the first is when we talk about Uniswap V4, we're talking about a specific set of features.
Starting point is 00:32:50 One is hooks, which are going to spend even more time on, I think. Another is Singleton, which you mentioned, and Flash accounting. I wanted to go back and talk about this design philosophy where you're saying with Uniswob v4, you guys are trending towards more expressivity, which is very interesting, because this is kind of counter to the reason
Starting point is 00:33:10 you picked those four different or three different fee tiers for uniswap v3 pools. Then really the idea was so that you don't lose like liquidity, right? So there's not thousands of different pools out there and you're kind of like spreading your liquidity too thin across all of those pools. I think what you're saying is because there are some incentives or benefits through singleton and through Flash accounting, that's sort of, there's almost like a tax, like a non-explicit protocol tax, but like an efficiency loss type tax native to uniswap that will still collapse towards a small, like, more shared liquidity. I guess what I'm trying to ask is, why are you no longer concerned about, like, the thing that you were concerned about in uniswap, uniswap v3, which is like, well, if we're creating the
Starting point is 00:34:08 opportunity and the white space for all of these different pools, we just lose the network effect. We lose all the liquidity, and there will be no shelling point in a specific set of pools. Why is that no longer concerned? Is it because of Singleton Flash accounting and kind of still the inherent efficiency that you gain here? Or like, why the change in rationale here? So I should quickly clarify. There's not a tax.
Starting point is 00:34:31 There's actually a benefit. Basically, if you build, you know, your sort of custom AMM as a hook, within the uniswap singleton contract, then it is much more efficient to route it with other uniswap pools than it is to route, you know, say between like uniswap and an external AMM. So, you know, generally most people are trading, like, right today when you trade across multiple pools, there is sort of an inherent tax to trade across multiple pools. And what we're doing with singleton in flash accounting is essentially reducing that tax significantly when you're trading within the uniswap ecosystem.
Starting point is 00:35:06 So it's all carrot, no stick, is the way. Yeah, no stick here. It's all carrots. We're basically saying, you know, yeah, if you build an entirely separate AMM, then there is going to be an ink, then a trade that sort of splits across, you know, Uniswap and this external AMM will have a higher gas, you know, has like a higher gas cost, similar to how it does today, right? It's not, it's not, there's no stick on that either.
Starting point is 00:35:28 But if you build your custom AMM within Unswap as a hook, it actually is more efficient to route. And that happens because of essentially this like, you know, all the, are stored in the same contract and we have, you know, cool ways of doing some of the accounting logic and even, you know, transient storage, which is in the next Ethereum hard fork, kind of plays a little bit of a role here, where we're using transient storage to more efficiently, you know, update internal balances and save gas there as well. But no, it's really purely a benefit. In terms of like liquidity fragmentation more broadly, I'd say that I still believe like shelling points will kind of will exist.
Starting point is 00:36:06 and there's even like ways to helping encourage that through like interface and default and all of that. But I think that what we're also starting to say is that, you know, yes, shelling points will exist, but also this innovation is going to happen. Let's make it, let's have it happen as safely as possible. Let's have it happen, you know, within the Uniswap ecosystem. Let's, you know, let's speed up the rate of AMM innovation and allow showing points to form around some of the best designs as opposed to, you know, to just around like uniswap as a monolithic thing. I'd also mention that like some of the network effects are really just like, you know, infrastructure that we built, that us and other teams build around the protocol. And I think that having them, you know, all, having more stuff built into EBS124,
Starting point is 00:36:50 like there'll still be sort of this network effect of tooling and, and integrations. And to some degree, even like the like the security and safety of it, a cool thing is that like when you're building an entire custom AIM, that's a really complicated smart contract, you kind of need to audit the entire thing from scratch. And with hooks, you know, you need to audit the hook, basically the, you know, it kind of like the same way that Ethereum lets you build, you know, safe smart contracts that doesn't prevent you from making unsafe smart contracts. You know, it's similar. I think of a similar thing to hooks where hooks make it, you know, possible to build very safe custom pools that have very limited, you know, functionality.
Starting point is 00:37:26 Very, you know, a hook that changes how fees work is very different from an entire AMM that changes how fees work in terms of like your starting point. and how easy it is to build, how fast you can build it, how easy it is to audit, et cetera. And so, you know, all carrots here, we're trying to make it, you know, as safe and easy to innovate. And then the point being really just like, we're also trying to, you know, we do expect there to be some additional fragmentation, but we're all, but we still expect showing points to happen and we still, and we're basically take, the cost of fragmentation is being significantly reduced, not increased.
Starting point is 00:38:06 So there are some really strong parallels between Uniswap v4 and the Ethereum roadmap. I see the parallels here. I'll call this like a hook-centric roadmap for Uniswap, whereas Ethereum has its like roll-up-centric roadmap. Uniswap has now a hook-centric roadmap. And I want to get to that conversation, but I think we need to start there with the Singleton contracts, the Singleton design.
Starting point is 00:38:31 Uniswop V3 and V2 and V2 and V1, I believe. all had this thing called a factory contract where uniswap pools, uniswap exchanges were spun out individually, and they were all separate contracts. So if you made a new token and then you made a uniswap pool to correspond with that new token, that is a brand new smart contract on Ethereum that is the same contract as like the USDA Ether unit swap pool, but it's still a separate contract. And so a singleton contract is something that's the opposite of that. Can you just unpack that a little bit more, Hayden?
Starting point is 00:39:05 Like, what does it mean for everything to be under one contract? Yeah. So, you know, what it means is that we're duplicating the same code across a million different smart contracts, and that has a cost to everyone. And so, you know, one cool thing about the singleton design is it actually reduces current estimates have it reducing the gas cost of pool deployment by about 99%. Wait, wow. Yeah, so it goes from like, gas costs vary a lot, but, you know, you could imagine. Sometimes people pay when gas costs are high, like north of $1,000 to deploy a pool just in gas cost.
Starting point is 00:39:35 And that same deployment would be something like $10. Because we're just updating a pre-existing contract. Yeah, most of the code isn't being replicated. It's just like adding a little thing. Like, you know, making a little modification to an existing contract, it's not deploying an entirely new smart contract. So gas costs for deployments go down massively. That's sort of like one of the advantages. there were designs that actually did reduce the gas cost for V3,
Starting point is 00:40:02 but in ways that slightly increased gas cost for swappers. That was sort of like this design a lot of people use where you call out into like a library contract. But that's sort of like one of the benefits of Singleton. The other benefit is that when you can imagine like transactions that interact with multiple pools and have multiple interactions with multiple pools. A lot of what they're doing is they're updating like the same, you know, you can imagine like let's say I'm doing like a multi-hop swap I'm going like ETH to die to
Starting point is 00:40:33 USDC or something that actually involves like you know routing Ethan to the ETHI contract and die is sent from the die ETHI contract to the die USTC contract converted to USTC and then USDC sent back to the user when you have everything stored in the same contract those internal transfers don't actually need to happen right there's sort of like ephemeral and uh Ethereum already today has a method of basically if you are updating it. So one thing is that there's basically like less transfers happening under the hoods when you have like multi multi step transactions or transactions about between many pools. Ethereum has like this thing called a gas refund. It's super technical under the hood stuff. But might as well for those who understand us
Starting point is 00:41:17 mentioned it quickly. Ethereum has a thing called a gas refund, which basically means that if you are updating, you know, something and then you know, the same thing. multiple times is cheaper than basically, you know, updating different things because, you know, that's easier on an Ethereum note, essentially. And we'll get out of the weeds in a second. But there's the refund has like a cap. So basically there's like a limit to like, if you update the same thing like a thousand times, like the refund sort of runs out and then you basically don't actually get any of the refund. So there's this new proposal called transient storage, which is for the next Ethereum hard fork.
Starting point is 00:41:58 And that provides additional benefits where you can actually, you know, save on gas for for things that are, you know, updating the same contract multiple times, well beyond this sort of refund, which was capped out at 20% of the sort of gas provided to the transaction. So there's sort of like additional gas savings kind of like on the forefront of the next Ethereum upgrade, which is kind of exciting. Am I misremembering that? Was there some controversy about this particular Ethereum upgrade at all? or like, you guys refresh me on that.
Starting point is 00:42:27 I think that, like, there was a desire. I think that it was like a very, it's like a very obvious. I don't think there's any controversy around like the proposal itself. It's like technically very sound and like there's no real controversy around it. I think that there was like a strong push to have it happen in the previous hard fork, which which didn't happen in part because we thought it was like an obvious win for developers. There's many other projects that also want this and want to build on top of it and have come out in favor of it. And, but, you know, it ultimately didn't make into the previous Ethereum hard fork because there was, you know, that was the, there was a lot of other things happening in that hard fork.
Starting point is 00:43:00 But it was sort of very non-controversially added to the most recent one because, you know, it's very far along and it's not competing with the merge. And so it's, yeah, you know, it was kind of a little bit of like a day of drama on Twitter, but it wasn't really like, at this point, it doesn't feel controversial at all. So I want to see if I can get bankless listeners' heads dropped around this pattern. that I'm seeing with Uniswap, and this again goes back to the whole, like, hook-centric roadmap for Uniswap. So a while ago, a long time ago, Ethereum's long-term vision came to be defined as, like, this roll-up-centric roadmap, aka, like, roll-ups are going to be treated as a primary concern for Ethereum's design philosophy.
Starting point is 00:43:42 The, just, the Ethereum researchers came to the conclusion that roll-ups are, like, the ultimate form of expressive apps for Ethereum in terms of scalability. And so the idea was that Ethereum would constrain the layer one, push complexity to the edges using roll-ups. And this became like the modular Ethereum design philosophy. The Ethereum layer one does not need to be concerned with doing it all. And that role can be pushed to the open source community, building permissionlessly in the free market, which is why we have so many roll-ups teams building different roll-ups scaling strategies, Polygon, optimism, Arbitrums, ZK Sync, you know, scroll, Tyco, all of these crazy things.
Starting point is 00:44:22 And the only reason why all of these Ethereum microcosms exist is because of the primacy of the roll-up-centric mode map for Ethereum. I see that same pattern playing out with Uniswap. So I think I want to check this metaphor with you, Hayden, make sure this is right. But I think Uniswap V2 and V3, where we had this deployer contract, this factory contract, that spit out new Uniswap contracts that were all disconnected to each other is like the cross-L-1 bridge
Starting point is 00:44:54 version of layer ones, whereas the Singleton contract is like the Roll-up Centric roadmap for Ethereum because everything is placed into the Singleton contract. Everything is under one platform. There is a very constrained, reductive base, call it Uniswap V4 pools, and then there's hooks
Starting point is 00:45:14 hence the hook-centric roadmap for un-swap. These are my words. I don't know if Hayden accept these words. The hook-centric roadmap for Uniswap places complexity back into the base of Uniswop v4 via hooks. And hooks are freely developed in public. They are highly generalized
Starting point is 00:45:31 for all public pools to use, or they can be pool or use-case-specific, kind of like roll apps or app chains, but we can have hooks that are just meant for one or a few pools, or we can have hooks that are generalizable. So now we have modular Ethereum, and now we also have modular uniswap. Hayden, do you accept this metaphor? Would you throw any flags?
Starting point is 00:45:52 I accept the metaphor. You know, I think that definitely, like, we are definitely going to like modular, customizable uniswap. And I'd say that like, it's not as like Ethereum, it's not turn complete the way Ethereum is. Right. But it's much more expressive. And it's, you know, if you have like a, like a gradient of turning completeness, it is more turning complete than univiswapvee, too.
Starting point is 00:46:11 it's more expressive and really you can do a lot of things with hooks and we are definitely pushing complexity to the edges we're definitely you know encouraging a world of other people to try like there's no clear single way to best way to scale ethereum and so Ethereum is you know allowing other people to experiment with the best way to scale Ethereum and you know I'd say that you know very similarly there's no single best pool design we're enabling a whole world of experimentation so definitely like the metaphor lands for me in that way for sure I'll also mention just casually not don't want to open a whole can of worms with this, but like technically Uniswap is also on a rollup centric roadmap and that we all are because
Starting point is 00:46:50 Ethereum is on one. And so I think that that's definitely like an avenue of future exploration, but sort of like kind of parallel to V4. Hayden, while we're on rollups for a minute, can you also describe Uniswap's approach to all of the various rollups? I know that's kind of orthogonal to our conversation today about Uniswap V4. But will Uniswap have a presence on all roll-ups or how does that work? Yeah, I think that, you know, like, we're all on this roll-up-centric roadmap journey in Ethereum right now.
Starting point is 00:47:25 And I think that we've been, you know, to date it's really been about like supporting the roll-ups, you know, on the protocol level, it's, you know, there's been this whole process around governance and people are, you know, doing votes to deploy different chains. But within labs products, we're kind of like supporting chains as there are like, you know, ones that are have users and it's like almost like worth the time to do the work. And it is a lot of work to support new chains in our products. But yeah, so it's really a bit about like just making sure that uniswap is on all the chains that get traction and have usage. And Uniswap v4 would be on all the chains. And yeah, Uniswap v4 similarly would be on all the chains. In terms of like if there's a future like world where there's like a unswap specific roll up or something. like that. I think that sort of like remains to be seen. I think it's like a really interesting
Starting point is 00:48:11 avenue of exploration. You know, the sort of whole, like, I'm personally excited by like some of the like op-chain vision and all that stuff. But, um, and you know, as I mentioned, we're kind of like all on this roll upcentric roadmap. There's no like getting off it because Ethereum's on it. Sometimes I think that people almost don't even like internalize everything that that means. But yeah, it's, it's a, it's a pretty cool interesting direction for Ethereum. I think that maybe what I was getting. I think that there's like a lot like scaling execution is actually pretty hard and there's like it's going to I think take I think it like kind of makes sense that Ethereum pushed that to the edges but I think that sometimes people almost like underestimate how much that work there is to do on the roll-up side
Starting point is 00:48:52 and how many like how big of an effort that is right it's kind of like in the long right maybe it's like more of an effort than like building Ethereum itself to like build the right roll-ups on Ethereum. Anyway. Yeah I completely agree. I mean part of modular Ethereum in the Rydmac roll-up-centric design roadmap was obviously focusing Ethereum on what it does best at the core and the consensus layer. But also, I mean, some of these problems are complicated. They're complex. They're thorny. And so nice to push them up to other teams rather than have the Ethereum research team sort of do everything. I don't know if that's similar to strategy with hooks. But I think that like, I think it like it both makes sense, but like there are like implications to it. Right. Where like
Starting point is 00:49:37 The more you push to other teams, like the less, like, there's sort of like, there are sometimes benefits of working at multiple layers of the stack. It's something that we've learned a lot at Uniswap is like, are even like working, like having a mobile wallet and having like a smart contract team and a protocol. Like having sort of working multiple layers of stack where you're like able to kind of like sort of innovate across the stack a little bit. And like, you know, there are things like, like, like, even like it came up in this conversation where like EIP 1153 is like provides very significant benefits to Uniswap V4. And that required like, it was sort of like already a proposal that happened many years.
Starting point is 00:50:10 The initial proposal was like before the V1 launch. So this idea has been around for a long time. But like it's sort of like this like sometimes there's like a, if you don't have the right like layers of modularness or in like some like, if you don't have enough expressiveness in each layer, like then like you sort of can run into like constraints of the system in which you're building. So like that's a risk of hooks. It's a risk of Ethereum's roadmap.
Starting point is 00:50:35 But it's also like, ultimately, you know, it kind of makes sense as well. I get it. It's definitely a trade-off, though, right? It's like I was thinking of Vitalik's most recent post where he talks about the three transitions, by the way, where he talks about kind of everyone moving your roll-ups. That could be a massive transition for Ethereum that everyone has to move to smart contract Wallace and we have to somehow figure out how to get privacy working. There is something nice about the monolithic vision because you can control all layers of the stack.
Starting point is 00:51:04 And so like what gets, what gets sacrificed or maybe tradeoff is the right word for this in a modular kind of structure is user experience sometimes. It can be difficult to weave this all together, whereas Monolithic has other challenges, but you have the opportunity to get kind of user experience down. But let's get back to kind of the hook-centric roadmap for Uniswap. Who's going to build hooks? Who are the devs? Who are the builders that actually, like we know in the in the roll-up community, all of the teams building roll-ups and kind of the advantage to doing that. They want to create their own kind of ecosystems, build their own chains, lots of reasons for doing this. Who are the builders behind hooks? What will they look like?
Starting point is 00:51:47 What are they going to dream up? Yeah, there's so many possibilities. And like we only, we're kind of like constrained by like what we've already thought of. But there's like so many other, like we kind of expect maybe the coolest talks will be ones that we haven't dreamed up yet. So ones we've already mentioned are things like, you know, so obviously we've built a few hooks almost to like prove the system. So right the some of the ones we already mentioned were like T-WAM and on-chain limit orders and swap fees. I think, you know, we expect like probably one category of hook builder is like people who need, you know, basically people with, you know, projects with on-chain protocols that interface and interact with you. It's basically the people
Starting point is 00:52:25 who build on Uniswap today, but they can build on it in like a more meaningful way. So like any, any project that has Uniswap as a core component of their system, we expect that they can build what they're building in like a more efficient or more meaningful or more expressive or better way with hooks. And so that's sort of one category. I'd say that like people who want to expect, like anyone who like building an AMM today, I don't know, maybe they'll continue building their own AMM.
Starting point is 00:52:53 It sort of depends. But definitely the type of people who would go out and build a new AMM might be more likely to say, okay, well rather than building a whole AMM, Why don't I just like, you know, try it out as a hook? And, you know, so liquidity providers, I think, you know, defy builders. Is it accurate to say, you know, instead of starting your own layer one, why not just build a roll up on Ethereum?
Starting point is 00:53:15 It's the same conversation. Exactly. Is it, is it accurate to say anybody who wants to use the verb swap, you know, in the early days of bank lists, we used to talk about making all of kind of these money verbs basically, you know, real and bankless. So verbs like, you know, lend, borrow, a verb that uniswap is dominated has been trade or swap. Anyone who is sort of doing swap functionality as part of their application, whether it's some sort of aggregator, like a matcha, for example, maybe they're dealing with swap. Anyone who's working with the swap verb might have something that they can build as a hook with uniswap. So that
Starting point is 00:53:57 kind of opens the door to basically any application that needs this basic trade swap type primitive. Is that correct? Yeah, I do like to think of like the two sides of the marketplace where it's definitely like swapping and also like creating liquidity in the first place. I just forget about liquidity providers. Yeah, they're important. They're an important punch, although sometimes not talked about as much as the swappers. But creating liquidity, anyone who's creating liquidity in any way, like I'd say that like this just provides so much more flexibility in how you do it. Now, it's very possible that like certain hooks will be much, like, a few hooks will rise up as like the most popular used hooks.
Starting point is 00:54:30 You know, if I had to like take some guesses, things like, you know, some of the ones I already talked about might be examples. Like, um, so certain hooks might be like the most used and maybe like most people interact with hooks just by like adopting a few common ones that like change in meaningful ways. But then yeah, like really anyone that creates liquidity might want to create liquidity in more expressive, interesting ways, as well as like anyone building a protocol that needs swapping functionality.
Starting point is 00:54:56 Yeah, I could give like a few more examples of hooks that we've talked about and thought about or built examples of. Yeah, go for it. To help spur some of this. So I guess, you know, one example is even like, this one is more at your eyes. We don't have an implementation of it at the moment. So at any given moment for a uniswap trade, there's like, you know, Uniswap V3 split the pools up into like discrete ticks.
Starting point is 00:55:21 And then like there's like liquidity exists between. ticks, and it's almost like many uniswap pools for each split up into each tick. And, you know, we sort of theorized about, like, the idea of, like, vaults that stored out of range liquidity and lending protocols, and it would sort of, like, pull them out and when, as a trade got closer. But that wasn't super easy to do in uniswap v3 because you don't sort of have a guarantee that you can pull liquidity out of the lending pool before the trade, you know, crosses a certain price, whereas with uniswapv3, you actually can.
Starting point is 00:55:53 before, you actually can using a hook. And so an example is just like increasing your yield where like all liquidity that's not stored in the current tick could be stored in a lending protocol and earning whatever it's earning. And then as the price crosses out of the tick, just in real time could pull the liquidity out of the lending pool and start trading into it.
Starting point is 00:56:12 And in that way you don't actually have to like, there's sort of like the risk in V3 if you do it externally that like you don't pull the liquidity in time and it sort of gets like, you know, rebalanced in a way you weren't expecting or something, if you were to try to do something like that. So, like, increasing your yield by building a thing that, you know, stores extra liquidity lending pools,
Starting point is 00:56:32 but does have a guarantee that it will be executed at the time of the, that it will be, you know, included in the contract at the time of the swap. It's, like, one pretty interesting idea. We haven't built this, but we know it's possible. I think this is an interesting class of designs that might come up. This might, like, you probably most of these will, like, use the swap fee hook. but just like attempting to internalize MEV better for liquidity providers. You know, there's sort of like a lot of, uh, liquidity providers, a lot of like value is,
Starting point is 00:57:02 kind of, um, like, there's sort of, you know, people always talk about MEV and how do we like kind of keep more of that for our swapers or for our LPs. And I'd say that like, there are definitely classes of hooks that can attempt to do that, whether by like, adjusting the, the swap fee in real time or proportional to size of trade or whatever it is. You can, uh, you can even do things like auctioning off like, like basically allowing people to like, You could almost do like a harborer tax or something for all fees in the pool. And so basically it's like kind of like, like again, this is like sort of theoretical.
Starting point is 00:57:29 We haven't built this. We haven't like proven it. But these are sort of like general places our brains have gone. It's like you could allow basically anyone to set the fees for a pool and they could pay liquidity providers for that right. And then you could imagine in that way like, you know, the MEV is sort of internalized to some degree by like properly setting the fees and paying it out to liquidity providers. So those are like maybe two even like kind of more complex examples. But I think just like there's like so many different kind of ideas and designs in the AMM space. People are always talking about them.
Starting point is 00:58:05 We're always having them. But today we like, it's never worth it to build it because it's like we can't bet. Like we can't build the entire next version of the protocol around one of these ideas. They're just interesting ideas. Oh, I'll mention another category of hook that exists is actually potential withdrawal fees as a hook as a hook as well. also fees take, today fees are only taken on swapping. In v4, it's actually possible for hooks to take fees on adding and removing liquidity, which is, and could like sort of redirect those back to LPs.
Starting point is 00:58:34 And so in that way, you could kind of like, for example, like have like, you know, more, the more active a liquidity provider is, like, maybe like, you could sort of like have some of those, more of those fees go to passive liquidity providers and maybe passive liquidity providers would be more willing to provide in those pools. those are like sort of like some kind of additional examples. I think that there's like so many though. Any project that needs an Oracle probably will be tempted. I think that like even V2, like V2 and V3 oracles, they weren't just like opinionated.
Starting point is 00:59:04 There are also weaknesses of them because they were they were like opinionated in that we implemented them. But they were kind of like trying to be very neutral in what they were because they were trying to serve all possible oracles. But that's not very, you know, maybe the best Oracle is removing outlaw. removing outliers and doing on-chain medians and all these other things. And so anyone that wants an Oracle now, you can actually build your Oracle into a pool and you sort of have a guarantee that that Oracle is like, that that pool is like tracking. It's sort of the difference between like a, you know, you could build an Oracle external to a pool, but that pool can only like read from the pool at moments where it is like asked to do so.
Starting point is 00:59:44 Versus when it's in a hook, you have a guarantee that that Oracle can be updated at every swap or at every provide liquidity or at every interaction with the pool. And so you sort of have a guarantee that that Oracle can always be super up to date. And so, you know, you think of it as like any contract that needs to be updated with, you know, any specific type of interactions with a UNICEP pool can now be fully up to date. And sort of kind of it doesn't need to rely on like being poked externally by people, which is like kind of interesting. Learning about crypto is hard.
Starting point is 01:00:18 Until now, introducing Metamask Learn, an open educational platform about crypto, Web3, self-custody, wallet management, and all the other topics needed to onboard people into this crazy world of crypto. Metamask Learn is an interactive platform with each lesson offering a simulation for the task at hand, giving you actual practical experience for navigating Web3. The purpose of Metamask Learn is to teach people the basics of self-custity and wallet security in a safe environment. And while Metamask Learn always takes the time to define Web3 specific vocabulary, it is still a jargon-free experience for the Crypto-Curious user. Friendly, not scary. Metamask Learn is available in 10 languages with more to be added soon, and it's meant to cater to a global Web3 audience.
Starting point is 01:01:00 So, are you tired of having to explain crypto concepts to your friends? Go to learn.menomask.io and add Metamasklearn to your guides to get onboard into the world of Web3. Hiring people worldwide, paying them in crypto, providing them access to benefits, it all so complex. But it doesn't have to be. Complying with labor laws, payroll rules, tax obligations, and crypto regulations in every country that you employ someone is difficult, time consuming, manual, and costly. And it's drawing more and more attention from regulators and governments. But there is good news. Toku is here.
Starting point is 01:01:33 Toku is the first employment and compensation platform for the crypto industry that makes this easy. Toku helps you hire employees or contractors and pay them in fiat or crypto legally, compliantly and with all the taxes handled in over 100 different jurisdictions. So whether you're an early stage company with just a team of two or you're an enterprise with 200, Toku has a solution that meets your needs. Toku is already working with the leading companies in the space, Protocol Labs, Hedera, Gitcoin, and many more. So transform your employment and token payroll operations with Toku.
Starting point is 01:02:04 You can reach out to Toku at Toku.com slash bankless or click the link in the show notes. Introducing ETHX from Stater. ETHX is a liquid staking token designed to maximize rewards, all while securing Ethereum. With Stater, you can run an Ethereum node with just 4Eath, an 85% lower capital requirement versus the 32 ETH required for solo staking. With Stater's 4-Eth nodes, you can get a 35% average higher yield, since you charge fees to those who use your node to stake their ETH. By running a node with Stater, the ETHX staking derivative token can get minted on your validators
Starting point is 01:02:37 and can flow into the world of Defy, which Stater is actively building integrations and partnerships into to increase the utility of ETHX. Stater allows for both permissioned and permissionless nodes to join the network, maximizing its potential scalability for ETHX, while preserving the values of decentralization and openness behind its liquid staking token. Go to Stater Labs.com slash ETH and sign up to get access to the Stater Staking Protocol. Arbitrum 1 is pioneering the world of secure Ethereum scalability
Starting point is 01:03:04 and is continuing to accelerate the Web3 landscape. Hundreds of projects have already deployed on Arbitrum 1, producing flourishing defy and NFT ecosystems. With the recent addition of Arbitrum Nova, gaming and social daps like Reddit are also now calling Arbitrum home. Both Arbitrum 1 and Nova leverage the security and decentralization of Ethereum and provide a builder experience that's intuitive, familiar, and fully EVM-compatible. On Arbitrum, both builders and users will experience faster transaction speeds with significantly
Starting point is 01:03:34 lower gas fees, with Arbitrum's recent migration to Arbitram's. Nitro, it's also now 10 times faster than before. Visit arbitram.io where you can join the community, dive into the developer docs, bridge your assets, and start building your first app. With Arbitrum, experience Web3 development the way it was meant to be. Secure, fast, cheap, and friction-free. There's something that you said that I just want to double down on because it just gets me really, really excited. You said that you and other people at Uniswap Labs, and I'm sure just anyone that you talk to about nerd stuff about uniswap like all of these ideas of what could be placed into a pool
Starting point is 01:04:11 uniswap v3 would could didn't have a way of receiving those ideas and so every time like y'all are having your like surreal futurist daydreams about what a you know a crazy uniswap v4 pool could be i'm just i'm just bullish on the fact that uniswap v4 can actually receive those ideas now because whereas uniswap v3 was constrained in its ability to accept expressivity uniswap v4 can now start to get like pretty crazy and pretty weird and so that makes me bullish well that's what's interesting exactly that's that's interesting about this hayden even though the word choice that you're using you're calling these things hooks as opposed to like maybe widgets or as opposed to like apps or something like that and
Starting point is 01:04:54 i guess look i you know i'm not a programmer i'm sure the the term hooks is used all in all sorts of of other places. They are I'm familiar with it is, you know, in CMS platforms like WordPress, right? Which is like, and WordPress is this kind of ecosystem where anybody can kind of create a hook in WordPress. And like hook is not like it's not a specific app. It implies kind of openness. It implies permissionlessness. It implies anyone can develop it.
Starting point is 01:05:25 And it could, it's broader than an app. It could do something very small, like implement a CAPTCHA service on WordPress, or it could do something very big, like implement an entire feature set on top of WordPress. So I'm curious what other, like, maybe an analog to this in another developer ecosystem. Why did you use the term hook rather than app or rather than widget or something else? I mean, I think you nailed it. like beautifully said, I think it's like, you know, it's, I mean, part of it is it's like moments at which the contract, like, it's not, it's sort of like kind of a moment where the contract can like call out to another. Like it's sort of like, there's sort of like moments where you can like inject code in an arbitrary point. And Hux just felt like a good kind of moment for that versus like a widget or an app sounds almost like marketing or like branding. This is sort of more like, you know, a low level code base kind of feature. So that that's part of it. I can mention even like something here quickly on like the history of how, we came up with hooks. I don't remember actually specifically who. Like I like it sort of has been an idea that's been in our brain for a while. But it came out of this idea that we had had.
Starting point is 01:06:36 This was before v2. One of the features we were considering in v2 was a external contract that basically had the right like sort of first back running rights to the to every trade. And what I mean by that is like, you know, when someone is making a trade that moves the price from away from from the market price, you know, away from the market price, there's sort of like a backrunning kind of opportunity. And, you know, giving backrunning rights to, to, if, if you are sort of like auction off those back running rights, then you can sort of give, you know, some of the, the profit back, like, you can basically reduce the kind of price impact of a trade. And this is sort of a design space that is still very relevant today. You hear the flash
Starting point is 01:07:19 bot's team talking about it. You hear, you know, it's something that people talk about at the, when they talk about like intense, right? It's like, like, how do we kind of reduce MEV? And so we had this sort of, you know, general concept of like, what if at the very end of every uniswap v2 swap, it arbitrarily called a specific contract? And that specific contract had, you know, was able to, if, you know, with preset prices built in the contract,
Starting point is 01:07:43 would be able to kind of like trade back in the other direction and then like reshare some of those profits back to the swapper. And, and then maybe like you'd sort of like auction off that, that external contract. We called this idea like Trader Dow or something. It's sort of an idea in the back of our brains for like, you know, literally since before V2 launch. And, you know, I think that's sort of that like the idea of that feature where it's like
Starting point is 01:08:08 at the end of every swap do this. And then we sort of ran into that pattern again with the oracles where it's like, like at the beginning of every swap, if it's the first swap of a transaction, if it's the first swap of a block, then update the Oracle. And we start to realize there were like over multiple points. within the transaction's life cycle where you wanted to do arbitrary things sometimes. And so that's sort of like where hooks came from. It's like it came out of this idea of like, oh, there is a time in a transaction's lifecycle
Starting point is 01:08:35 where it's useful to like immediately execute some other code and not allow any other code to execute before that code. So that's sort of like where some of this like comes from historically. And now those ideas like the Trader Dow idea that can be implemented as a hook. Yeah. Yeah, exactly. And like maybe it was a good idea. maybe it wasn't. You know, it's sort of like a, you know, 20.
Starting point is 01:08:55 Now we can find out. Like 2019. Yeah. I think that like even if we were doing it today, we'd probably do it very differently from how I just described it. But like, yeah, you know, now we can find out. Now we, like anyone can run, you know, an experiment in AMM designs, much faster, much more easy.
Starting point is 01:09:13 So super, super exciting. I'm just going to put on my speculative cap here. And I bet you there is a bunch of use cases. for token minting and token issuances that I'll probably not ask Caden about, and I'll just leave that to the imaginations of the listeners, that there's probably a way to do a token issuance with this as an app on Uniswap that is developed by the open source community. Hayden, I have a hook.
Starting point is 01:09:40 We should say. As a hook, as a hook, yes. Right. I have a question about some of the bigger pools. So it makes, you just swap V4 with specific hooks, that do specific things, sounds like from the individual developer standpoint, awesome.
Starting point is 01:09:57 As an I can do cool new things that I was never able to do before. But some of these bigger pools in Uniswap V3 have a ton of liquidity in them, like the diether pool, the USDA ether pool. And if we are assuming that we can make a better V4 pool for these very large V3 pools,
Starting point is 01:10:15 we're going to actually need to get that liquidity to migrate. And it's an open, interesting question as to like, how do we determine what who decides what the best USDC ether pool is on uniswop v4 and how do we even have like a shelling point of like hey uniswap v3 liquidity go to uniswop v4 it's better now how do you think we're going to get this to progress like how do you think we are stuck inside of some some pools are stuck inside of unoswap v3 forever how will we get migration to happen do you have any thoughts on this by the way i remember being really worried about this with v2 and i was like well how are they going to get all the liquidity to move from v2 to v3 Well, V2 to V3 was a paradigm shift in liquidity expressivity. And to me, that made sense because of concentrated liquidity. With this one, I'm not, I don't know.
Starting point is 01:11:02 I don't know. Yeah. I mean, for what is for it, like the Unisox pool, the biggest Unisox pool is still in V1. And so, yeah, I think that like the answer is like a combination of things. It's like a really interesting complex topic. But like, you know, I'd say that like V1, you know, V1 almost no one uses only, it's mainly only use for unisox trading at this point, which is pretty fun. V2 still actually gets a lot of usage and new pools created. V3, obviously, even more usage, especially by volume.
Starting point is 01:11:32 Because we should tell people, just for the listener who's not familiar with how uniswap works, is the contracts never die. Once you deploy V1, V2, V3, they live forever. They're out there. Anyone can use them just as the day they were first deployed. They don't go away. So almost like a new version of Uniswap has to earn its place. in the world, earn its liquidity, has to earn its swap users, has to earn the market, doesn't it? Yeah. So I'd say that like with V3, what's really interesting, I'm sorry, with V4, I actually don't expect as fast of a migration as from V2 to V3 or from V1 to V2.
Starting point is 01:12:07 I think it will be, you know, probably a little bit of a slower migration, but that, like, the long-term network effects of the sort of gas improvements of pooling liquidity within a singleton contract. Like, basically, like, maybe the initial liquidity pool. in V4 will really be like specific use cases that need a, you know, a U-Swap V4 hook. But the more of those that start to get created, the more liquidity that starts to get, you know, in this Singleton contract, suddenly, like, you can create an identical pool. Like, you could make the same trade-offs V3 did in V4, and, you know, you'll now have more efficient routing against other V4 pools. And so I'd say that, like, over time, this sort of like shelling point of the Singleton contract and the benefits of pooling liquidity will win out.
Starting point is 01:12:48 And so I do expect like a slower migration relative to V2 just because it's like more complicated. There's more things happening. There's like it's a bigger ecosystem. V3 is like extremely efficient relative to V2. There are a bunch of other improvements to UNISOP in UNICEFB4 that I haven't mentioned yet, which might be a good now might be a good time to mention some of them. Because I think that they get at some other kind of reasons to migrate. Still kind of relating to like gas efficiency and shilling points.
Starting point is 01:13:18 I say that like, so maybe in no particular order, one interesting, so one, we support native eth pools again. So V1 had native eth. Every pair was, every token was paired against native eth. So maybe a context for, I guess, bankless listeners who don't know. There's wrapped eth, which is eth, that is a, you know, represented as an ERC20 token, and then there's native eth, which is like the native token to the network. and transferring native ETH is about half the gas cost of transferring RAPD-Eath.
Starting point is 01:13:52 But it doesn't, you know, it can't be used in certain SPAR contract patterns. They're in the name of like kind of like code simplicity. We moved to only RAPD-Eath pools because it, you know, allowed you to treat ETH and RAPD-Eth. It allowed you to treat ETH as an EARC-20 token and you didn't need like a whole separate code base for that. And so, but with Un-Swap before, we were bringing back RAPD-E, or, native ETH pools, which do provide significant gas savings for transactions that are, you know, buying and selling ETH. So that's one benefit. Another benefit is, so another kind of interesting feature that is kind of like, I'd say cute.
Starting point is 01:14:32 It's not like game changing, but interesting is you sort of allow, we actually allow, we've kind of taken the flash accounting stuff I talked about, right, which is like, oh, like I kind of can do a whole bunch of things and I only transfer some amount of token thin, some amount out, and everything that happened. in the middle can sort of be reconciled. With Unswap v4, we actually, that was almost a lie because you actually don't even need to transfer tokens in or out sometimes. And what I mean by that is that if you buy a token and your only intention is to sell it in the future, there's no reason to actually transfer that token back to your wallet. If you want, you can actually just leave it in the...
Starting point is 01:15:08 So the same way that pools are separated out by like internal accounting, you can actually leave your... your tokens you buy inside the Unswap Singleton contract and sell them later. And if you do that, then you actually don't need to pay the gas cost of transferring them out of the Singleton contract. There's still some cost of updating the internal balances, but it's lower. So there's sort of like a nice little benefit there where if you're buying a token only to sell it, you can actually have additional gas savings. So there's a bunch of these features. And actually when you add them up, if you imagine like a native Eath pool and you remove the Oracle
Starting point is 01:15:44 and you have, like, maybe you even like buy a token with ETH and then you sell it later for ETH, and you never take that out of the pool. You could imagine that across all of that there's like really, that's possible. You could have a contract that has no hooks, you know, removes the Oracle actually, so it's actually less features than V3. And using native ETH, and you actually have, like, very significant gas savings. We don't have like actual, I'm not going to say any numbers because we don't have any gas benchmarks. And not all this is, or maybe we have some, but there's still,
Starting point is 01:16:14 kind of like the code base isn't even frozen yet, so we're not ready to like, you know, be hyping up gas numbers. But the general point being like, there's actually very significant gas savings to be had here for certain use cases. And so that also, you know, could be a reason to move liquidity because lower gas for swappers means, you know, more trading volume, means more fees for liquidity providers. And so that could be another reason. I think why this feature, I think, is unique, even though it's small, but it's big at the same time. The idea of you can actually leave funds inside of the uniswap contract, it really emulates a centralized exchange, but in defy with all the defy values, right?
Starting point is 01:16:52 And so in the same way I can send my USDC or my Ether to Coinbase, I can now send my Ether and USC to the Uniswap contracts, DeFi contracts, and they can exist inside of the limbo state of Uniswap. And then if I'm a trader, I can do a bunch of trades, and then I can withdraw my crypto assets later. And the cool thing about this is that it's DeFi. There's no central custodian. It's all protocols. It's all smart contracts. There's no one I'm trusting with my funds except for the contracts themselves, except now it's on chain. And so this makes, to me, for traders, I would actually be primarily very, very interested in this because of the gas savings. Like I'm sure one of the big reasons why people still host their money on centralized exchanges, leaving it up to the trust of humans that run these exchanges, is because of the U.X and fees that are reduced in the centralized exchanges, world. But if you are able just to leave your money inside of Uniswap, be charged much reduced gas fees and have those assets ready to trade on a moment's notice like the U.S. of a centralized exchange would give you. This starts to make Uniswap very competitive with centralized exchanges
Starting point is 01:18:00 on a vector that it has never actually been able to compete before. So it's a small thing, but I'm wondering if it's actually like quite a big thing. I'm wondering your perspective on that. The reason that I'm not making it like a massive thing is because it's still like on a relative base. Like, it's like relatively cheaper, but it's not like, it's not like centralized exchanges. There's like no, you know, it's just like a spreadsheet, right? So it's like there's no gas cost to transactions except for depositing and withdrawing. Here there are.
Starting point is 01:18:26 It's just we're trying to reduce them as much as humanly possible. You know, we're trying to like reduce the costs of using defy and using decentralized exchanges by finding every gas, you know, optimization we can. And this is one of them. And so I think like the net result of all of these changes is that it is possible to have, you know, we hope for very significant gas savings, you know, all said and done. But I don't want to promise, like, centralized exchange level, you know, scaling because there's sort of like, no gas costs to it all there. Hayden, when you add all these things up, all of the features that
Starting point is 01:18:57 we've talked about today, you know, hooks being maybe kind of the bright, shiny object and one of the most interesting things out of this conversation, how order of magnitude level, how big is this change? Is this like the difference between V1 and V2 or V2 and V3 or V3, like, like how big is this compared to previous Uniswap version releases? And you guys have decided to call this four rather than, you know, a 3.5 or some kind of point release. How big is this in the scheme of things? You know, it's, I think that like kind of on its own with like just like, if you just like, if you ignore all the hooks that are going to be built, right?
Starting point is 01:19:42 It's like, you know, it's only so much better, right? Like all the other changes are like somewhat marginal. But when you like imagine it all like, but like, you know, five years from now and everything that's been built on hooks, it's, you know, my, my hope and expectation is that it is a V2 to V3 style a leap more so than like a V1 to V2, although, you know, I think that each version of youth swap has been legendary and it's in its own right. And I think that, you know, the reason that we think this should be called V4 is because we think this is like a real, you know, it's like a massive step forward. And, and, you know,
Starting point is 01:20:12 I don't, I don't know how to put multiples on it, but like I'm kind of feeling the 10x, you know. Um, but, uh, so, so yeah, extremely excited about Uniswop v4. I think it's like, has just like so much potential and it's such a powerful, you know, uh, powerful developer platform even for, for, you know, innovation and, and building, uh, on top of liquidity layer. You know, so I don't know. I'm extremely excited. Another 10x gets us to 15 trillion. I might point out. So that would be quite sizable. Well, I think the reason why this can be measured as a very big deal is it seems to be an update that allows uniswap pools to continue to update without needing another V5. And so we can have improvements to the uniswap protocol naturally or smoothly, emergently, without ever having to actually make a uniswap V5, because now this can come in via hooks.
Starting point is 01:21:06 So we're done. We found the end of the roadmap then. Well, that's what I said about V3 and then we got V4, so I don't know if Hayden's ready to make that promise. But it does seem to be like, hey, first we had analog cars running on combustion engines. And then we got electric cars that had over-the-air software updates. And this kind of feels like a transition to that. Yeah. For what it's worth, V1 and V2 each lasted a year.
Starting point is 01:21:30 V3 lasted two years. And so, you know, maybe this one lasts like three years, right? It's hard to say. I don't have like a 10x. Well, I say that like, look, we have ideas for where things could continue to iterate in the future.
Starting point is 01:21:43 I think that like probably like that, you know, this is like a huge step forward in the next one. I think like future ones have to be more like, if there are like future 10x days or whatever, they're probably like more tightly coupled to like layer two kind of roll up. Like the sort of like Ethereum roadmap and like how, you know, blockchain scale and the,
Starting point is 01:22:04 future, if that makes sense. But this feels like a really obvious huge win and next step that we're incredibly excited about. It is very exciting. And I think bankless listeners will definitely be excited about this. And as we draw to a close, Hayden, I want to ask you the question about kind of zooming out. So we've been in bear markets before. I think Uniswap very famously was born in one of the worst, the worst bear market that Ethereum has ever seen as the 2018-19 bear market when Ethereum certainly was dead. Everyone thought crypto was dead. What's going on with defy these days? I mean, is defy kind of has it peaked and it's just sort of steady incremental growth from here? Are there any big innovations left? Just zoom out and
Starting point is 01:22:56 tell me about the space because Uniswap has been one of the forefather protocols, I would say, this entire defy movement. And you've been a... a huge piece of that, Hayden. So what do you see right now? What is the future for Defi? Yeah. So I guess one place I'd start is that to me, it's less about like fancy new, like, shiny new things. I think that like at times, defy has sort of been like made about being about these like shiny, shiny objects. And to me it's really about like doing very simple things better and exposing like benefits to users. And so, you know, like swapping, right? Like we've like, like Uniswap has kind of for our entire, you know, for the past five years, right, I've been like working on like,
Starting point is 01:23:33 like how do we make swapping better? Swapping is like a relatively, like, conceptually, a relatively simple thing, right? I want to convert one to go to another and I want to, you know, and that's sort of what we've been iterating on for five years straight. And there's definitely like cool, interesting, no, complex financial primitives, but for me, it's always about like doing the simple things better. And, you know, keeping kind of doing it better until it becomes, you know, actually better, you know, until like it can provide more tangible benefits, like in the real world, right?
Starting point is 01:24:00 Like, like, how do we make it, you know, like to, I think that at times, like, we can talk about, like, oh, no one controls it and that's great. It's like, but we also need to make it, like, useful and usable and put it in people's hands. And, and we're kind of like, like, iterating our way to getting there. And so I think that, like, it's really not about, like, the sexy things. It's about, like, just, like, constant progress towards, you know, making it more, you know, making it cheaper, making it easier to use. Like, those are, like, the two. Like, like, cheaper, easier to use, like, and just, like, constantly kind of pushing on that. and pushing on that until we like actually get to a system that like, you know,
Starting point is 01:24:34 where like maybe like Un-Swap is used to, you know, let's say that I'm someone in the U.S. and I want to, you know, send money to, you know, let's say it's like someone in the U.S. wants to send money to their family in Mexico. Like, you know, ideally that should be built on D-Fi, but D-Fi isn't there yet, right? People aren't using it yet for that. And so people eventually have to be built like applications on top of it that are better. But like, there's still a lot of like, we're like in the super early days. And I think that, like, people want it to be in the late days.
Starting point is 01:25:01 People want it to be, like, you know, production use cases where, like, hundreds of millions of people are already using it. But we have to, yeah, there's a lot of work to get there, right? We're, like, still learning how to scale blockchains. We're still, like, learning how to make, like, you know, AMMs have only been around for, you know, five-ish years, like, as a technology. They're just, like, very new. And so we're just, you know, to me, like, the, you know, defy is, like, a long game of, like, steadily improving until it becomes, like, useful to more. people. And I think it already is useful, right? There are already like initial early adopters and early use cases. But, um, hey, I'm wondering if, uh, you think we'll get there, though, if, if your confidence
Starting point is 01:25:38 has wavered at all. I remember there was a time where I, you know, I, I know you, you predicted that, that uniswap and decentralized exchanges would, um, eclipse everything in Tradfi that we've seen from a volume perspective, uh, be larger than S&P and NASDAQ and all of these things combined. Do you, do you still believe that's the case? Do you think we have a chance? year? Yeah, I mean, look, I wouldn't, I wouldn't like spend every, you know, like, spend five years working on this. I'm like not even, it's like the only thing I want to work on today. So I'm like personally, like, still extremely optimistic about Defi and where it's going. I mean, like, for me, it's like, it's like, it's like, it's like, it's funny because people like look at like the last, like,
Starting point is 01:26:16 you know, if you look at the like last one year, like, maybe it's not, like, you know, only in, like a vacuum, maybe like, you know, it's easy to like be negative. But I think that like, you know, if you look at where we've come from, you know, even like a few years ago, there's just been so much growth in, you know, there's been so much like, you know, exploration of the technology. You know, there's more usage now. Even like post-FTX, you know, decentralized exchange market share has gone up relative to centralized exchange, like significantly.
Starting point is 01:26:44 It was sort of recently at like an all-time high of, you know, decentralized exchange versus centralized exchange volumes. And so we're starting to see, like, even within crypto, like more of a shift towards towards decentralization. I expect that to continue. In terms of like tradfi and to planning that, like that's like a longer, kind of a longer game.
Starting point is 01:27:04 And it's really about like, I guess to me, like I think that there are like fundamental advantages of this technology. And when we can, you know, package them up and expose them to people in like a tangible way, I think that like they'll like, you know, sort of kind of by definition went out.
Starting point is 01:27:20 But it does take like, it's not going to happen overnight. And it's not going to happen. like, you know, in a few weeks, right? It's like, it's going to take some time. But I do expect, like, kind of a steady, like, there are more people using it now than two years ago. And there were way more, and like, you know, orders, many orders of magnitude more than, like,
Starting point is 01:27:37 even, like, two or three years ago, right? So, like, you know, personally to me, like, the long-term trajectory is up and, you know, we're just, like, in the early days. And that's what it's sort of all about. And so personal confidence hasn't wavered. I do think that, like, maybe to touch on, like, a thing, like, something underneath that that was like, I do think that like when you see like, um, scam, like, like, when you see like, things like FTCS, like are discouraging to new people in the space. They are like a little bit like,
Starting point is 01:28:04 like it's, I think that like people in the space often like sort of see like, like, you sort of like, or maybe even like terror like a better example or like it was kind of like very obviously shitty to a lot of people maybe and, um, who, who are like kind of die hard early like, you know, fans of defy. Um, and so I think that like, it can be like tired. to have yourself represented by like, like, like, like, people often like just like look at crypto as like a monolithic industry. And I think it can be very hard sometimes on people in the space to sort of have like the loudest kind of worst voices in the room, sort of be the ones that people kind of like see us all as as represented. Like see as like representative of
Starting point is 01:28:44 our broader industry. Whereas I think that like the industry is is pretty multifaceted. And there's like people working on all sorts of things across the entire space. And like there's like so many incredibly smart, talented people. And sometimes they're, like, getting less attention than people who spend, you know, hundreds of millions of dollars on, you know, stadium sponsorships. But, like, they're real and they're happening. And so I think that, like, you know, I always try to encourage, like, nuance in these discussions.
Starting point is 01:29:10 Like, it's not, like, I totally, like, sympathize with people who, like, look at crypto and like, like, wow, it seems like a scammy industry. Because, like, you see, like, these, like, very high profile, you know, scams that have happened. But, you know, to me, like, the fundamental, like, it's all about like that like fundamental underlying progress towards like better technology and a better, you know, financial system. And to me, like, that is still like progressing and improving and kind of like on the right trajectory. The trajectory, of course,
Starting point is 01:29:37 is defy eating tradfai, defy eating the world. And that's certainly what you are building. And the Unswap team is kind of building with this next release. And we'll know we're close. When NASDAQ and S&P and all the large exchanges of the world start building hooks on top of Uniswap v4. Hayden, it's been a pleasure to have you on bankless. Thank you so much for joining us. Thank you so much for having me. It's been a pleasure. Hayden, as we get to action steps here, I know you've got a blog post, white paper, code base. We'll include links to that in the show notes. There are any other big action items that folks can take to kind of get involved and start doing things, maybe even starting to build hooks? Is it too early for that?
Starting point is 01:30:20 It's not like, I mean, it's too early if you want a guarantee that there will be no changes, right? So like, you know, the code base is not frozen, has not been audited, it's not been finalized. And so if you want, if you are like, I just can't wait to get my hands and I just want to experiment with it conceptually, then like go for it. If you want like a kind of more like finished platform to build on, then like maybe wait a little bit, maybe wait a few months. one thing I'll add is that like if you think that you have what it takes to you know get some code into the you know core unispot v4 code base we have contributor guidelines in the GitHub I don't think that like it's you know it's obviously still like a pretty complex code base and isn't necessarily for like super beginners to you know to do but like there are obviously like the space has so many incredibly smart talented you know smart contract engineers and so if you if you have a gas optimization if you have a feature request or a improvement, create an issue, work on an issue, you know, by all means read the contribution guidelines. Open invitation there.
Starting point is 01:31:28 And of course, we'll also include our previous episode with Hayden in the show notes as well. David, you have an action item too. Yeah, the actually launch date of Uniswap v4, I believe, correct me if I'm wrong. Hayden depends on an EIP being included. So perhaps there are some action items for the Ethereum devs to. get included? Is that correct? Or is there a different launch date for V4? I think that like the benefits of this sort of singleton and flash accounting that we think is really part of our vision for where this goes does, you know, get like those benefits
Starting point is 01:32:03 increase significantly once, you know, once this next Ethereum hard fork happens. If it, you know, so, I mean, it's possible to launch a version without it or before it or only on layer two. Is there something like that? But my, my, my, my, personal guess is that like this will happen post Cancun Hard Fork. That would be my sort of personal thought on like the best timing. I don't know if there's any action items there. It's sort of already there. Like it's kind of already slated for, you're going as fast as they can. Okay, David? It's going to happen.
Starting point is 01:32:33 For what's worth. We were, you know, we did we did. I just want another reason to wait for the cancun hard fork. Yeah, there you go. We did we did, we did do some contribution to the to 1153.53. Um, and you know, definitely like, support for it in like solidity, stuff like that also will be helpful. There you go. We got some things for action items for everyone. And I guess the main thing is during the bare market, the builders keep building. And Uniswap is certainly building.
Starting point is 01:33:01 So is Ethereum. So is D-Fi. Hayden, it's been a pleasure to have you on bankless. Thanks so much. Thank you for having me. Risk and disclaimers, Bankless Nation. Got to let you know, none of this has been financial advice, not trading advice, not swapping advice, not hooking advice.
Starting point is 01:33:15 Crypto is risky. Perhaps the building advice. We definitely would you put in. Yes, but we are headed west. This is the frontier. It's not for everyone, but we're glad you're with us on the bankless journey. Thanks a lot.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.