Uniswap Labs has released a draft of the code for Uniswap V4, according to 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 in the world by volume. Its latest version is V3 and 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 (LP) 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. Once enough consensus has been built around a final version of it, V4 will go into a formal proposal and be placed before Uniswap’s governing body, UniswapDAO.
According to Adams’ post, 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 – like before or after a swap, or before or after an LP position is changed.”
For example, deployers will be able to create time-weighted average market makers (TWAMMs) that allow users to sell large amounts of crypto in small batches over time. This may help traders to avoid being frontrun by EVM 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.
Some other examples of “hooks” include code which can redeposit fees back into an LPs
Read more on cointelegraph.com