DeFi Platform Uniswap Reveals Version 4 of Its Protocol

uniswap protocol v4DeFi (decentralized finance) platform Uniswap has introduced a new version 4 of its protocol for working with smart contracts. The current Uniswap v3 has been running for more than 2 years and will continue to operate as long as there is liquidity within this protocol, just as happened with the first and second versions of Uniswap.

Main differences between Uniswap V4 and Uniswap V3

Custom liquidity pools configured for different tasks using Hooks contracts
Saving gas with "transient storage" flash memory. Transient Storage is described in EIP-1153 and is only planned for implementation in the Ethereum Cancum fork.
The license for BSL 1.1 is changing. Those. Uniswap 4 code continues to be open source, but it cannot be used in commercial or production solutions for the first 4 years.
The main changes are the introduction of Hooks contracts to create a variety of liquidity pools that can interact with each other and be created by third-party developers.

Key ideas for which you can use Hooks contracts:

Time-weighted average market maker (TWAMM )
Dynamic fees based on volatility or other inputs
On-chain limit orders
Deposit outside the liquidity range in lending protocols
Individual onchain oracles such as geo-average oracles
LP commission fees are automatically returned back to LP positions
Internalized MEV profits are distributed back to LPs


Sample structures of these services can be found on GitHub

The list of user pool features is not limited to the above services, because. Hooks contracts have extensive customization options, on the basis of which you can create almost any service that will be limited only by your imagination.

At the moment, Uniswap V4  is not yet live and is presented as an introduction and feedback to the crypto community. Uniswap V4 will most likely be deployed only after the Cancum fork of the Ethereum cryptocurrency, which is scheduled for implementation in the second half of 2023