What is Uniswap v4? Expectations include TWAMM, dynamic fees, and more.

share
What is Uniswap v4? Expectations include TWAMM, dynamic fees, and more.

In May 2021, Uniswap v3 introduced an interesting feature called Concentrated Liquidity, surpassing v2 and gaining more liquidity. Despite the slow pace of major product releases, Uniswap has always influenced the development of other DeFi protocols. Today, Uniswap has released its Uniswap v4 vision. What interesting technologies are there after more than two years?

Hooks and Custom Pools

Uniswap states that each Uniswap liquidity pool has its own lifecycle. During the lifecycle of a liquidity pool, several events occur.

Liquidity pools are created with default fee levels, liquidity is added, removed, or rebalanced, and users swap tokens. In Uniswap v3, these lifecycle events are closely intertwined and executed in a very strict order.

New Approach in Uniswap v4

Uniswap aims to create a space for customizable liquidity in Uniswap v4 by introducing a way for liquidity pool deployers to introduce code that executes specific operations at key points in the lifecycle. For example, before and after a swap, or before and after adjusting LP liquidity provider positions.

About Hooks

Uniswap describes Hooks as a plug-in used for custom pools, swaps, fees, and LP interactions, allowing developers to innovate on top of Uniswap's liquidity and security foundation, creating custom AMM pools through integration with v4 smart contracts.

Uniswap has revealed some product features of v4:

  • Time-Weighted Average Market Maker (TWAMM)
  • Dynamic fees based on volatility or other metrics
  • On-chain limit orders
  • Deposit liquidity off-range into lending protocols
  • Custom on-chain Oracles, such as geomean oracles
  • Automatically reinvest LP fees into LP positions
  • Built-in MEV miners can extract value and distribute profits to LPs

Uniswap states that the changes in Uniswap v4 are limitless, as each pool is now defined not just by tokens and fee levels, but by a variety of liquidity pools we will see.

The core logic of Uniswap v4, like v3, is immutable. While each pool can use its own hooks smart contracts, hooks can be limited to specific permissions determined at pool creation.

Uniswap has created examples of hooks contracts and hopes developers will come up with novel ways to build functionalities that have not been considered before.

Can Uniswap v4 Save 99% on Gas Fees?

Uniswap states that in early trials, v4 reduced Gas Fees for creating liquidity pools by 99%. The EIP-1153 introduced in the Ethereum Constantinople hard fork will be a key factor in significantly reducing Gas Fees for Uniswap users.

Uniswap v4 Comes with Open-Source Restrictions for Four Years

Uniswap mentions that the v4 code will be released under the Business Source License 1.1, restricting the use of v4 source code in a commercial or production environment for up to four years, after which it will permanently transition to a GPL license. Like v3, Uniswap Governance and Uniswap Labs can grant license exceptions.

Will UNI Profit Sharing Be Possible?

Uniswap states that the protocol fee mechanism will also be modeled after v3. Governance will be able to vote on adding protocol fees to any liquidity pool, but not exceeding a maximum amount.

View the Uniswap v4 Whitepaper