See all Bankless transcripts on Applepodcasts

applepodcasts thumbnail

UniswapX Revealed: A Game-Changer for DeFi

1 hours 15 minutes 52 seconds

Speaker 1

00:00:00 - 00:00:17

When I think about decentralized finance and what we're trying to achieve, we can't just kind of iterate in our small world. We have to kind of innovate and push beyond it. I'm extremely bullish AMMs as a market structure, but I think that there are also other market structures that could exist in the future, and I think we also want to discover them and have them be part of the Uniswap ecosystem.

Speaker 2

00:00:20 - 00:00:43

Bienvenue Ă  Bankless! Bankless Nation, it is that time of year again. ETHCC, the Ethereum Community Conference in Paris, France. All the teams, all the projects, all the protocols saved some of their biggest announcements for ECC, except for the ones saving it for permissionless, of course. You might remember last year, ECC was marked by the time in which 3 teams all had the first ZK EVM.

Speaker 2

00:00:43 - 00:01:16

Yeah, that was a year ago at ECC. And today, the day I'm recording this, Sunday, the day before ECC begins, we already have a massive release out of Uniswap Labs. A brand new protocol called Uniswap X, a new half of Uniswap that complements the rest of the Uniswap protocol, the yin to the yang of Uniswap's v1 through 4. Something brand new that fills in the picture of the Uniswap project. Seriously, the best way to describe this is that it's the other half of Uniswap.

Speaker 2

00:01:17 - 00:01:37

It's the half of Uniswap that is meant to make Uniswap the best place for swappers to swap tokens. Today on the show we have Hayden Adams, the day before he gives his ETHCC main stage talk, releasing UniswapX into the wild. What is UniswapX? I'm glad you asked. UniswapX is a protocol for competitive order execution in DeFi.

Speaker 2

00:01:38 - 00:01:41

Is a protocol that exists on top of Uniswaps 1 through

Speaker 1

00:01:41 - 00:01:42

4,

Speaker 2

00:01:42 - 00:02:27

as well as all the other liquidity sources in DeFi, That ensures that the market produces the best possible order execution for anyone looking to swap tokens using UniswapX. The idea behind UniswapX is that it maximally protects swappers ahead of MEV extractors, ahead of arbitrageurs, ahead of front runners, to ensure that the average Joe, who just wants to swap some tokens, gets the best possible deal that the market will allow for. In this episode with Hayden, we go under the hood of UniswapX, what it is, how it works, and why it's needed. So you'll learn about Uniswap X and how it uses a Dutch auction to maximize swapper returns. How this Dutch auction mechanism also ensures that MEV is maximally retained by swappers.

Speaker 2

00:02:28 - 00:03:10

Also how Uniswap X massively reduces bridge risk and almost entirely abstracts away bridging altogether, freeing up capital to not have to be stuck inside of bridges where it's vulnerable. And also how UniswapX formalizes a new kind of player in the game of making trading in DeFi maximally efficient. As a disclosure, of course, Uniswap is a sponsor of Bankless and Bankless also does hold some UNI tokens, which you can see all the details of as well as all of our other disclosures at bankless.com. So let's go and get talking to Hayden Adams all about this new Uniswap X protocol. But first, we're going to talk about our preferred centralized exchange for crypto in 2023, Kraken, because you got to get your fiat boomer bucks into the world of crypto somehow.

Speaker 2

00:03:10 - 00:03:33

So use Kraken, again, our preferred exchange in 2023. If you do not have an account with Kraken, consider Clicking the link in the show notes to sign up with 1 today. Kraken 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 Kraken Pro, you'll have access to advanced charting tools, real-time market data, and lightning fast trade execution, all inside their spiffy new modular interface.

Speaker 2

00:03:33 - 00:03:53

Kraken'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 Kraken Pro, you have that power. Whether you are a seasoned pro or just starting out, join thousands of traders who trust Kraken Pro for their crypto trading needs. Visit pro.kraken.com to get started today.

Speaker 2

00:03:54 - 00:04:12

Introducing Polygon 2.0, the value layer for the internet. For too long, the limitations of blockchains have held back app development and stifled user adoption. The internet allows anyone to create and exchange information. What's missing is a value layer that lets anyone exchange, store, and program value. That's where Polygon 2.0 comes in.

Speaker 2

00:04:12 - 00:04:47

Polygon Labs has unveiled a series of innovations that will radically alter the Polygon ecosystem and Web3 as a whole. By leveraging groundbreaking ZK innovations such as Polygon ZK-EVM, the next iteration of the best-in-class Plonky2 proving system, and a first-of-its-kind ZK-powered interoperability layer, Polygon 2.0 will give users and devs unlimited scalability and unified liquidity. Right now, there is a Polygon improvement proposal regarding a potential ZK powered upgrade of Polygon Proof of Stake. If approved, Polygon Proof of Stake would become a layer 2 ZK EVM Validium. So make your voice heard on this proposal by joining the Polygon Discord today.

Speaker 2

00:04:47 - 00:05:03

You have a chance to help the Polygon community give the internet the value layer it deserves. Bonjour, Bankless Nation. It is the Sunday before ECC and I'm here with Hayden Adams, who has yet another announcement out of the Uniswap ecosystem. Hayden, what's going on, man? How you doing?

Speaker 1

00:05:03 - 00:05:14

Hayden Chang, CEO Uniswap, Uniswap Bonjour! Great to be here. First time in Paris, and first time at ECC. But yeah, Uniswap, we keep cranking out the hits. Been pretty busy, hard at work.

Speaker 1

00:05:15 - 00:05:45

And most recently we announced Uniswap v4, which is a new version of the Uniswap protocol and currently being built in public. And it basically makes it easier for people to create customized liquidity pools. We talked about this last time, hooks. And what you start to see is there's this thing called the routing problem. And as AMMs get more flexible, and basically what happens is routing gets harder over time.

Speaker 1

00:05:45 - 00:06:22

And routing was already actually pretty hard. So today we have hundreds of thousands of tokens, we have 4 versions of the protocol, we have multiple chains, we have other liquidity sources, and then you also start to think about things like MEV and trade-offs between slippage and latency and best execution. And it starts to get really complicated. And definitely with Uniswap V4 and hooks, it actually gets even 1 step more complicated. And traditionally to date, we have our current open source, we call it the auto router, which optimizes routing across Uniswap V3, V2.

Speaker 1

00:06:24 - 00:06:58

And what we've been working on today, I guess a long build up, is what we call Uniswap X, which is a Dutch auction based protocol for routing and aggregating liquidity. And we think it's really powerful, and we think it will help provide, it basically improves prices, but also has a bunch of UX benefits, allows for gas-free trading, no slippage on failed transactions, it starts to internalize some MEV, and provides a bunch of other cool features. I don't know if I should say the other big 1.

Speaker 2

00:06:58 - 00:07:22

Lewis, we'll get to every single bit here. And for the bankless listeners out there that aren't familiar, ETHCC is the place where you announce things, is where announcements come to be. Like I said, this is the Sunday before, so we're going to be seeing a slew of announcements coming out, and we're getting the first 1 here with Uniswap X, which is this new thing. This is the thing that Uniswap is announcing, this thing called Uniswap X. But I want to actually set more of the stage.

Speaker 2

00:07:22 - 00:07:48

And you did a good job, but I want to make sure that we are talking about the problem being addressed here. Uniswap is cool because every single token gets its own exchange, gets its own pool. Same thing with Uniswap V2. V3 made it even more complex, if you will, with this concentrated liquidity. And then, when we had you on not too long ago, like 4 weeks ago or something, about Uniswap V4, that whole thing, Uniswap V4, was even more expressivity in Uniswap pools.

Speaker 2

00:07:48 - 00:08:21

More complexity. And The big takeaway, I called it Uniswap's hook-centric roadmap to go in parallel with Ethereum's rollup-centric roadmap, where Ethereum's doing this thing where it's pushing complexity to the edges. It's like, hey, roll-ups, you do all the execution stuff, and we will just settle. And Uniswap's kind of doing something similar with its hooks and Uniswap v4. It's, hey, there's a world of expressivity and features and different ways of constructing a pool that we want to enable Uniswap pool builders, AMMs, to be able to build.

Speaker 2

00:08:22 - 00:08:43

And what I think you're leading up to is like, that's all great, we have as much expressivity as we need in Uniswap pools, except we're still left with a bunch of complexity. Even though it's been pushed to the margins, and Uniswap as a base is simple, the complexity still exists. There's so many pools. Now pools are different. There are different standards of pools.

Speaker 2

00:08:43 - 00:08:48

And so Uniswap X is a solution to harness all of that complexity, would you say?

Speaker 1

00:08:48 - 00:09:25

Yeah, and I'd say also, when I was on last time, we talked about different ways of achieving decentralization. And the most pure form of decentralization is automation, and you should automate what you can automate and with immutable smart contracts. And then the next level of achieving decentralization, and we talked about this more in the lens of governance, but the next level is just like incentivization and markets. And if you have like a competitive market structure where people are incentivized to do what they should do, then that's more decentralized than something that needs to be governed, which is the third tier. And for that, you achieve that through just greater distribution of governance rights.

Speaker 1

00:09:25 - 00:09:48

And so, what we're talking about here is taking the routing. We've already talked about this in the context of the protocol, which is highly decentralized. And what we're trying to do is do that for the routing problem, which is people tend to think about AMMs as both swapping and routing, as well as liquidity provision, all bundled together.

Speaker 2

00:09:48 - 00:09:51

Routing, swapping, and liquidity provision. 3 different things.

Speaker 1

00:09:51 - 00:10:11

Yeah. Or well, swapping, how do you route the swaps through liquidity? But people think of it as like, okay, you have the AMM and you try to find the best price through it. But I think you can start to unbundle them a bit, right? Because today, most interfaces have different strategies for how they route through pools, right?

Speaker 1

00:10:11 - 00:10:49

And there's various aggregators, and they're trying to find every possible liquidity source. There's a Uniswap UI which today basically just has like tries to discover across Uniswap pools. What we're trying to do here with Uniswap X is create a competitive marketplace for routing. It's almost a way of achieving more efficiency through decentralization. The more people that can participate in finding the best routes, discovering the best routes, discovering the best pools, discovering all the different liquidity, the better prices you can get in the long run, if you can create a competitive marketplace.

Speaker 1

00:10:49 - 00:11:00

And so, what we're trying to do with Uniswap X is create a competitive marketplace for routing across liquidity. And that liquidity can be on-chain, it can be off-chain. But yeah, that's essentially what we're trying

Speaker 2

00:11:00 - 00:11:15

to do here. Creating a competitive marketplace for routing. So with this explosion, like Uniswap, even at its earliest days in V1, was an explosion of pools. The cool thing about Uniswap is you can list any token. And that only got furthered with Uniswap V2, V3, and V4.

Speaker 2

00:11:15 - 00:11:55

Now we have pools all over the place. So, the routing problem, maybe to define the routing problem, is that with all of these pools and all these different sources of liquidity, getting the best price for your trade is a computational problem, because there's so many pools out there. I think what you're trying to do with UniswapX, a marketplace for competitive order routing, is you're just giving that up to the market and saying, hey, market, instead of the Uniswap router being the thing that manages all of that complexity, You're just giving it up to the marketplace and allowing routers to come in and service that role to make sure that traders and swappers get the best liquidity, get the best offer.

Speaker 1

00:11:55 - 00:12:43

Yes, and I think the thing I'd add to that is that because we're doing this on a blockchain, it starts to touch on a bunch of other problems in Incubuxy. We have, you know, you could do this in tradfy, or like you could, if you think about purely in tradfy terms and it's like just like optimizing, you know, routes, but we also deal with things like gas, and then we deal with things like the fact that, you know, validators exist and they get to, you know, choose the order of transactions within a given block, and that starts to take us into what people call. I guess I only found out recently that it was rebranded from minor extractable value to maximal extractable value. But then it takes you into MEV territory, gas optimizations and latency, and there's all these other things as well. Another thing is that there's also another area of price improvement is batching.

Speaker 1

00:12:43 - 00:13:19

People talk about batching all the time. If people are trading in the same direction at the same time, if you just route it through a Uniswap pool in the back of the Uniswap pool, then that's less optimal than netting it all together. By creating a competitive marketplace for it where people are competing in an auction, It basically forces people to find the most sophisticated strategies that offer the most price improvement. And so sometimes it might mean executing multiple transactions at the same time. And in that way, you're saving some gas costs and you're also maybe internalizing some of the price improvement for swappers.

Speaker 1

00:13:20 - 00:13:55

But yeah, I mean, the real goal is to deliver value to users at the end of the day. So, and then the other thing I'll mention is that, again, because we're on blockchains, there's a bunch of UX implications of just like gas. So, with Uniswap X, orders are off-chain signatures that are then, so rather than signing transactions that are sent directly to the chain, you usually sign off-chain signatures that express their intent, as is a word of the moment in crypto. And that is sort of an auction, a price-decaying auction. And then people are competing.

Speaker 1

00:13:56 - 00:14:24

As soon as the price hits a point where people are willing to fill it, the fillers, a new class participant, are submitting it to the chain. And those fillers look similar to the block builders of today, and likely will be a lot of overlap, or similar to the trading firms and arbitrageurs. And because orders just start off as off-chain signatures. You also get benefits like if your transaction is going to fail, it never gets submitted. And also just being able to abstract away gas for users.

Speaker 1

00:14:24 - 00:14:44

So if I want to swap USDC for DAI, I don't want to think about ETH as an input. Today, when you swap USD for DAI, your ETH balance goes down a little bit. Here, with Uniswap X, you just sign a message, someone else pays the ETH, and that's reflected in the price that you get. So there's a bunch of other benefits as well, but yeah, there is the first thing you said as well.

Speaker 2

00:14:44 - 00:15:07

Yeah, yeah. So There's a lot of things under the hood there that I want to unpack, like the gas, the MEV, all that kind of stuff. But really, just to start at the very, very top, how is this different, just to make sure that we're setting the table appropriately, how is this different from a DEX aggregator or some of the other liquidity optimizer services that are out there. If we take a peek under the hood, how should people think about this in its new form?

Speaker 1

00:15:07 - 00:15:40

Yeah, I'd say that for most DEX aggregators, and for others where there is prior work and there's other teams that are attempting to do things that are categorically similar. But in terms of the traditional model for a DEX aggregator, what people are doing is just like you have a single team that is integrating liquidity sources 1 by 1. And in doing that, you're hoping to get as much liquidity coverage as possible. That was like the kind of traditional DEX aggregator. It's definitely like various experiments, you know, like CASWAP and Fusion and stuff that get into closer territory to what we're doing with Uniswap X.

Speaker 1

00:15:41 - 00:15:50

But here, rather than trying to manually find all the liquidity sources, here We're basically saying anyone can do that and they're competing against each other and so it's it's a marketplace

Speaker 2

00:15:50 - 00:15:54

It's a little bit more meta than a Dex aggregator So a Dex aggregator

Speaker 1

00:15:54 - 00:16:03

that was a name on the there was a uniswap meta was was 1 name we considered but naming things apart You know And I think Meta kind of ruined it.

Speaker 2

00:16:03 - 00:16:24

Meta is now taken. That box has been checked, sadly. So, a DEX aggregator provides a singular solution to getting the best liquidity. And that is their solution. And what you're saying is, in order to improve that product, The teams behind every DEX aggregator needs to serially, manually, 1 by 1, integrate with liquidity pools in order to improve their product.

Speaker 2

00:16:24 - 00:16:42

And what you're saying is Uniswap X is not that. It is actually a place for all of those solutions to compete in the marketplace. And maybe at this point, complexity around Uniswap is so large that knowing the correct way of producing the best outcome is perhaps impossible, which is why you need to leave it up to the free market.

Speaker 1

00:16:42 - 00:16:53

Lewis, that's definitely it. And there's also other liquidity sources that can start to be integrated there as well. I'd also add that signed off-chain order-based auctions are a really powerful primitive.

Speaker 2

00:16:53 - 00:17:09

Let's dive down into that. So if I go to Uniswap, I sign a transaction, I broadcast it to Ethereum, in 12 to 24 seconds, it gets included in the blockchain. That is the current Uniswap user experience that people are used to. With Uniswap X, we have this new thing. Can you unpack that a little bit?

Speaker 1

00:17:09 - 00:17:47

Yeah, I think that something that's funny is that actually every order, like you already have an auction happening every transaction, right? Because there's like an auction for Blockspace. But people are like competing to like, you know, there's like, I'd say that like 1 thing that's interesting is that if you imagine there's like a price curve and then there's a gas price curve, and today like whether or not your order gets included is based purely on the gas price curve, not the asset price curve, and so like this combines everything, like you just have the price curve, like The nice thing is it kind of combines the gas and the price into a single thing, which is part of it. But yeah, users sign off-chain orders. They're broadcast, and they can be broadcast in a variety of ways.

Speaker 2

00:17:47 - 00:17:50

Signing off-chain orders as opposed to signing a transaction.

Speaker 1

00:17:51 - 00:18:42

People have talked about these for a long time, like meta-transactions or sponsored transactions. It's like a similar category of things, but we're like bundling the gas auction of getting included in a block with the price auction of trying to optimize your price at the same time. And so that, you know, there's like a nice efficiency thing there, where sometimes, for example, in the past, and definitely things improved a lot with 1159, EIP-1159, but sometimes in the past, for example, like, you know, the, the, like your transaction would wait until like the gas dropped a significant amount to get included, but in that time, the token that you were selling also dropped. And so it would have been better for you to pay more gas sooner, but your transaction has no awareness of like, like there's no like, and that's where, when people talk about like MEV awareness, like if the, you know, if the fee that you're paying has no awareness of the transaction that you're doing, then you're really not optimizing. And so part of this is around that.

Speaker 1

00:18:42 - 00:18:59

There's also just a gas, there's a UX benefit. People don't like thinking about gas. When I'm trading USDC for DAI, I just don't want to think about ETH. And it's confusing, and that's something that confuses users a lot. I think something that maybe makes Uniswap a little bit unique in...

Speaker 1

00:18:59 - 00:19:28

Not totally unique, but like somewhat unique in how we are able to develop and design things is we just have a lot of users and we hear a lot from them. And some of how we approach solving problems is we're like, okay, what is holding us back today? Like, what are our users struggling with right now? And that's part of what led to us creating a wallet, is Our users were struggling with wallet UX and it's part of what led to some of our design decisions here. It's just like, how do we continue to push things forward?

Speaker 2

00:19:28 - 00:20:43

I want to drill down on this off-chain order thing just a little bit more, because I think it's a great microcosm for the solutions being put forth by Uniswap X as a whole to begin with. So in Uniswap in its current form, like I said, I sign a transaction, I broadcast that transaction, the gas fee that I pay is hard-coded into that transaction, and that is independent from the trade that I'm making. And so these are 2 different variables that are not talking to each other, and can produce suboptimal results, because maybe, like you said, the token moves against me, in the time that I tried to save $2 of gas, I lost $15 off my trade. With signing an off-chain order, which is signing a transaction, but not broadcasting it, and just leaving it for somebody, a filler, a taker to take and fulfill that, they are allowed to combine the computation between optimizing for gas fees and optimizing for the actual swap. And so they take that complexity and do that computation to produce the best outcome and because it was left off-chain, it was assigned an off-chain order, some sort of off-chain service provider, some filler who's managing this order routing and all the other complexity, they're able to manage the complexity between the gas and the swap to produce a better outcome for a user.

Speaker 2

00:20:43 - 00:20:50

And that's just like 1 piece of many pieces of combined complexity that allows for a better swapping experience.

Speaker 1

00:20:50 - 00:21:08

For sure. Something I'll add is that, like, that might be like, oh, there's an off-chain server. Like, what does that mean for decentralization? But I think it's worth noting that today, the way it works, It's not actually, there's no magic user signs that go straight to the chain. We have mempools, we have block builders, we have Infura, we have all of these things in between.

Speaker 1

00:21:09 - 00:21:34

And what we're trying to do is say, let's optimize what's in between to optimize for the best outcomes for users. Because today, block builders aren't optimizing to give users the most money. They're optimizing to take the most money for themselves. And actually, funny enough, a lot of that money is going to ETH holders through efficient MEV auctions. But so Actually, ETH holders are making a lot of that profit, but we ultimately want to give a lot of that value back to swappers.

Speaker 1

00:21:35 - 00:21:36

I know we like ETH, but

Speaker 2

00:21:37 - 00:21:42

yeah. We also like UX and value retention by end users.

Speaker 1

00:21:42 - 00:21:59

I also mentioned that I mentioned signed off-chain orders as a general parameter. I think something that's really powerful with SwapX is it actually opens up a world for cross-chain swapping as well. So today, we're launching a, or today is, it depends on when this gets.

Speaker 2

00:21:59 - 00:22:00

Hopefully on Monday.

Speaker 1

00:22:01 - 00:22:03

Yeah, Monday, the 17th.

Speaker 2

00:22:03 - 00:22:04

United States time, yeah.

Speaker 1

00:22:04 - 00:22:21

July 17th, something like that. There's going to be an opt-in beta. People can sign up to, or people can opt in in the UI to start having some small percentage of their orders route through this. We're starting small. It's only for certain pairs, for certain trade sizes, et cetera.

Speaker 1

00:22:21 - 00:22:58

And it's going to, so that we can continue to give time for more fillers to come into the ecosystem and continue optimizing how we parameterize the system. But starting today, today we'll have a version that's just on mainnet, on Ethereum. But in the long run, we can really make this cross-chain and you can sign orders that are, this method of signed off-chain orders is really powerful and expressive and allows for really good user experience and efficient cross-chain swapping as well. And so, not today, but maybe hopefully later in this year, we'll see cross-chain trading, and that will also be really cool.

Speaker 2

00:22:58 - 00:23:19

I want to try and define the landscape of what Uniswap is now. Because we have on-chain, on Ethereum, and the layer twos. We have Uniswaps 1 through 4, which are AMMs, and then now we also have Uniswap X, which is an order routing protocol. It's another protocol. And so this is a new protocol.

Speaker 2

00:23:19 - 00:23:29

This is not an AMM. This is actually something completely new compared to all the, you know, Uniswap's 1 through 4. This is not a Uniswap 5. This is something completely different. This is a parallel and complementary.

Speaker 2

00:23:29 - 00:23:53

Parallel and complementary. Like The pieces fit really, really well together. But I really wanted to kind of carve out what the definition is of Uniswap X. I'm going to do my best, and you can correct me, because I only get so far. Uniswap X is a protocol, an open-ended protocol for service providers, fillers, trade executors, to come and fulfill the best trade according to the parameters of a swapper.

Speaker 2

00:23:54 - 00:24:22

And so a swapper comes to Uniswap X and they say, hey, I want to do something. And Uniswap X puts that into a package that fillers can all compete on. So it's like a protocol. What do protocols do? They bundle things in easy-to-manage packages of information so that other service providers, fillers, swappers, liquidity providers, whatever, in the Ethereum ecosystem can all come and compete on that vector of providing that 1 swapper the best swap possible.

Speaker 2

00:24:22 - 00:24:29

And this is, again, complementary with Uniswaps 1 through 4, but is a completely different protocol, correct?

Speaker 1

00:24:31 - 00:25:03

Yeah. You could start to think of AMMs as ways of creating liquidity, building on top of liquidity as a building block, or there's on-chain integrations, and it's just a really cool, expressive, and efficient on-chain way of providing liquidity. But I'd say that naive routing solutions through AMMs in the long term are not going to make it. You kind of need your routing solutions to be aware of things like MEV, aware of more expressive and user intense. And so, you can think of this as, we already have a routing layer, we already have this thing we call the auto-router.

Speaker 1

00:25:03 - 00:25:23

We also have this thing we call client-side routing. So, we have a vert- like in our web app today, you can actually toggle between 2 types of routing. I don't know if you know that, but like there's a client-side which basically turns off the API entirely and just speaks directly to the chain. That's like maximally like provable. And but then we have like the, but like to make it like better for users, you kind of need to have smarter routing.

Speaker 1

00:25:23 - 00:25:49

And so we have this smart auto-router thing we call. And that is a little bit faster and discovers more routes. But there's an API behind it, but it's open source. And so the goal, and I would think of this as a protocol that lives in that domain, not as a protocol that lives in the AMM. So we already have this, like the routing side of the system already exists, and we're just kind of updating it with a new protocol.

Speaker 1

00:25:49 - 00:26:13

I'll also mention that like the Uniswap X does have, like there's like on-chain smart contracts that settle orders, they're immutable, actually open source, GPL, GPL open source, and Then there's, you know, you just have, and then you have like front ends that broadcast orders, fillers that have to like discover those broadcasted orders, and yeah, and then the fillers basically can submit them directly to the smart contracts.

Speaker 2

00:26:13 - 00:26:32

So I think what Uniswap X is really doing is they're enabling a new type of player in the Uniswap arena. So we have swappers already. Most people listening to this are swappers. Some people listening to this might be liquidity providers, and they are providing liquidity into the AMMs. So we have the AMMs, which are Uniswaps 1 through 4.

Speaker 2

00:26:32 - 00:26:43

We have the liquidity providers. We have the swappers, the traders who trade on Uniswap, but now Uniswap X is enabling this new type of player called a filler?

Speaker 1

00:26:43 - 00:26:50

Yeah, I think it's worth noting that they're not new, we just have a routing system that is aware of them.

Speaker 2

00:26:50 - 00:26:51

You're formalizing them.

Speaker 1

00:26:51 - 00:27:19

We're formalizing them in a way that can put constraints on them, because right now what they do is, you can think of them today as the people that do the most advanced trading strategies, the people that do a lot of the arbitrage, the block builders, the MEV extractors, right? And what we're trying to do is put constraints on them and then take value that would go to them and give them back to the swappers. So the players exist, we're just formalizing them and we're having them compete with each other in a way that tries to drive as much value back to swappers as possible.

Speaker 2

00:27:20 - 00:27:37

So swappers, the people who trade on Uniswap just to trade tokens, meme tokens, USDC, Ether, are now going to be pointed towards UniswapX. So to trade on Uniswap now in the future, and now with Uniswap X, means to be trading through Uniswap X, correct?

Speaker 1

00:27:38 - 00:28:00

Well, first, there is like, the routing system we're gonna build is like, direct your order wherever it thinks will get you the best price. And so, especially at launch with the beta, a lot of orders will just route through our existing routing system. I'd say that over time, probably more volume will go to Uniswap X. But I think that over time also, most Uniswap X volume will go through Uniswap, the AMM protocol.

Speaker 2

00:28:00 - 00:28:17

Right, so Uniswap X, people will trade on Uniswap, they can use Uniswap X, and then Uniswap X, as in its nascent time, will just say, oh, you know what's most efficient? The Uniswap order router. But as it develops and grows and matures, it might find better pricing and better sources

Speaker 1

00:28:17 - 00:28:39

over time. But for what it's worth, we're already in that world, which is today, if you don't get best prices going through Uniswap, then people will go somewhere else. And so there's always other liquidity. I think that the goal of Uniswap, the AMM, is to have the best liquidity and the most assets possible. And I think that Uniswap v4 is a really, really powerful way of achieving that.

Speaker 1

00:28:40 - 00:29:07

And I'd say that, you know, it's so funny. 1 thing that's really interesting is when I was developing Uniswap V1, way back in the day, there was like the mental framework was like, do AMMs have a place in this world? The frame wasn't like, I'm going to build the best AMM that's going to take over all the liquidity. It was like, this is a new way to do liquidity creation. I wonder if it will work and have a place in the world.

Speaker 1

00:29:07 - 00:29:46

And I think we saw that it does. And it's like a really efficient, cool way of creating liquidity and unlock some really powerful new things, like the ability for anyone to create liquidity at like sort of any like it's sort of you know anyone can create liquidity not not anyone can create liquidity as efficiently or effectively as Citadel but anyone can do it at some level right and that's why a lot of the earliest you know pools that were big on Uniswap were like these like longer tail pools that were struggling to get exchange listings etc and you know like MKR and Dai were like very big in the early days because they were, like it was the only place to trade them. And so AMMs have these new unlocks. They're like, oh, anyone can provide liquidity. It also has on-chain integrations, which are like money Legos.

Speaker 1

00:29:46 - 00:30:25

It's like a really big unlock. I think that when I think about decentralized finance and what we're trying to achieve, we can't just kind of iterate in our small world, like we have to kind of innovate and push beyond it. And I'd say that I think that AMMs are going to be like, you know, I'm extremely bullish AMMs as a market structure, but I think that there are also other market structures that could exist in the future. And I think we also want to discover them and have them be part of the Uniswap ecosystem and have them be complementary. And so you could think of this as like, oh, some volume might go elsewhere, but that volume might go elsewhere anyway because if Uniswap isn't offering the best prices.

Speaker 1

00:30:25 - 00:30:56

And so I'd say that other liquidity sources are gonna exist whether or not we are aware of them and look for them. And so, you know, also worth mentioning that like today, you know, Uniswap has like a pretty, like, the funny thing is that we've actually seen this play out in aggregators. Like, Uniswap still is like the largest liquidity source for every aggregator that's out there, even though they all have private market makers, other liquidity sources. And I think that the sort of network effects that can build up around v4 will also be really helpful.

Speaker 2

00:30:57 - 00:31:02

So what you're saying with all of that is that Uniswap X is not a Uniswap Maximless protocol.

Speaker 1

00:31:03 - 00:31:07

Well, it has the word Uniswap. I'd say that it's not

Speaker 2

00:31:07 - 00:31:07

a Uniswap.

Speaker 1

00:31:09 - 00:31:32

I'd say that I don't want to go that far. I'm pretty AMM maxi in many ways. But I'd say that it's expressive and starts to push the Uniswap ecosystem to go beyond strictly AMMs. But I'd say that it still is also the best way to route across AMMs, which is I think really important. For anything that is lost to other liquidity sources, there's also gains, I think, in routing efficiency.

Speaker 1

00:31:33 - 00:32:18

And also, really importantly, when you start to think around, like, when we jump back to that hooks problem, like, 1 of the biggest questions that we got after the sort of announcement of our vision for Uniswap before was like, okay, I'm a team, I create a hook, and how do I make sure that people, like, you know, front end, like, 1 of the nice things about Uniswap is if I create a pool, I know that, like, routing is going to be discovered in, like, routing engines. Like, if I create a new hook that has some new, like, you know, like, let's say it has, like, TWAM in it. TWAM, if you're routing through a TWAM pool, you need to be aware of the TWAM component because that affects the price you get, and you can't just look at the liquidity. Or if I create some other custom hook, like how do I know that my, maybe people are afraid that it will, it's not safe and they have to audit it and it takes some time to audit and they don't care about me. And so how does my liquidity get discovered?

Speaker 1

00:32:19 - 00:32:49

And this is the solution to that. If someone creates a new custom pool, a new custom hook, rather than needing Uniswap Labs team to audit their hook and integrate it into our front end, which is like a not the ideal, it's not the ideal process. And Let's say maybe we're going to be in a world where there's a million hooks. Right now, we already have hundreds of thousands of pools. We're going to be in a world that has millions, probably eventually hundreds of millions of pools.

Speaker 1

00:32:49 - 00:33:33

And you can't have a single team just as routed. And so, you can think of this as now all you need is to find 1 filler who's willing to integrate your hook, and then that hook is represented in the liquidity that you find in front-end, like your Uniswap front-end. So, someone can not only create their liquidity pool on Uniswap, they can find 1 of any filler in the world or that's willing to include that hook, and then immediately that liquidity is represented in the Uniswap UI. And so I think that like you could think of it as like, like adversarial, but I kind of think of it as like almost like strictly required to like make it work in the long run. And so yeah, you know, pretty, pretty excited.

Speaker 2

00:33:34 - 00:34:00

Metamask has something new. Introducing Metamask Portfolio. Metamask portfolio is the best way to view your crypto portfolio from a holistic level See everything across all the chains all at once in your portfolio Meta mask will report the aggregate value of all the assets in your Metamask wallets and even the other wallets you import too. But Metamask portfolio isn't just a passive portfolio viewer. It is a place to do all of the money verbs that make DeFi so powerful.

Speaker 2

00:34:00 - 00:34:22

You can buy, swap, bridge and stake your crypto assets. So not only is Metamask the easiest place to see your wallets in aggregate, but it's also a powerful battle station for all of your DeFi moves. So go check out your Metamask portfolio because it's waiting for you to open it up. Check it out at portfolio.metamask.io. Arbitrum is accelerating the Web3 landscape with a suite of secure Ethereum scaling solutions.

Speaker 2

00:34:22 - 00:34:54

Hundreds of projects have already deployed onto Arbitrum 1 with a flourishing DeFi and NFT ecosystem. Arbitrum Nova is quickly becoming a Web3 gaming hub and social dApps like Reddit are also calling Arbitrum home. And now Arbitrum Orbit allows you to use Arbitrum's secure scaling technology to build your own layer 3, giving you access to interoperable, customizable permissions with dedicated throughput. All of these technologies leverage the security and decentralization of Ethereum and provide a builder experience that's intuitive, familiar, and fully EVM compatible. Faster transaction speeds and significantly lower gas fees.

Speaker 2

00:34:54 - 00:35:31

Are you a dev but you don't know Solidity? With Stylus, Arbitrum's upcoming proposal for a programming environment upgrade, developers can write smart contracts in Rust, C, C++, and many more coding languages. Arbitrum empowers you to explore and build without compromise. Visit arbitrum.io where you can join the community, dive into the developer docs, bridge your assets, and start building your first app on Arbitrum. Mantle, formerly known as BitDAO, is the first DAO-led Web3 ecosystem, all built on top of Mantle's first core product, the Mantle Network, a brand new, high-performance Ethereum Layer 2 built using the OP stack, but uses Eigenlayer's data availability solution instead of the expensive Ethereum layer

Speaker 1

00:35:31 - 00:35:31

1.

Speaker 2

00:35:31 - 00:36:12

Not only does this reduce Mantle Network's gas fees by 80%, but it also reduces gas fee volatility, providing a more stable foundation for Mantle's applications. The Mantle Treasury is 1 of the biggest DAO-owned treasuries, which is seeding an ecosystem of projects from all around the Web3 space for Mantle. Mantle already has sub-communities from around Web3 onboarded, like Game7 for Web3 gaming, and Bybit for TVL and liquidity and on-rails. So if you want to build on the Mantle network, Mantle is offering a grants program that provides milestone-based funding to promising projects that help expand, secure, and decentralize Mantle. If you want to get started working with the first DAO-led Layer 2 ecosystem, check out Mantle at mantle.xyz and follow them on Twitter at 0xMantle.

Speaker 2

00:36:12 - 00:36:56

I think this is just overall a really good, elegant lesson as to how markets harness complexity really, really well. There's been no way where 1 single player could manage all of this complexity with all these different pools versus the competition of just like, how just like, oh, this is too complex, just deal, make the market deal with it. I Want to run through how Uniswap X actually works? I mean we've talked a lot about the contours of it But maybe we can run through the lifecycle of a transaction and how Uniswap X actually ensures that that transaction gets the best actual output of whatever it's trying to do possible. So maybe you can run us through Uniswap X under the hood.

Speaker 1

00:36:56 - 00:37:04

Yeah, so I mean I guess we can start with the Uniswap frontend. For swappers and the Uniswap frontend, it actually looks and feels very, very similar. Okay.

Speaker 2

00:37:04 - 00:37:06

You know... No new skills are required here?

Speaker 1

00:37:06 - 00:37:38

No new skills, hopefully fewer skills in the long run. But, you know, when you go to, you know, you choose the tokens you want to trade, you like kind of like, you know, you click like swap. The first difference is actually that you'll see that there's no gas for your swap. There is still, I'll caveat that, there is still 1 initial approve per token of the permit contract. We created these permit contracts that you've probably seen that'll basically allow any token that you approve on this contract can now do signature-based approvals forever for you.

Speaker 1

00:37:39 - 00:38:25

So that's what Permit is, and this is building on top of that. So you do have to do an approved transaction every once in a while for new tokens that you haven't traded, and that does cost GAS. And there's no way to avoid that unless the token itself includes GAS-less signatures, or you're using a smart contract wallet. But for tokens that do have signature-based approvals, eventually, but anyway, once we have our token approvals, which is our, from that point on, you make a swap, and instead of paying GAS, and then instead of signing a transaction, if you're using MetaMask, it looks a little different, you swap wallet, then a regular transaction, it just says, you know, you're trying to sign a, you're just like signing a signature. So you sign a signature, and then at that moment it feels very similar, it then goes to a pending transaction state for the user.

Speaker 1

00:38:25 - 00:38:38

1 noticeable difference is that when you sign a transaction, you can immediately go to EtherScan and start waiting for it. Here it's just an off-chain signature, so the order hasn't been executed, We don't know what the transaction hash will be yet. At this point,

Speaker 2

00:38:38 - 00:38:41

it's not even in the mem pool. It's in the pre-mem pool.

Speaker 1

00:38:41 - 00:38:56

Yeah. At this point, the order is broadcast to a network of fillers from the front end. And there's an API for that. And then it's similar to our router. There's an API.

Speaker 1

00:38:57 - 00:39:21

And the order is broadcast to a network of fillers. And I'm going to start with the base case and then mention that there's an additional ability to parametrize through RFQ. But just the base case of a Gouda order, is you sign an off-chain order, it's broadcast, your order is basically a decaying price auction. So at the moment you sign it, you're willing to accept 1 price, and then the price goes down a little bit over time. And what that does.

Speaker 2

00:39:21 - 00:39:21

Until it gets filled.

Speaker 1

00:39:21 - 00:39:32

Yeah, and so you start at, maybe it starts at a little bit above the price you expect, and it decays over time. And what that does is, the moment that it's worth it for someone to fill, they will, and so that's what creates a competition. Right, and

Speaker 2

00:39:32 - 00:39:42

that's what in theory produces the best possible outcome because so long as somebody is some rational actor saying hey that's profitable I'll do that you'll get the first profitable actor that'll do that.

Speaker 1

00:39:42 - 00:39:57

Yeah, the person who's willing to take the lowest margin or has like the best strategy And they're competing against other people and they want to make sure they get it so they try to get the best price. And then at that moment the filler, not you, submits the transaction meaning they're paying the

Speaker 2

00:39:57 - 00:39:58

gas.

Speaker 1

00:39:58 - 00:40:21

And then what that does is it pulls your tokens out of your wallet, you've approved it, and there's a smart contract that you fill through. And it enforces that they can only take the tokens out of your wallet if they send you the required amount of tokens based on the moment at which it executes, because it's like a timestamp component. And that's about it. You sign an order. A filler, the first filler that's willing to fill it takes it and submits it on chain and pays the gas and that does the transaction.

Speaker 1

00:40:23 - 00:40:47

I think that something that starts to happen here is you think about latency. So back in the day, Pre-1159, Uniswap transactions used to take a few minutes sometimes. The gas markets weren't very good or very efficient. Today it's a little bit faster. About 75% of Uniswap trades execute in the first block after they sign it, and about 90% by the end of the second block.

Speaker 1

00:40:48 - 00:41:05

And so I think that there is definitely a need for the auctions to happen very quickly. And so there's an optional component for this system. Optional at a smart contract level. UIs can do whatever. But that allows you to layer an RFQ on top of

Speaker 2

00:41:05 - 00:41:06

it,

Speaker 1

00:41:06 - 00:42:02

which basically means you use an RFQ system, request for quote, they're called, where you ask a bunch of people, what is the best price you'll give me? And you use that to inform what the actual market price is, rather than guessing when you're parameterizing the auction. To incentivize people to give you their best quotes, you do have to give them something in return. And so, the way that that looks in the smart contracts is if you use the optional RFQ parameterization, then basically there's a slight priority given to the RFQ winner for the first, you know, maybe few blocks. So what it looks like is like I sign my order, I get, if I'm doing, you know, a transaction with an RFQ, I ask, you know, the best quote, I sign an order that says, this person can fill at their quote, anyone can fill, if they have real price improvement, they can fill and they can come in before them, but there's some margin of price improvement that they have to offer, So you can't offer 1 way higher.

Speaker 1

00:42:02 - 00:42:37

You have to offer maybe .5% higher, something like that. So there's still a public auction component where someone can come in with price improvement and out-compete the RFQ winner, which is important. But there is, for a few blocks, a slight priority given to RFQ winner, which allows you to basically get very efficient, very fast price discovery. And in that way, maybe most transactions that include the RFQ can execute maybe in 1 to 2 blocks, as opposed to if you weren't using the RFQ, maybe it would take like 5 to 10 blocks, or something like that. Yeah.

Speaker 2

00:42:37 - 00:42:44

With this model, this decreasing price auction, which is a Dutch auction, which is existing from the 1700s, which is why we know it's really primitive.

Speaker 1

00:42:44 - 00:42:50

Do you know where it comes from? The Dutch? Yes, but do you know it's from tulip auctions.

Speaker 2

00:42:51 - 00:42:56

Yeah, whenever I think of Dutch, I'm like, was it the tulips? Yeah, it was the tulips. Yeah, it

Speaker 1

00:42:56 - 00:42:57

was flower auction.

Speaker 2

00:42:57 - 00:43:20

We'll put a pin in that 1. That first tulips, now dogs. You have the option of extending the time or slowing down the decreasing price for a very long time. Like you could go up to 10 blocks, or you could go up to 10 days for whoever wants to do that for whatever reason, what would be the advantage for extending that period of time? Like, why would someone do that?

Speaker 1

00:43:20 - 00:43:46

Yeah, I'd say that you can... So, 1 thing is if you don't want to depend on this RFQ system or if the RFQ system is not optimal for whatever reason for your trade, some people might just be comfortable. Part of it is there's sort of an assumption in what I'm saying that users need their transaction to execute in the same 1 or 2 blocks. And I think a lot of users, that's really important. And it's like a reason that that's like, when we build things at Uniswap, we have to be able to consider what our users care about.

Speaker 1

00:43:47 - 00:44:31

And so having this RFQ component allows it for users who want their trade to execute in like the next block It allows that but if users are like comfortable waiting like a minute or 2 you you might have there's definitely that You know, There's a lot of debates you could get into about whether or not there's price improvement. It probably depends on the size of the order. If you're making a large order, giving some people time to source liquidity, you can optimize the price. Waiting a little bit longer, giving more time for it to propagate, more people to discover, et cetera. There is risk that the price moves against you during that time and not like you know this sort of like so you are like if you have an order that executes more slowly there is risk that you are taking on like price risk that like maybe the like the trade will like go down you know the price will go down not up for the token you're selling.

Speaker 1

00:44:31 - 00:44:58

And so it's not like strictly better, but it does let you remove the RFQ system. And it also, I'd say that waiting 1 to 2 minutes, you're not really expecting too much price movement. And it might actually optimize price a little bit. But it's such a kind of interesting design in trade-off space that it's like... I'd also mention that 1 reason that might actually be is that batching within the system.

Speaker 1

00:44:58 - 00:45:22

If you have orders that execute slowly, maybe someone else makes an order in another direction within that time, and then it's more efficient to net against them. Something that maybe I'll... People ever know the story, not everyone, but most people know the story of Carl and my first friend in the space, and he gets me into AMMs. I don't know if you know, the second person I met, The first 3 people in order that I met in this space were Carl, then Phil Dian, then Dan Robinson. That's a pretty good lineup.

Speaker 1

00:45:22 - 00:45:32

Good lineup. So the second person I met in this space was Phil, the co-founder of Flashbots and inventor of the term MEV, I believe.

Speaker 2

00:45:33 - 00:45:34

Discoverer of MEV.

Speaker 1

00:45:35 - 00:46:18

Yeah, yeah, yeah. He released the Flash Boys 2.0 paper. So we've been talking about this design space since well before, and the first version of Uniswap, it was like, oh, yeah, this leaks MEV. We didn't have the word MEV yet, but he's, you know, and he sent me a paper by this guy, Eric Budish, called like, it was something like frequent batch auctions, something trading arms race, you know, frequent back, like basically gets into the whole like Flash Boys 2.0 and basically like postulates that if time is continuous, like if you treat time as a continuous thing, then these HFT games are inevitable.

Speaker 2

00:46:18 - 00:46:19

Right.

Speaker 1

00:46:19 - 00:47:05

That there's always people, front running is inevitable if time happens in order. And to create fairer systems that don't favor an arms race, you kind of have to break time up into discrete intervals and do batching within those intervals. And definitely there have been earlier attempts at it in Ethereum, but I think there's often UX issues around it. So I think what we're partially trying to do is experiment with and explore this trade-off space of how do we create fairer outcomes that don't have this maximized power in the most sophisticated traders in the world, purely. And I think part of that is starting to enable things to be executed in batch and starting to be more aware of things like MEV.

Speaker 1

00:47:05 - 00:47:10

And so I don't even remember a question you asked at this point. I'm kind of just ranting.

Speaker 2

00:47:11 - 00:47:20

We were going through how did the lifecycle of the token and then also just the time for why someone would extend out a long period of blocks.

Speaker 1

00:47:20 - 00:48:25

Yeah, all that to say, users have their preferences for how their order, if someone really cares about executing their order immediately, they probably are going to get a slightly less optimized trade because they have to rely on, you can't very efficiently discover the, auctions allow you to efficiently discover the right price, but if the auction is too fast, it's not very efficient. You have to know how to parameterize your auction. And so, the faster you need it to converge, in some ways, there's less time for optimization. And so, having slower orders over time might just let you get more optimal prices where you feel better about there not being someone who's extracting some value from your transaction. If you don't care and you just want your order to happen right now, then things like, we can do much, much better than today, but there's going to be some trade-off space of if you want the instant fastest transaction, you might have to pay a little bit more in the long run than people who have slower transactions.

Speaker 2

00:48:26 - 00:48:35

What about MEV? How is MEV as a mechanism, How has Uniswap X stopped the leakage of MEV?

Speaker 1

00:48:35 - 00:48:50

Yeah, I'd say that, I don't want to use phrases like stop the leakage of MEV because there's such a, there's even different ways of thinking about it. Some people say, oh, MEV exists no matter what. It's just like you've internalized it. Or it's gone to a different party. It existed.

Speaker 1

00:48:51 - 00:49:06

If you generally think about it as someone wants to make a trade, that creates some value somewhere. And there's a lot of forms of MEV. People are talking about like sandwiching, front running, back running, reordering transactions, reorgs. I don't even remember, time bandit attacks.

Speaker 2

00:49:06 - 00:49:10

That's how the time- I'll rephrase the question. I'll give

Speaker 1

00:49:10 - 00:49:11

an actual answer.

Speaker 2

00:49:11 - 00:49:14

How has Uniswap X changed the way MEV is expressed?

Speaker 1

00:49:15 - 00:49:49

I think that generally, what we're trying to do is have value that today leaks out to block builders and validators through MEV markets, right? Right now when someone makes a trade like it is actually also broadcast publicly It's probably like right now basically, you know, someone makes a trade on Uniswap, like people are just like competing with each other, but they're not competing with each other to offer the best price to the Uniswap user. They're competing with each other to extract the most value from the Uniswap user. That's what like, that's what current MEV markets are. And that's what current like block building networks are.

Speaker 1

00:49:49 - 00:50:49

And what we're trying to say is like, can we change how we encode transactions such that that competition, rather than a bunch of sophisticated people competing to extract value from swappers, they're competing with each other, and as much of that value as humanly possible, some value will always have to go to Ethereum miners, or validators, some value will always go to block builders, but how do we just maximize the percentage of the MEV that goes back to the swapper because they're competing with each other, right? Like, if they're competing, right now they are competing with each other, but they're competing with each other to take all of the money. Now we want them to compete with each other to have most of that value go back to the swapper. So it just has to do with how you encode your transactions and having an auction is a way of doing that. Because if they're, you know, today a Uniswap order is executing it basically like a, you know, it says I will make this trade as long as I get better than the minimum slippage, my slippage tolerance.

Speaker 1

00:50:49 - 00:51:32

What that means is a validator can front run the order up to the slippage tolerance and take that money for free if you're mining a block. And we don't want that. And so by having a price decay over time, as soon as it's profitable for someone to include that transaction, they will. And so I guess 1 way to put it is that today, depending on the size of the trade, it can be profitable to front run up to your slippage tolerance. And this 1, it doesn't go to the minimum price because it usually, like, your slippage tolerance is still expressed as the minimum price of the auction, but the order is filled well before it hits your minimum price, and it can't hit your minimum price until the end of the auction, by which time it's already been profitable.

Speaker 1

00:51:32 - 00:51:39

So the first moment it's profitable, that's when it's filled. And so you don't like just get like front run up to your slippage tolerance, which is kind of how it works.

Speaker 2

00:51:39 - 00:51:52

Right. This is the beauty of the mechanism design of a Dutch auction, where just the mere system itself of making sure a somebody fills that order at the first profitable opportunity is the MEV protection mechanism.

Speaker 1

00:51:52 - 00:52:21

I'd say that also, that's the mechanism of protection. I'd say there's other ways that it's improved. Things like just the fact that if you have a bunch of transactions at once that are off-chain orders, 1 filler can discover all of them and complete them all at the same time. That means it can be profitable to fill them all even earlier in their life cycle. Because someone might have an order and on its own it's not profitable for the filler to include it in a block, or a block builder.

Speaker 1

00:52:22 - 00:52:45

But if you have another order that's going the other direction, then maybe you can. And so, when you think about that as the higher up you are in your Dutch auction, like it's a decaying price. The higher up you are, the less value has been leaked. And so we're trying to like, you know, the more optimal that, you know, that we can like make these filler networks and the better we can parameterize these orders, like the less value will be leaked.

Speaker 2

00:52:45 - 00:52:54

Okay. Are we ready for the bridge conversation? Cross-chain swapping? Yes, cross-chain swapping. How do I enter this conversation?

Speaker 2

00:52:55 - 00:52:56

What's the point of entry here?

Speaker 1

00:52:56 - 00:53:31

I can start. And Basically, when you have orders expressed as off-chain signatures, we initially started this project thinking about what we might want to do in the aggregation space. And I think that what we discovered in the process is if you express your orders as off-chain signatures, there are like other things you can do. And I think 1 thing we discovered is that you can actually do very efficient, very powerful, good UX cross-chain swapping. And so instead of signing an order that says I want to swap this token for this

Speaker 2

00:53:31 - 00:53:32

token on Ethereum, You could sign an order that says, I

Speaker 1

00:53:32 - 00:54:05

want to swap this token for this token on Ethereum. You could sign an order that says, I want to swap this token on Optimism for this token on Arbitrum, or swapping across chains. And the beauty of it is that from a swapper's perspective, the user experience is exactly the same. And even the UX of it actually can fill very quickly. And these fillers that are filling orders on Uniswap that we've already talked about, they actually can handle the complexity and latency of using bridges and figuring out settlement.

Speaker 1

00:54:05 - 00:54:54

And so, you know, we basically think that the cross-chain version of this is really powerful. I guess 1 way to put it is that maybe a few of the benefits that you might see is, 1, it allows for native asset swaps. So right now, a lot of value currently lives in, when people are moving funds between chains and making trades across them, usually what you're doing is you're bridging an asset, then you have a bridged representation of that asset on another chain that is sitting in a liquidity pool, and then you're swapping in that liquidity. You might bridge ETH to, maybe to be more concrete, you might bridge ETH to Polygon, and then swap your Polygon ETH to Matic tokens on Polygon. I guess they re-branded their token?

Speaker 2

00:54:54 - 00:54:55

Soon, yeah.

Speaker 1

00:54:55 - 00:54:56

Something like that.

Speaker 2

00:54:56 - 00:54:57

With approval, yeah.

Speaker 1

00:54:57 - 00:55:33

Something like that. But, you know, in that world, you know, bridges are, like, I mean, look, we've looked at this world of bridge, like, we've had so many bridge hacks. Funds that passively sit in bridges are just, like, you know, risk for the industry more or less. Look, the more, you know, obviously, like, some bridges are much better than others, and we've had these L2 bridges have held up pretty well so far, for the most part. But what you can do with swapX is you can just say, I'm going to swap Eth on main.net for Matic on Polygon, and a filler, basically, should I talk to the lifecycle, maybe?

Speaker 1

00:55:33 - 00:56:09

Maybe that would help. They're like, a swap in my time and order that says, I want to swap ETH on main net for Matic on Polygon, and a filler, and just like the previous version, you have this decaying price option for how much Matic you need to fill to get the input ETH. And the order is actually completed on the input chain as well. So the filler, as soon as there's a price at which they're willing to fill, they initiate a transaction that claims the order. They transfer the user's input tokens into an escrow contract and they put up a little bond.

Speaker 1

00:56:11 - 00:56:33

Now, they're basically responsible for sending you those tokens on the output chain. So the next thing that the filler does is they send you those tokens on the output chain. And now the filler, from the swappers perspective, they have just made a cross-chain swap. And then the filler basically has to prove that they did that to claim the user's input tokens on the input chain. And if they don't do the proof, eventually it would go back to the swapper because they never proved that they filled.

Speaker 1

00:56:34 - 00:57:08

Now, how do you do a proof? You can use any possible bridge. So, that's 1 of the really cool things about it is that like Uniswap X cross-chain variant basically can support any possible bridge messaging or any cross-chain messaging protocol or even any other system for how you settle these cross-chain orders. It's kind of completely agnostic to that. But we have some initial smart contracts, which I think will probably be going open source around the same time, that basically allow you to work for the canonical optimism, arbitrum, and polygon bridges.

Speaker 1

00:57:10 - 00:57:30

But yeah, basically, the filler has to proof through a bridge, or they could do it optimistically. 1 way to do it is, it's assumed the filler fills unless someone challenges it. And then it kicks off the force to do it through a bridge. It's like a similar design space to optimistic roll-ups or something. But that shouldn't happen in most cases, because you have bonds to prevent that.

Speaker 1

00:57:30 - 00:58:05

But generally speaking, maybe I'm user signs off to an order that is an auction. Filler initiates a transaction that puts their tokens into the escrow contract, then fills in the output chain and does a proof. And that proof can be an optimistic proof, which means that it's assumed that they do it unless it's proven that they don't. And then in that way, you have very fast, good UX cross-chain swaps. And definitely if you go to a challenge period, then it might be like, if you challenge a swap where you need to prove it through the optimism or arbitrary bridges, which are 7 days, then you have a seven-day lockup period of the input assets.

Speaker 1

00:58:05 - 00:58:16

But that only happens if a filler lies, and then they lose their bond. And so you have to parameterize these bonds to be such that it's not incentive. It's not optimal to fade.

Speaker 2

00:58:16 - 00:58:50

To carry this through with 1 of the themes I established at the beginning, which we talked about with all Uniswap v4 and 1 through 4, there's all these pools and all this complexity. And so this beautiful, elegant mechanism of an off-chain signed order, an off-chain order, that doesn't just solve the complexity problem of pools. It also solves the complexity problem of bridges. And bridges and pools are kind of similar in that regard. And so since we are just signing these transactions, signing these messages, all these off-chain orders that say, I have this token and I would like this other token on this other chain.

Speaker 2

00:58:51 - 00:59:14

All of that gets abstracted by the same service providers, the same fillers. And so they can manage the bridge complexity. They can manage the timing and the latency of that and just provide the swapper the thing that they want, which is the maximum number of tokens in the place that they want it. And all of that complexity is just, again, once again, the whole theme of this seems to be left up to the free market, left up to the fillers.

Speaker 1

00:59:14 - 00:59:39

Yeah, and there's smart contracts on the input chain that enforce that the swapper actually gets what they wanted. Because you do have to choose what is your source of truth for whether or not the order was filled. And that's specified in the order as it's being broadcast. And so it's likely that in our UI, once we have this live in our UI, you'll probably use mostly canonical bridges. So for swaps between Optimism and Mainnet, maybe we'll use the Optimism bridge.

Speaker 1

00:59:39 - 01:00:07

And you can use the optimistic pattern to make it so that you don't actually have to have seven-day delays. And I'll also mention 1 thing that's kind of cool is that it's not just for like, like you can think of it as also like for like fast L2 exits you can use this, right? Some people who are, you know, some people might be willing to like pay you. If you have, you know, ETH on mainnet and want ETH on Optimism, someone who's on Optimism who wants to exit might be willing to pay you a little bit to do that, right? And so you can use this for fast exits as well.

Speaker 1

01:00:09 - 01:00:19

I'd say that definitely the reduced amount of... 1 thing that's a little bit different from most existing bridging protocols is most bridging protocols have passive exposure to bridge risk.

Speaker 2

01:00:20 - 01:00:22

Passive exposure to bridge risk. What is that?

Speaker 1

01:00:22 - 01:00:36

So like if basically like liquidity providers in them are like, like, it's like you hear about like bridge hacks, like basically like that, like, yeah, we do. Yeah. Like you hear about bridge hacks all the time. I think there was a billion dollar 1 like last week or

Speaker 2

01:00:36 - 01:00:37

something. Oh, last week?

Speaker 1

01:00:37 - 01:00:38

I thought so, maybe not.

Speaker 2

01:00:38 - 01:00:41

I've been gone for 10 days. This is the first thing I've done in crypto in the last 10 days.

Speaker 1

01:00:41 - 01:00:42

So I

Speaker 2

01:00:42 - 01:00:42

have some catching up to do.

Speaker 1

01:00:42 - 01:01:24

Well, I don't know if we know how much, I think it was like minimum, I don't know, it was like, anyway, we don't need to get into specifics. But yeah, like, you know, bridge hacks are a thing. And it's because people are like, have like, they're holding, you know, you deposit a token on 1 chain and it has a rep and that at that point the bridge is kind of Like almost like a multi sig holding all the fun those tokens and they have representations of those tokens on other chains. And the sort of risk, and for as long as those tokens live on the other chain in any form, and if you want to have liquidity for people to make trades, then liquidity providers need to hold those like bridged representations of tokens on the other chains. And so like ETH on another chain is always going to be worse than ETH on mainnet.

Speaker 1

01:01:24 - 01:02:04

And you know there's this maybe 1 exception like USDC on any chain is probably like equally the same. Which is kind of interesting and that's why it's interesting that they have a bridge. And by the way, we did do an experiment that made it so that we could use the circle USDC bridge as a settlement system for the cross-chain variant of Uniswap X. But that's sort of an aside. But yeah, it again speaks to, you can basically have I think we're going to eventually have a world where most assets live on the chain in which they were originated or originated or like whatever chain whatever chain that they're like most secure or It's like most canonical for that asset There might be some assets that are like on multiple chains like things that are common stores of value and like, you know, currencies.

Speaker 1

01:02:04 - 01:02:52

So like, you know, top stable coins and maybe ETH and a few others. But like, but generally speaking, like allowing, you know, if you're a liquidity provider, just letting you kind of like hold most of your like, like, let's say that like, you know, I want to fill in like, I could have like some native tokens on each chain. If I want to fill an order, let's say I do a cross-chain swap from some random native asset to Optimism from Mainnet. There might be AMMs on Optimism that are between the Optimism native tokens and other Optimism native tokens and on Mainnet, between Mainnet native tokens. So the filler, they can basically just like, maybe they're holding OP tokens on Optimism, they buy some other Optimism native token, fill your order on Optimism, And then they just receive ETH on mainnet.

Speaker 1

01:02:52 - 01:03:04

And they never at any moment in time had to have fun. They never had to hold ETH wrapped on optimism. Or it just reduces the amount of the size of these bridge honeypots and lets people swap between native assets.

Speaker 2

01:03:04 - 01:03:07

It seems to really minimize the use of bridges in

Speaker 1

01:03:07 - 01:03:08

the first

Speaker 2

01:03:08 - 01:03:34

place. Rather than have bridges being bridges for assets, bridges in this model are simply just used to pass the final message, data, not assets, of approval that the bridge was actually, the trade, the swap was actually executed appropriately. And so it's 1 small use of a bridge to pass a small packet of data rather than hosting long-term liquidity inside of these bridges.

Speaker 1

01:03:34 - 01:03:43

And you don't even need that data packet unless the filler is lying. If the filler actually fills your order, you don't even need to pass that data.

Speaker 2

01:03:43 - 01:03:45

Is it fair to call it minimum viable bridging?

Speaker 1

01:03:46 - 01:04:15

Yeah, we're basically trying to minimize the amount of, assets only live in bridges. Users are only exposed to bridge risk while transactions are in flight. Once the swapper has the output tokens and the filler has the input tokens, there's no more bridge risk for either party, unless those tokens happen to be wrapped bridged assets, but they don't need to be. So yeah, we're minimizing the extent to which people need bridges. We're also kind of abstracting them away a little bit.

Speaker 1

01:04:15 - 01:04:52

This system can kind of support any possible bridge it you could think of it as a bridge aggregator it's important to like note that like the the you know when I've the bridge used for settlement is like different from like like Fillers can use any bridge they want to like move liquidity around You know, they can use centralized exchanges. They could use bridges whatever But then like each trade does have a specific bridge or what we use, we use the term settlement oracle, which can be any bridge. It could also technically be any other system. You could technically use a multi-sig or a governance system or a single party if you wanted. If you wanted to, you could also trust the filler.

Speaker 1

01:04:52 - 01:05:00

Or like, I trust the filler. And then you could trust them. And they could be the, and then you say anything that they say. Technically, you could do whatever you want.

Speaker 2

01:05:00 - 01:05:06

You just need some system to say that yes, that swap was fulfilled.

Speaker 1

01:05:06 - 01:05:30

And this protocol is completely agnostic to that system. It can support any possible system. We have initial smart contract designs that work with, As I mentioned, the canonical L2 bridges for Optimism Arbitrum Polygon, we have a design that works with the circle bridge. But it can really work with every bridge you hear about in the space. Theoretically, you could have an adapter that could use that bridge.

Speaker 1

01:05:30 - 01:05:45

And then bridges are competing on like offering security and latency for like passaging passage passing messages and not like you know Having like billions of dollars of liquidity stored in them passively Which is like real, you know, which is like a security risk and we've seen how that plays out

Speaker 2

01:05:45 - 01:06:10

I just again the theme of this whole thing seems to be harnessing complexity. And Uniswap X, the naming also I think is intuitive because we have Uniswaps 1 through 4, right, which are AMMs. And again, Uniswap X is not an AMM. It is an order router, an order optimizer. And so we have all of this expressive liquidity protocols that we call AMM, Uniswap's 1 through 4.

Speaker 2

01:06:10 - 01:06:24

And then we have this other expressive order fulfillment service called Uniswap X. It really kind of seems to be like a yin and a yang, like 2 sides of the same coin, where if you smash these things together, now you have Uniswap. That is Uniswap. Right?

Speaker 1

01:06:24 - 01:06:36

Right. Yeah, I'd say that this is definitely a moment, and it's not the first moment, but it is a moment where Uniswap as an ecosystem can step slightly beyond what it's done and continue pushing into new territory. New

Speaker 2

01:06:36 - 01:06:37

frontiers, please.

Speaker 1

01:06:37 - 01:06:56

New frontiers. Yeah. I'd say that definitely the end goal is we want to create decentralized markets. We want Today, people use decentralized markets because they are decentralized, but they don't, but there's like a trade off, right? Like the user experience is still a little bit worse.

Speaker 1

01:06:56 - 01:07:38

Like, they still like, it's still not as efficient. There's still not as much liquidity. It's still, you know, like you kind of like people use it like despite the flaw, the, but we think that like in the long run, like decentralized markets can actually be more powerful and stronger and have better user experience and more efficient market structures. Even when you think about a market-based approach to something versus a single company that's trying to optimize for you. Moving into these models, we just think that like, and using also all these new tricks that we've learned in blockchains and with new novel cryptography and eventually we'll have better ZK tech and that's going to be part of the story.

Speaker 1

01:07:38 - 01:08:02

This is like a first step. That's a really important thing I want to get across. We want to build the ultimate decentralized order flow network and there's a broader industry around us that is also working on these problems. We want to do it like collaboratively, right, like teams like Flashbots, et cetera. There's like all these other teams that are also working towards like how do we like decentralize order flow.

Speaker 1

01:08:02 - 01:09:08

And this is part of that story. But I think it's a really big moment for the industry because Uniswap is, in part because of how dominant Uniswap is from a, in terms of volume and users, something like probably 30 plus percentage of all gas on Ethereum is Uniswap trades and I guarantee it's a higher percentage of MEV because Uniswap trades generate more MEV than transfers. And so it might, you know, and so like having, you know, like I think that like us kind us stepping into space and is really important for helping push the industry forward, and also having users and being able to learn from them and optimize and improve for real people that are really transacting is really useful and important. Again, we're really excited to do it collaboratively, and if these other models also end up working out, things like Swath could be directly tied into things like Uniswap X. They're not also automatically competitive.

Speaker 1

01:09:08 - 01:09:11

We're all working towards decentralized order flow, generally.

Speaker 2

01:09:12 - 01:09:18

So what's the rollout plan for Uniswap X? How does it get started today, Monday the 17th?

Speaker 1

01:09:19 - 01:09:20

Yes, today, Monday the 17th.

Speaker 2

01:09:21 - 01:09:27

It's actually Sunday for us, but for you guys who are hearing this on Monday, what's the rollout plan? How does this actually launch?

Speaker 1

01:09:27 - 01:10:12

Yeah, so today what we have is the single chain main net variant is in an early opt-in beta stage, meaning that when you go to the Uniswap web app, you can go into settings and you can turn it on. You can also just make transactions, and if there's a transaction that the interface thinks you will get a better price if you use Uniswap X or if not a better price. I think again, this is the first, it's sort of like an early beta. And so it's like, yeah, it will suggest it to you and you can turn it on, even once you've turned it on, it doesn't mean 100% of trades will route through it. It's actually going to be probably a smaller percentage of trades, only certain tokens, only certain trade sizes, only certain pairs.

Speaker 1

01:10:14 - 01:10:39

This is again the earliest beta rollout. We want to really test the system before we roll it out to a full user base and for all orders. And so today, what we have is a working system for the mainnet version and the ability to opt in and have some percentage of your trades execute through it. When you do, you will see that your orders now no longer cost gas. There's some minor UX tweaks that show that there's no gas being paid.

Speaker 1

01:10:40 - 01:10:56

It will be a signature instead of a transaction. When the transaction is pending, you can't go to Etherscan because the transaction hash hasn't been created because it's just an off-chain signature. So there's a few things. It's kind of like a slow rollout. We really like, you know, this is a big moment and a big change in a complex protocol.

Speaker 1

01:10:56 - 01:11:18

We want to optimize parameterization. We want to give time for, you know, a competitive marketplace only exists once people join it. And so we have a little bit of work to onboard some initial fillers to help test the system. But we really want to give time for more people to onboard and interact before it becomes the full thing. And so this is an early version.

Speaker 1

01:11:18 - 01:11:48

And now, in terms of the cross-chain variant, unclear. We have smart contracts right now, stuff like parameterization, how long it will take fillers to start to integrate cross-chain. They're still probably going to have to wrap their head around the single-chain variant, and that will take some time. As well as the front end considerations of cross chain trading, there's some other changes that probably need to be made to let you swap between different chains in terms of how we handle network connection and other things. So we're starting to work on improvements in our web app today that make it more multi-chain native.

Speaker 1

01:11:48 - 01:12:07

If you look at our wallet, our wallet handles multi-chain very cleanly and our web app is not quite there. And so as we're optimizing the single-chain variant, we're going to start optimizing our web app to be better for multi-chain generally. And then hopefully later this year, we have the cross-chain variant in our web app as well and

Speaker 2

01:12:07 - 01:12:21

people will be able to make trades. What service providers or what other people, infrastructure is needed in order to actually get this thing up and rolling? Who do you need to hear from? Who do you need to get onboarded?

Speaker 1

01:12:21 - 01:12:57

Yeah, I'd say that a lot of it already is like swappers just need to use the web app as normal. Liquidity providers just need to create liquidity and use swap protocol as normal. I'd say that what's new is there are definitely fillers, and there's initially just an API that broadcasts orders, and so integrating that and being able to fill orders, there's already all these people that do block building that can start tapping into that. So we need fillers to start discovering orders. Also, for the RFQ variant, definitely there's a need of people who provide quotes up front.

Speaker 1

01:13:00 - 01:13:27

That's about it. I'd say that probably wallets having good UX around signature-based orders will help. They all have signatures, and other sites have done signature-based orders before. But the more the wallets can be aware of the UX implications of this, the better. I'd say that people can start looking at the cross-chain smart contracts and thinking about how to build adapters for other bridges if they wanted, if devs want to get involved in that.

Speaker 1

01:13:29 - 01:14:06

Generally, infrastructure around alternative, A cool thing is that when a user signs an order, they're incentivized to broadcast that order as broadly as possible. They want as many fillers to discover that it's possible. Similarly, if you're a filler, you want to discover as many orders as possible. And so having redundancy at the broadcasting layer, like today we have in mem pools and whatever, for Ethereum transactions, having alternate APIs for hosting signed orders, stuff like that could be helpful or interesting. I think over time, it won't just be 1 API for hosting these signed orders, and that's not the goal.

Speaker 1

01:14:07 - 01:14:16

So things that help further the decentralization, I guess, is also desired. But yeah, I don't know. That's a bunch of stuff.

Speaker 2

01:14:16 - 01:14:35

That's a lot of surrounding infrastructure. Again, a lot of moving parts, a lot of complexity, but also protocols that harness complexity is kind of a core theme of not just the Uniswap in the last year or so, But really crypto at large, I would say. Hayden, it's been a crazy year for Uniswap in

Speaker 1

01:14:35 - 01:14:35

2023.

Speaker 2

01:14:35 - 01:14:43

You got the mobile wallet, Uniswap V4, now Uniswap X. Is there, I mean, we're only halfway through the year. Are you gonna be on again before the end of the year?

Speaker 1

01:14:43 - 01:14:47

I think I'll be on, I'm expecting 2 to 3 more times.

Speaker 2

01:14:47 - 01:14:51

In 2023? Probably. Oh my god, what else is coming?

Speaker 1

01:14:51 - 01:14:56

We got some things lined up. I can show you privately after this podcast.

Speaker 2

01:14:58 - 01:15:11

All right, well apparently, Bankless Nation, you can hold your breath because Hayden Adams will be back for more Uniswap releases, just the absolute juggernaut in 2023. Hayden, thank you for being just such a strong bear market builder and really pushing the space forward.

Speaker 1

01:15:11 - 01:15:18

Thank you. Thanks for having me on and always love coming on Bankless. And Yeah, we're trying to decentralize finance. O'Reilly.

Speaker 2

01:15:18 - 01:15:30

Yes, we are. Yes, we are. And we're doing it a little bit jet-lagged at the very start of ECC. Both Hayden and I landed coming from the East Coast just a number of hours ago. So that's aping into ECC with a podcast.

Speaker 2

01:15:30 - 01:15:32

Hayden, thank you so much for joining me on Bankless today.

Speaker 1

01:15:32 - 01:15:33

Thanks for having me on.

Speaker 2

01:15:33 - 01:15:42

Cheers. Bankless Nation, you know the deal. Crypto is risky, DeFi is risky, Uniswap X is a brand new protocol. It's probably also risky too, just because all things are. You can lose what you put in.

Speaker 2

01:15:42 - 01:15:48

We are headed west, however. It's not for everyone, but we are glad you are with us on the Bankless Journey. Thanks a lot.