Uniswap Labs has released a draft of the code for Uniswap v4, announcing the move in a June 13 blog post from Uniswap’s founder, Hayden Adams. The new code features “hooks,” or plugins that allow developers to create custom liquidity pools.
Uniswap is the largest decentralized crypto exchange by volume. Its latest version, v3, was deployed on May 4, 2021.
According to the post, v4’s “hooks” feature will allow future developers to create on-chain limit orders, automatic deposits to lending protocols, auto-compounded liquidity provider fees, and many other innovations to the exchange once it is implemented.
Releasing the source code is the first step to launching a new version of Uniswap. The team now plans to converse with members of the Uniswap community and iterate on this base code over time. V4 will be deployed once enough consensus has been built around a final version, but previous versions will still remain available as well.
Uniswap v4’s purpose is to create a way for pool deployers to introduce code that performs a designated action at key points throughout the pool’s lifecycle.
For example, deployers will be able to create time-weighted average market makers that allow users to sell large amounts of crypto in small batches over time. This may help traders to avoid being front-run by Ethereum Virtual Machine bots or to suffer adverse price movements. On-chain limit orders will also be possible, as pools will be able to incorporate logic that lets them fulfill an order only when a token hits a particular price.
Uniswap Labs engineer Sara Reynolds said the new version will allow automated market maker exchanges like Uniswap to develop more rapidly than ever before.
Uniswap Labs’ head of communications, Bridget Frey, echoed this sentiment, stating, “Right now, other people have to build new AMMs to do a lot of this work. Now, what you’ll be able to do is to build your project with a hook contract on top of Uniswap’s security and liquidity in ways that hopefully make the innovation faster and easier to do for all sorts of projects.”