 All right, my name is Hayden Adams, and I'm the founder at Uniswap. I'm just talking about building on Uniswap. So what does this talk about? It was going to be a talk about Uniswap, but now it's a weather advisory. Hurricane is a tropical cyclone that's in North Pacific and Eastern North Pacific. A typhoon is a tropical cyclone that takes place in the Northwest Pacific. Super typhoon Higibus is a category five hurricane that's penetrating to the fans. There it is. It's on its way. All right, what does this talk about? It's talking about Uniswap. It's about what can be built on it today. It's about how we can expand its utility, you know, in Uniswap version two, and then how we can scale Uniswap while retaining its utility. So what is Uniswap? It's first and foremost a decentralized exchange protocol. It makes use of automated market making. It makes use of pooled and tokenized liquidity. And what that means is in a traditional exchange you kind of have buyers and sellers matched up on an order book. In Uniswap you sort of automate that whole process and then you give people a token that sort of represents their position. It's easy to understand and use and that's one of the most important things. So why is it needed? First it lowers the barrier of entry to the participation and finance. So in Uniswap anyone can be a market maker. This is the current distribution of market makers on Uniswap as of a few weeks ago. About 25% of people in the $2.5 billion die pool come from users who use less than 1%. So it basically allows you to pull together a lot of small market makers and do what used to be only a Wales game. Anyone can create and list an asset. This is super important. In Uniswap right now there's over 800 tokens. About 100 to 150 have actual usage. It's a lot easier to get listed on Uniswap than on NASDAQ or even on a centralized exchange Anyone can build on top of it. And this is more of the topic of this talk. Part of the reason for that is that it's all open source. It has an open source front end documentation, smart contract, SDK. And so since they launched last November there's been a number of projects that started building on top of it. So what are the use cases right now? It seems like a lot of people are using it for trading tokens on Ethereum. So trading interfaces, wallets, debt aggregators. And then we have some people want to use it to earn interest as a market maker. What they're doing is they're maintaining a 50-50 ratio of ETH and the ERC-20 token and then they're earning fees on trades between the two. One option you could do is you could use that liquidity as collateral, take out a loan against it and basically be able to leverage up on market making. Another option is to create a liquidity source for an application you care about. So MakerDAO put in a lot of, or there's a lot of MKR, there's a lot of Spank. And the reason is tokens like Spank have a really hard time getting listed on exchanges because they have to do it in the industry. Some people, and this is the one that I'm more interested in, it's like integrating Uniswap directly inside of applications. So for example, you could, you know, you could use it as an exchange so for example, you could, you know, lock up ETH and MakerDAO, borrow DAI, swap that DAI for ETH, lock that out and MakerDAO again and you can kind of loop through protocols to leverage out. So there's been, you know, some projects that have tried this out, like Open, Neo, Dustin, stuff like this. But what we really want to do is we want to improve Uniswap so that it can serve more use cases than it does today. And we're going to do that with Uniswap version 2. Okay, so the first and most, and one of my favorite features is decentralized price articles. The second is, you know, direct ERC-20 to ERC-20 pairs. We now Uniswap forces all tokens to be paired with ETH. And there's a lot of, there's a big advantage there, but then there's also some versatility that you can get out of allowing arbitrary pairs. And finally, we've refactored the entire code page to make it a lot more flexible, more secure, and sort of better for the long term. Okay, so how do these articles work? Well, the idea of the articles is that it provides a maximally decentralized on-chain price feed for any ERC-20 token with a very clear incentive structure. Very easy to reason about, like the cost of attack, how secure it is. And it can be useful for things like synthetics, lending, automated trading, stuff like that. One example use case that we're looking at is, you know, Augur needs a rep to ETH price feed for their version too. So, actually, before we get on, I'm going to maybe explain a little bit of how these articles work. So, the most meaningful price, you know, right now there's already projects that use Uniswap as an article. They try to checkpoint the price for maybe some sort of lending system or some sort of synthetic asset, but it can be front-run. The transaction that checks the price on Uniswap can basically, someone can minute you like the price right ahead of that transaction and basically, you know, mess up the article. For a relatively cheap, for a pretty cheap, it doesn't cost that much. Especially since you can synchronously, like front-run it, move the price, let an article transaction go through and then push the price back seamlessly. So, what we're going to do is we're basically going to have every transaction check the price. And the first transaction at the block where you store that price. And what we can do is we can basically average prices across multiple blocks so that, you know, manipulating the price on Uniswap, you could, you know, you might be able to manipulate it for one block, but for manipulating across a thousand blocks or across an hour or a day, you know, what we're ideally wanting to expose is allowing people to build pretty much arbitrary and time-length articles on Uniswap. So, if you check the article once, at the beginning of the day, once at the end of the day, you can get a perfect one-hour time-weighted average price of the price on Uniswap at the beginning of the block. The reason we do it at the beginning of the block is basically because in order to manipulate the price at the beginning of the block, you have to do the last transaction in the previous block which means you're opening yourself up to an arbitrage in the next block. And doing that across, you know, blocks could be very expensive. Can you use the microphone? Oh, you can't hear me? Yeah, that's better. Tell me about that. Okay, the other feature we're working on is ERC-20 to ERC-20 pairs. The main idea here is to allow liquidity providers to take on a wider range of positions. Also allow for lower slippage and fees on direct ERC-20 to ERC-20 pairs for ones that have a lot of liquidity in them. Right now, you know, when you go ERC-20 to ERC-20, you have to go ERC-20 to ETH to ERC-20, you pay 0.3% fee on both sides and then the slippage on both sides. This in general increases the protocol flexibility. So an example for the use case where this is maybe most interesting is allowing tokens to be paired against stable coins or even stable coins paired against each other or just very highly correlated assets. If you create there's all sorts of different projects where they create assets that are meant to be correlated with each other. For example, you can imagine like CDI and DI you can create an input between the two. You're going to have very low loss. Very low basically losses in Uniswap come from the prices diverging in the assets. So an example of the use case would be a CDI to CUSDC pair on Uniswap. So a while back we were thinking about the idea of like a DI to USDC pair as an example use case for this but one thing that kept coming up was the opportunity cost of lending stable coins. So right now if you let DI to C you can make about 15% return versus if you were a liquidity provider on the system in Uniswap you would have to be making a 15% return for it to be worth it. But if we have the sort of ability to create arbitrary ERC-20 so for the pair is we could create a pair between CDI and CUSDC where when someone wants to trade the trader is abstracted from them they just send some DI to the contract the DI goes to the compound converts it to CDI and then CDI goes to Uniswap convert it to CUSDC CUSDC is back to compound for USDC and then USDC is back to Uniswap in a single transaction and what you have is for the liquidity provider they're basically leveraging up while earning fees on Uniswap for the trader all they deal with is DI and USDC and so they have a much lower opportunity cost in this case for being a liquidity provider yeah so there's no LP loss as long as you can maintain their peg in this case now this is not true you should be telling me that's wrong because technically they can have a different interest rate so there might be a very very small very very small potential loss between the two but not very much so yeah users can swap DI for USDC at very low prices and then you could also even imagine the CDI into USDC liquidity, pool tokens then being used as collateral because it's very stable and then not only have you leveraged up by lending and market making at the same time but then you're taking out a loan against that same collateral again yes the money Legos get kind of crazy but we have a lot of fun with it okay so one of the things the thing that this has been focused on so far is like the idea of building on top of Uniswap and we also want to improve the UX of Uniswap and one of the best ways to improve UX for a single application is using Layer 2 but with most Layer 2s that have existed up until this point it's been it's always made this sacrifice to operate cleanly and smoothly with other applications so there's a few different applications out there there's Plasma, there's Eco-Roll-Up and now there's Optimistic-Roll-Up maybe I'll very briefly very very quickly high level explain Optimistic-Roll-Up you post blocks you execute them optimistically which means you assume everything is valid unless it's proven invalid and then basically there's some data off-chain that users can have that prove whether or not the transaction is valid or invalid very very scalable because you basically execute everything off-chain and you don't put any data on-chain then you have ZK-Roll-Up this is the idea that you can do a you can put data on-chain very like minimal data for transaction and then you do a Starms-Proof that all that data is executed properly Optimistic-Roll-Up basically combines the two ideas we execute everything optimistically there's blocks that are posted and you assume that they're valid but then you post the data that you need for the Frog-Proof to Ethereum Ok so Optimistic-Roll-Up is lit Optimistic-Roll-Up can scale uniswap we can do generalized smart contracts oh yeah and Optimistic-Roll-Up can scale generalized interoperable smart contracts on Ethereum so we can continue to build stuff like Uniswap while scaling it some credit to Plasma Group there's Carl over there I don't know if anyone else from Plasma Group is in here, maybe not but made up of Jinglan Wang Carl Flush, Ben Jones, Will Meister and then credit to Vitalik Group made up of Vitalik who has also done a lot of most of the research not most of the research but he there was the Plasma Research for sure and creating Ethereum so Optimistic-Roll-Up do Uniswap yes it can and we built it it can do about and by we I mean Uniswap created a front-end and Plasma Group created a back-end it can do about 250 transactions per second or it can if we optimize the client on Istanbul it can you know has native metatransactions so you can queue up multiple transactions and it was built by Uniswap and Plasma Group so now I'm going to ask you all to pick a team really important are you team Unicorn Unicorns are majestic, they're shy they're beautiful and they love long walks in nature or are you team Pig they're cute they're very smart they're the life of the party and they love eating until they fall asleep okay raise your hand if you're team Uni raise your hand if you're team Uni is this bad come on a few more people raise your hand okay raise your hand if you're team Pig okay okay it seems to be 50-50 mathematically but not in this room not in this room I guess the pig liked my talk more okay so we're waiting in the site it's called unipig.exchange I'm gonna demo it right now I think I have time okay I have time okay cool alright unipig.exchange is a demo with Uniswap on Optimistic Roller we've been working on it for the last month alright so the first thing we need some form of civil resistance because the money is all fake so we can't charge you fees alright so you can go get tokens from Twitter and we have a pretty great Twitter faucet alright it brings up is tweeting at Unipig.exchange I'm gonna tweet waiting for my tweet I'm gonna tweet yay so we just got sent 30 Unit tokens and 30 Piggy tokens on our Layer 2 wallet this wallet is a burner wallet built into the browser you can see you can open it up there's a wallet now I'm not gonna be waiting very long for these transactions to be firm and it's done and it's done we don't want to we want to sell all our pigs so they increase the value of the money in a sec okay we also have Trigger and Air Drop if this is it's basically to encourage participation so if two people match up they both have wallets on Unipig they can scan each other just like that there you go and I got 10 tokens on this account 10 tokens on the other account the real thing with Optimistic Rollup is it's a massive massive UX improvement over using the base chain you can get instant confirmations you can get 250 transactions per second you can you don't need to do the approve and transfer you can basically queue them up together it basically doesn't exist yeah let's see our stats here so we've done about 2100 transactions through our DEF CON we've had a bunch of people try this demo I didn't realize this I always pay really high gas price for all my transactions the average gas cost the average wait time for transactions on Ethereum is over a minute so we've saved 3600 minutes for the transactions of people just sitting around waiting so that is a lot of time yeah alright anyway I think I'm going to open up your questions if you have any questions about this demo about Unisvlog B2 if the transactions are optimistic how soon will people know that I'm lying how soon will people know that you're lying okay as soon as they get the basically so you have someone informing a block they submit that block to Ethereum so it's a block header and a hash and then some data anyone in the world as long as they have an Ethereum node they'll see all that data and that's all they need to validate every transaction on the block so ideally someone is watching the chain anyone who cares about it can watch the chain catch and validate the transactions so basically as soon as they submit it as long as someone is watching you should find it you know what trading baseball cards or something like that would be really really cool do you happen to work at a crypto startup that involves baseball cards no no I agree one thing I really like about what has felt really validating about building this demo is that I do feel like you can create something kind of like the way crypto kiddies went viral and it just kind of shut down Ethereum we could create something like that where as a virus Unifig is not necessarily like a super viral game because it doesn't have that many elements to it but you can create something crypto kiddies like that could reach a much much much wider audience of people without like completely reaching the entire capacity the ES20 to ES20 error is great but do you think it's going to break liquidity because it's going to create a lot of unique errors that is a good question I think that the way that I see it playing out is that for the vast majority of tokens they would still be paired with ETH the only really ETH or maybe some stable coins I think that there are very specific use cases I don't know if you've heard of like yield protocol that maybe makes usage of sort of of the arbitrary pairs but for most of them I just see them being paired with like maybe ETH maybe DAI maybe USDC you have a couple and if you do a couple it's actually not that difficult to kind of check the price on a couple different ones yeah actually if you want to so the idea of the yield protocol is that if you take Y tokens and you pull them with their respective tokens if you have like YMKR and you have the Oracle features then you can create an interest rate Oracle that can be used in systems like CalmDown yeah any other questions I've heard discussions about determining the transaction fee on Uniswap as a meter we have constant slippage for a given price is there any research like instead of using a 0.3% they're just having something that's more dynamic that could reduce there has been research actually a lot of that research I don't know if you've heard of Charlie Noyes at Paradigm he's been investigating that at the current moment I don't have any sort of formula that I think is better what option is you can just really create pools of few different denominations and the problem there is you once again for actual liquidity it's definitely like an important area of research some of my intuition around this is basically if you had a different fee all it would really mean is like maybe almost like a different liquidity level where this would be equilibrium like there's sort of a point with the volume and the liquidity kind of matches up and I think that that point just kind of changes based off the fee level but for certain pairs it's true that like if you can have a specific pair that's really really I think that's about 20 minutes but basically if you could have a specific pair that's like really like tightly very tight margins on another exchange obviously Uniswap becomes less efficient for that so this doesn't use metatransactions actually this uses Unipic uses a in browser burner wallet which is nice so it can like sign for your private key it's stored in your local storage or your companies or whatever so the idea when I said native metatransactions what I really mean is native account abstraction basically the idea is in Bitcoin for example you can sort of take multiple UXCFOs and you can kind of send them like you can basically paralyze or like say these three transactions all need to happen synchronously in Uniswap or on Ethereum you have to use a smart contract to do it so it makes it a little bit more complicated to kind of queue up for example if you want to do an approve and then a transaction that uses transfer from you can't naturally queue them up directly from your wallet but it would essentially allow you to queue up transactions so that you can alright I think that's at the ground time