Live Rollup : Empire 16/06/2023

Source : https://www.youtube.com/watch?v=iXna91tBcDo

Live Rollup : Empire 16/06/2023

A little background

Early Days of Uniswap (4:00)

The story begins in 2016 when Vitalik Buterin published a post on Reddit in which he noticed the early stages of decentralized finance. Vitalik proposes to remedy these problems by using an "on-chain automated market maker", and this idea will be followed up by Hayden Adams the year after.

In the beginning, the founder Hayden Adams was not technical. He learnt the basics of Ethereum, Solidity and Javascript thanks to the available resources and people willing to help

Hayden Adams's story is still considered one of the best stories in crypto that shatters the notion that entering the space requires being super technical.

Uniswap Success Story (6:00)

At the time, a cohort of investors believed AMMs would never work due to their inefficiency compared to other liquidity structures like order books

Despite that, Uniswap is currently the most widely used protocol in crypto in terms of users and volume.

Lots of things we are building in DeFi look and feel very similar to Traditional finance (TradFi), but there are new primitives that expand possibilities as a user and as an enterprise

The Previous Versions (8:30)

  • In Uniswap v1, anyone could be a liquidity Provider (LP)
  • In Uniswap V2, pools were optimized for funds to be an LP, as anyone can create a liquidity pool for any ERC-20 token
  • In Uniswap V3, there was concentrated liquidity which provided a much better execution for traders, but it vastly increases the amount of Impermanent loss to a point that it was almost impossible for LPs to make money

Purpose of UniSwap V4 (11:00)

Nowadays, Impermanent Loss is termed as "Loss Versus Rebalancing (LVR)" and people are more and more aware of arbitrage bots which take profits from LPs.

Therefore, the big point of Uniswap V4 is to increase profitability for LPs and provide more customizability for liquidity pools. Basically, everyone got the building box and we'll get open source innovations for LPs.

Uniswap V4 features

Singleton (14:00)

All liquidity pools are housed in a single smart contract, we've already seen Singleton before with Balancer V2. Basically, it reduces gas costs for multi-hop swaps by optimizing gas expenditure on behalf of the user

Also, Uni V4 leverages EIP-1153 flash accounting to optimize gas utilization by performing complex calculations without saving them to the state of Ethereum

Hooks (16:00)

Hooks allow customization at the pool level, giving complete control over protocol-owned liquidity to pool owners. We have a wide range of features :

  • Time-weighted average market makers (TWAMMs)
  • Dynamic fees based on volatility or other inputs
  • Onchain limit orders
  • Depositing out-of-range liquidity into lending protocols
  • Customized on-chain oracles, such as geomean oracles
  • Autocompounded LP fees back into the LP positions
  • Internalized MEV profits are distributed back to LPs

One of the interesting things about customization is MEV internalization

For example, Osmosis has MEV internalization, which permits to capture MEV opportunities for themselves rather than allowing users or arbitrageurs to do so, and provide those revenues back to OSMO token holders.

That said, Uniswap can be begin block aware but not end-of-block aware, which limits its ability to optimize MEV revenue.

In one sentence, Uniswap V4 is infrastructure for other people trying to build trading infrastructure. It allows for more customizability on behalf of liquidity pool owners, but with additional customizability comes a lot of complexity that we don't know the long-term effects of.

The Use Cases (18:00)

The flexibility and customization provided by V4 gives tools to developers and liquidity owners to decide how they want to leverage their liquidity provision :

  • Out-of-range liquidity can be leveraged for lending markets for example
  • Hooks can allow liquidity to be provided across multiple invariants, so we can imagine a future where we're not going to need new amms anymore. We can create a hook thats creates a liquidity pool that mimics whatever new functionnality comes around

Focus on invariants

The invariant is the formula used to calculate the asset price in an AMM :

  • Uniswap uses x*y=k which creates ranges for trading assets
  • Curve uses Stableswap for trading stable coins with reduced volatility
  • Uniswap v3 allowed creating a range where you want to provide liquidity but still had the same curve slope.

Uniswap v4 potentially allows different invariants depending on the pool, opening up opportunities for passive retail users to provide liquidity

  • Uni V4 also allows to abstract and simplify how we can build on top of it. Protocols like Panoptic, Gamma Swap and Infinity Pools are building on top of Uni V4 : instead of doing complex actions to provide liquidity, we can just deposit into a liquidity pool designed by one of these protocols and that's it.

The concerns

Liquidity fragmentation (19:00)

With hooks, we can create permissonless pools and KYC pools. KYC Pools are made for institutions to use DeFi, but it also means that some pools can be used and not others

This is just an example, but there can be other hooks who brings liquidity fragmentation.

Too much customization would not be good (22:00)

Greater customization flexibility increases the surface area of potential things that could backfire. For Ren, there are some immediate risks :

  • Rugging risk : deploy a liquidity pool with a hook that points to a certain smart contract, which later points to another smart contract with a withdrawal fee, can cause everyone to withdraw their liquidity.
  • Perhaps there's going to be a "hook template business", which could be an attack vector on its own

Licensing concerns (44:00)

We can also mention that Singleton contracts are directly inspired from Balancer V2, also without credits

Copying features is common in every industry. If we are the market leader and other people have better features than us, we have to copy-paste to stay competitive (Uniswap had to create UNI token to get the farmers back from Sushiswap)

The criticism comes from copy-pasting under licence in an open source environment. Open-source innovation is a double-edged sword. It allows for great work but also allows others to rip off great work and paste it as their own.

Looks like crypto will create monopolies over time because it comes down to brand + first mover advantage and open source is gradually being replaced by BSL

What to expect with Uniswap V5

The App Chain Thesis (36:00)

According to David, the next logical step for Uniswap is to become an app-chain for v5. The purpose of Uniswap v4 is to increase customizability, but  if we want to increase it even more, the app chain is legit as we can do pretty much anything with it, even MEV management

It would make sense with Transient Storage (EIP-1153) that is potentially going into the Cancun upgrade : Uniswap Singleton contracts need transient storage to be baked into Ethereum for them to have optimal gas-efficient routing and pool creation.

Benefits (38:00)

  • We're able to monetize at every layer and have full customization of our application.
  • Owning the full stack allows for prioritizing product development without political lobbying
  • App chains give communities ownership of applications

Does Uniswap needs it ? (39:20)

Ren, on the other hand, expresses concerns that Uniswap may not move to an app chain model due to value capture. We can capture value from 2 ways :

  1. Internalization of MEV
  2. Turning on the Fee Switch

Hooks were made to capture value this way to some extent, and this is a narrative publicly pushed by Uniswap themselves. If value capture works well with hooks, there's not so much need for an app chain

Interoperability Standards

Importance of Interoperability Standards (49:00)

In an industry where we have EVM chains, non-EVM chains, rollups and so on, we need to converge on an interoperability standard. There are several reasons to explain this :

  • Communities are unlikely to leave their ecosystem, so bridging to them is necessary.
  • Uniswap will have outposts on every L2 with official front ends that can communicate asynchronously

The IBC standard

According to David, IBC is the most trustless and the most battle-tested one, which makes it the best interoperability standard available.

Some teams like Polymer or zkIBC also work to make IBC compatible for Layer 2s.

IBC Readiness (52:00)

David thinks IBC is good enough today but not ready yet for mainstream adoption.

There has been a lot of work done on cross-chain production abstraction using IBC, and we could see some innovations coming within 12 months. However, the success of these projects is a whole other thing, because there is no Business Development teams in there.

User Experience > Chain Affiliation (54:00)

For Santi, Tech enthusiasts have strong opinions on certain chains. But in the end, real users care more about user experience than which chain is being used. Formerly called BSC succeeded as hell in 2021 thanks to fast transactions and cheap costs compared to Ethereum. User Experience was better on BSC than Ethereum at that time, that's why it worked

Same rules for Cross-chain, it needs good user experience, fund games and applications to succeed.

Liquidity migration from V3 to V4

Migration will be slow (55:30)

Migration from v2 to v3 was slow, and Ren expect it to be slower towards v4 due to the complexity :

  • We have a product whose complexity is left to the user
  • We don't have battle-tested pools yet
  • This is an entire system to learn
  • Protocols may build their own smart contracts for hooks and must be audited before launch

Hooks-as-a-Service (56:00)

Most people would not spend their time thinking through all those mechanisms. Hence, liquidity migration would be carried out by protocols offering a service that makes it easy to use

https://defillama.com/protocols/Liquidity%20manager

Liquidity Managers on brink of entering a new dimension (maybe...)

Liquidity Mining (56:30)

It's important to incentivize users so they don't forget about migrating. With hooks, we can donate to specific in-range liquidity providers, and it will be interesting to see how incentives for liquidity are structured (even though we saw this before with "Boosted Positions" from Maverick)

In bulk

What about Curve ? (33:00)

Ren thinks that Curve still has its role within DeFi :

  • Curve is still the home for stablecoins, LSDs or like-for-like swaps.
  • Many protocols are dependent on curve success as they own the CRV token. Unless UniSwap starts catering to individual protocols by offering some type of liquidity mining program which is unlikely, curve will continue to have its use case.
  • Curve now has a stablecoin (crvUSD) which was launched some time ago, and LLAMMA is an innovative model

The Fee Switch (41:00)

Is it worth keeping the Fee Switch for UNI token holders considering that Hooks would allow the same thing ?

😇Just the very nature that token holders could hold a fee switch makes the UNI token valuable

😈The fee switch adds complexity to decision-making between LPs, UNI token holders, and liquidity providers. In addition, SEC is watching Uniswap (in fact, SEC is already at their home)

Disclaimer

Santi acknowledges his bias towards Uniswap since he was an angel investor in their seed round through Paradigm