2 years ago, Uniswap V3 introduced concentrated liquidity to improve capital efficiency.
Today, Uniswap V4 is bringing customization & optimisation to the AMM space.
If you care about DeFi and its future ๐ฆ
You need to read this ๐ฅ
A deep dive thread on @Uniswap V4 ๐งต (x/23)
Today, Uniswap V4 is bringing customization & optimisation to the AMM space.
If you care about DeFi and its future ๐ฆ
You need to read this ๐ฅ
A deep dive thread on @Uniswap V4 ๐งต (x/23)
1/
Uniswap has always been at the forefront of AMM innovation since the birth of DeFi.
Throughout its 5-year journey, @Uniswap has undergone 3 verison of changes ๐ช
V1 = Innovated ERC20 - ETH pools & AMM
V2 = Enabled ERC20/ERC20 pools & Flash swap
V3 = Concentrated liquidity
Uniswap has always been at the forefront of AMM innovation since the birth of DeFi.
Throughout its 5-year journey, @Uniswap has undergone 3 verison of changes ๐ช
V1 = Innovated ERC20 - ETH pools & AMM
V2 = Enabled ERC20/ERC20 pools & Flash swap
V3 = Concentrated liquidity
3/
But first, let's understand why do we even need V4 โ:
In V2 / V3, the lack of customizability has always been a problem โ ๏ธ.
Ideas such as volatility oracles and limit orders could not be added by third-party developers in V2 / V3 due to technical complexity.
But first, let's understand why do we even need V4 โ:
In V2 / V3, the lack of customizability has always been a problem โ ๏ธ.
Ideas such as volatility oracles and limit orders could not be added by third-party developers in V2 / V3 due to technical complexity.
5/
With hooks, pool creators can adjust pool parameters and introduce new functions to the AMM ๐
More than that, the implementation of hooks can also shifts the curve and allowing various strategies to be built on top of Uniswap, ultimately benefiting LPs / swapper even more.
With hooks, pool creators can adjust pool parameters and introduce new functions to the AMM ๐
More than that, the implementation of hooks can also shifts the curve and allowing various strategies to be built on top of Uniswap, ultimately benefiting LPs / swapper even more.
7/
Hooks can even allow customized oracle implementations and distribute internalized MEV to LP holdersโฆ..
Anyway, enough of alien language ๐ฝ.
If you want to learn more, this thread from @interchainriley will help:
Hooks can even allow customized oracle implementations and distribute internalized MEV to LP holdersโฆ..
Anyway, enough of alien language ๐ฝ.
If you want to learn more, this thread from @interchainriley will help:
8/
Besides 1๏ธโฃ hooks, V4 has another feature, known as action hooks that can call out logic during their execution.
Action hooks are contracts that can only be triggered and run when the "flag" condition is fulfilled and turned "True" โ .
Let's use an example ๐:
Besides 1๏ธโฃ hooks, V4 has another feature, known as action hooks that can call out logic during their execution.
Action hooks are contracts that can only be triggered and run when the "flag" condition is fulfilled and turned "True" โ .
Let's use an example ๐:
11/
On the other hand, Singleton structure and Flash accounting will enable a cheaper swapping and deploying experience in V4.
But how, poopman ๐ฉ?
Let's look at it part by part โ
On the other hand, Singleton structure and Flash accounting will enable a cheaper swapping and deploying experience in V4.
But how, poopman ๐ฉ?
Let's look at it part by part โ
13/
3๏ธโฃ Flash accounting:
In V3, each swap/LP staking ended with the action "transfer token."
In short, you transfer your token after every operation.
In multi-hop swapping, it can be REALLY painful as swappers need to consume a huge amount of gas fees during each operation ๐ซจ
3๏ธโฃ Flash accounting:
In V3, each swap/LP staking ended with the action "transfer token."
In short, you transfer your token after every operation.
In multi-hop swapping, it can be REALLY painful as swappers need to consume a huge amount of gas fees during each operation ๐ซจ
14/
With Flash accounting in V4, each operation (swap/deploy) will only result in an internal balance update ๐งฎ, in which the balance is denominated in the unit "delta".
By the end of the swap, it will only swap out the net "delta" balance after a series of calculations ๐ค.
With Flash accounting in V4, each operation (swap/deploy) will only result in an internal balance update ๐งฎ, in which the balance is denominated in the unit "delta".
By the end of the swap, it will only swap out the net "delta" balance after a series of calculations ๐ค.
15/
By requiring no tokens owned by the pool manager by the end of the transfer, flash accounting ensures the solvency of the pools.
Along with singleton structure, the architecture can simplify multi-hop swapping and complex pool operations, making V4 much more user-friendly โ
By requiring no tokens owned by the pool manager by the end of the transfer, flash accounting ensures the solvency of the pools.
Along with singleton structure, the architecture can simplify multi-hop swapping and complex pool operations, making V4 much more user-friendly โ
16/
Unfortunately โ ๏ธ, the flash accounting model is still expensive, as users require paying gas for internal balance updates once the storage refund cap is exceeded ๐ด.
To suppress gas fees, @Uniswap needs the transient storage upgrades from EIP-1153 ๐.
Unfortunately โ ๏ธ, the flash accounting model is still expensive, as users require paying gas for internal balance updates once the storage refund cap is exceeded ๐ด.
To suppress gas fees, @Uniswap needs the transient storage upgrades from EIP-1153 ๐.
18/
Not only does it help to reduce the overall gas fee, but it also helps to streamline smart contracts and improve their interaction.
Not only does it help to reduce the overall gas fee, but it also helps to streamline smart contracts and improve their interaction.
19/
More notable upgrades in V4 include ๐
๐บ Bringing back the Native ETH swapping
๐บIntroducing the donate function (Tipping LPs, etc.)
๐บ Governance updates to control the cap of the swapping fee
More notable upgrades in V4 include ๐
๐บ Bringing back the Native ETH swapping
๐บIntroducing the donate function (Tipping LPs, etc.)
๐บ Governance updates to control the cap of the swapping fee
20/
In a nutshell, Uniswap V4 has enabled a more customizable, flexible, and efficient AMM that has never been seen in the space before.
I expect more DApps will leverage the flexibility of V4 & design optimized strategies to benefit their LPs or improve capital efficiency.
In a nutshell, Uniswap V4 has enabled a more customizable, flexible, and efficient AMM that has never been seen in the space before.
I expect more DApps will leverage the flexibility of V4 & design optimized strategies to benefit their LPs or improve capital efficiency.
22/
Tagging Uniswap Gigabrain for discussion ๐ง :
@jtriley_eth @pt1mfv_ @KingJulianIAm @arndxt_xo @laurashin @jermywkh @NotDeGhost @0xjuu_17 @Zer0dots @bantg
@defi_naly @garythung @0xkhan_ @kinaumov @0xFinish @guil_lambert @uriklarman @ncerovac @interchainriley @Alvin0617
Tagging Uniswap Gigabrain for discussion ๐ง :
@jtriley_eth @pt1mfv_ @KingJulianIAm @arndxt_xo @laurashin @jermywkh @NotDeGhost @0xjuu_17 @Zer0dots @bantg
@defi_naly @garythung @0xkhan_ @kinaumov @0xFinish @guil_lambert @uriklarman @ncerovac @interchainriley @Alvin0617
23/
Tagging my CT frens for the alpha
@0xSalazar @0xnocta @DegenCamp @2lambro @crypticdegen22 @OvrCldJonny @Deebs_DeFi @tomwanhh @Hercules_Defi @ArbiAlpha @stacy_muur @0xkhan_ @ArsalanSartaj @hmalviya9 @francescoweb3 @ShivanshuMadan @jinglingcookies @VirtualKenji @FarmerTuHao
Tagging my CT frens for the alpha
@0xSalazar @0xnocta @DegenCamp @2lambro @crypticdegen22 @OvrCldJonny @Deebs_DeFi @tomwanhh @Hercules_Defi @ArbiAlpha @stacy_muur @0xkhan_ @ArsalanSartaj @hmalviya9 @francescoweb3 @ShivanshuMadan @jinglingcookies @VirtualKenji @FarmerTuHao
@0xSalazar @0xnocta @DegenCamp @2lambro @crypticdegen22 @OvrCldJonny @Deebs_DeFi @tomwanhh @Hercules_Defi @ArbiAlpha @stacy_muur @0xkhan_ @ArsalanSartaj @hmalviya9 @francescoweb3 @ShivanshuMadan @jinglingcookies @VirtualKenji @FarmerTuHao If you actually understand what Im writing, please:
1, Follow @poopmandefi
2, Like, RT and drop a ๐ฉ in the comment.
1, Follow @poopmandefi
2, Like, RT and drop a ๐ฉ in the comment.
Loading suggestions...