Uniswap Releases Draft Code for V4

Uniswap Releases Draft Code for V4

Version 4 of the decentralized exchange will introduce customizable liquidity, improved architecture and gas savings.

Uniswap Releases Draft Code for V4 PlatoBlockchain Data Intelligence. Vertical Search. Ai.

Photo by Alexander Grey on Unsplash

Posted June 13, 2023 at 8:08 am EST.

Two years after the release of V3, Uniswap has unveiled its vision for V4 of the protocol along with an open-sourced, early version of its draft code. 

Similar to V3, the code will be released under a Business Source License 1.1, which limits its commercial use for up to four years, meaning no other protocol will be able to perform a fork.

Uniswap V4 will allow users to make tradeoff decisions between integrating more advanced features at the expense of increased costs through the introduction of smart contracts called “hooks.” 

These hooks are plugins that will customize how liquidity pools, swaps, fees and liquidity provider (LP) positions interact. Developers will also be able to build on top of the protocol’s liquidity and security to create customized AMM pools through the hooks that integrate with V4’s smart contracts.

Some of these potential innovations include dynamic fees based on volatility and other inputs, customized on-chain oracles, auto compounded LP fees back into their positions and distributing internalized MEV profits back to LPs.

“But really, the sky’s the limit. Because each pool is now defined by more than just the tokens and fee tier, we’ll see pools of all colors, shapes, and sizes,” said Uniswap in a press release shared with Unchained.

The protocol also introduces a “singleton” smart contract which will host all the pools, providing important gas savings because swaps will not need token transfers between pools in different contracts.

A new “flash accounting system” will facilitate transfers only on net balances, as opposed to V3 which sees transfers in and out of pools at the end of each swap. With the efficiency of singleton and flash accounting, fee tiers no longer need to be limited.

“Pool creators can set them at the level that makes them most competitive or customize them with a dynamic fee hook. V4 also brings back support for native ETH, which offers additional gas savings,” explained the Uniswap team.

Time Stamp:

More from Unchained