xulian Profile picture
Jun 14 26 tweets 9 min read Twitter logo Read on Twitter
I've spent some time diving into the @Uniswap v4 whitepaper so you don't have to. 🦄

Here's a breakdown of the major improvements and why they're special.

1/25: 🧵 🦄 Image
2/25:
But first, let's give some context on Uniswap v2 and v3.

Uniswap v2 facilitated ERC-20<>ETH and ERC-20<>ERC-20 transactions using a constant product market maker (CPMM) model. However, it had its limitations such as gas inefficiencies and lack of price range specificity. Image
3/25: Uniswap v3 introduced concentrated liquidity, which allowed liquidity providers to set a specific price range for their capital allocation. This improved capital efficiency but added complexity and increased gas costs for users. Image
4/25: Uniswap v4 carries forward the benefits of v3 and makes efforts to tackle some of its challenges.
It introduces features like arbitrary code hooks, improved gas efficiency, the singleton implementation, flash accounting, and support for native ETH.
5/25: The first new concept, hooks, are externally deployed contracts that execute some developer-defined logic at a specified point in a pool’s execution. This allows pools to be highly customizable and even accommodate new functionality.
6/25: For instance, hooks could be used to create a time-weighted average market maker (TWAMM) to break up large orders over time. While hooks increase customizability, they can also complicate the user experience. For example, understanding and leveraging a TWAMM.
7/25: Other potential uses for hooks include volatility-shifting dynamic fees, mechanisms to internalize Miner Extractable Value (MEV) for liquidity providers, and different types of oracle implementations. The possibilities are virtually limitless.
8/25: TWAMM, specifically, allows executing large orders over time to minimize price impact, a common problem with large trades in AMMs. A TWAMM could be implemented as a hook.
This brings a whole new level of sophistication to AMM trading strategies.
9/25: Another important feature of Uniswap v4 is its "singleton" design pattern. By having all pools managed by a single contract, it reduces the cost of pool creation and multi-hop trades. This is a considerable improvement over the factory model used in previous versions. Image
10/25: Alongside the singleton design, Uniswap v4 introduces flash accounting. This means Uniswap v4 updates an internal net balance and makes external transfers only at the end of the lock, reducing gas costs but adding a layer of complexity.
11/25: Flash accounting simplifies complex pool operations like atomic swapping and adding liquidity.
It also improves the efficiency of multi-hop trades.
For the end user, they simply get cheaper costs to swap and better slippage on multi-hop swaps.
12/25: Uniswap v4 also supports native #ETH. While this was removed in v2 due to implementation complexity and liquidity fragmentation, the introduction of flash accounting and singleton pattern makes it possible to reintroduce native ETH. Image
13/25: The gas savings from native ETH support are significant, as native ETH transfers are about half the gas cost of ERC-20 transfers.
However, the complexities of handling native ETH had led to its removal in v2, and it remains a challenging area.
14/25: Uniswap v4 also introduces ERC-1155 token accounting, which can further reduce gas costs.
ERC-1155 can help users who frequently use the same tokens over multiple blocks. This can reduce gas costs by up to 40% and further increase capital efficiency.
15/25: These new features and improvements have the potential to enhance the efficiency of Uniswap.

But the added complexity may require a steep learning curve and potentially limit adoption among less tech-savvy users.
16/25: It's also important to note that Uniswap v4 will not replace v2 and v3. Each version has its unique features and serves different use cases.
The decision to use v2, v3, or v4 will depend on a user's specific needs and understanding.
17/25: Uniswap v4 represents a step forward in terms of possibilities, but it also shows the inherent trade-off between efficiency and user-friendliness in the DeFi space. It will depend on front-end implementations to see how end users can interact without deeper understanding.
18/25: With Uniswap v4, it's clear that there's still a lot of experimentation and learning to be done in the DeFi world. It pushes the boundaries of what's possible, but it also brings new challenges and complexities.
19/25: For those who are willing to climb the learning curve, Uniswap v4 offers a wealth of possibilities. But for the casual user, the complexity may be a barrier.
Hopefully good use of hooks and UX can make that experience a breeze.
20/25: The introduction of Uniswap v4 shows that the DeFi space is still evolving and exploring. It's a step forward in some areas and a learning opportunity in others.
21/25: Uniswap's journey from v2 to v4 also demonstrates that there's no one-size-fits-all solution in DeFi. Different versions will be more suitable for different users, based on their needs, technical ability, and risk tolerance.
22/25: It's also a reminder that even as DeFi matures, there's still a lot of experimentation happening. Uniswap v4 is a significant part of that experimentation and learning process.

You can read more details on their announcement here ⬇️
blog.uniswap.org/uniswap-v4
23/25: So whether you're a developer, a trader, a liquidity provider, or just an observer, Uniswap v4 is an interesting development to follow. It represents both the potential and the challenges of DeFi.

Find the full whitepaper here ⬇️
github.com/Uniswap/v4-cor…
24/25: It's worth noting that while Uniswap v4 introduces many new concepts, it's still a work in progress. It will be fascinating to see how these features evolve and how the community responds.
25/25: If you're interested in the technical details of Uniswap v4, I recommend diving into the whitepaper. Remember, the DeFi space is complex and rapidly evolving, so it's essential to keep learning and stay informed. 🚀

If you enjoyed the read please give a follow, like & RT

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with xulian

xulian Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @KingJulianIAm

Jun 15
I went through the @CALC_Finance's innovative DCA Plus whitepaper so you don't need to.

It employs machine learning for a dynamic Dollar-Cost Averaging (DCA) approach.

1/14 🧵 Image
2/14 Let's start with why this matters. Crypto markets are known for their volatility, which makes timing the market a difficult task. Traditional DCA helps by spreading out investments over time, thus reducing the risk of buying at the wrong time.
3/14 However, the traditional DCA has its limitations. By investing a fixed amount at regular intervals, you might miss out on buying more when the prices are low, or save some when prices are high.

This is where DCA Plus steps in. Image
Read 14 tweets
Jun 8
A sophisticated trader has been showing impressive activity on @HyperliquidX
After a meticulous on-chain investigation, I've made some compelling discoveries.

1/ 🧵 🫧 Image
2/ Hyperliquid, for those uninitiated, is an advanced decentralized exchange that’s revolutionizing the blockchain space with CEX-like trading experiences and groundbreaking trading tools.

3/ 🔍 Over the past week, a proficient trader has been making substantial movements on the platform, racking up around 66M in volume on just one account.
By tracking their deposits, I've embarked on an odyssey to unearth the origin of these transactions. Image
Read 11 tweets
May 11
🏦 Are Banks the Ultimate Ponzi Schemes? 🪙

🧵 ⬇️ Image
1/ I wrote a more in depth article you can check out here ⬇️

mirror.xyz/0x4ACd63bDCe72…
2/ A closer look reveals that banks operate with surprising similarities to Ponzi schemes, depending on new deposits to pay off withdrawals and investing in less liquid assets.

Read 10 tweets
Jan 10
The downfall of Centralised Exchanges.
DEXs building On-chain Orderbooks will be the winners in 2023 📚

🧵 0/14
1/ Tired of centralized exchanges holding all the power and potentially stealing your coins?
Time to explore decentralized on-chain orderbook exchanges, there are a few players changing the DEX game.
2/ This Thursday I am very excited to talk to 4 amazing DEXs building the future of Orderbooks.

@TeamKujira 🐳
@HyperliquidX 💧
@Dolomite_io
@HubbleExchange 🔭

Set your reminders ⬇️
twitter.com/i/spaces/1djGX…
Read 25 tweets
Dec 11, 2022
I got Artificial intelligence to explain "Impermanent Loss" to me.
This is how it went ⬇️

🧵 /0
AI-
#DeFi impermanent loss is a phenomenon that can occur when trading on decentralized finance (DeFi) platforms.
Essentially, it happens when the value of the assets you are trading changes over time, and can result in you losing money.
/1
For example, imagine that you have a DeFi platform where you can trade two different virtual coins, A and B.

If the value of A increases while you are trading B, you may end up losing money because the value of B has decreased in comparison.
/2
Read 6 tweets
Oct 20, 2022
How I raised 350 million,
& how you can be my exit liquidity.

@AptosFoundation 🧵 ⬇️
0/ Image
I made a video with @TheBirbNest about all this if you prefer to consume content that way.

1/
#Aptos launched their Mainnet on October 17th.
They have launched with a bit of rocky start, but let's give them the benefit of the doubt and focus on what they've done pre launch.

2/
Read 21 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(