Decentralized cryptocurrency exchange Uniswap has unveiled its protocol’s fourth iteration, with Uniswap Labs releasing a draft code and seeking community contributions to build out Uniswap v4. Similar to Uniswap v3, the latest version will be under a business source license 1.1, preventing its code from being forked or copied for commercial use over the next four years. After this period, the protocol will convert to a GPL license. Uniswap Governance, consisting of voters using UNI tokens, must approve any exceptions, or special permissions may be granted by developers at Uniswap Labs.
Uniswap v4 code will be entirely open-source and introduce “hooks,” as described by Sara Reynolds, protocol engineer at Uniswap Labs. These hooks are smart contracts that can be plugged into different pools, allowing developers to interact and build on top of custom pools. However, the specifics of how hooks will be used and what they might look like remain largely unknown, leaving room for creativity within the community.
One function hooks can introduce is acting as a time-weighted average market maker (TWAMM), allowing users to execute long-term swaps or orders. This feature could prove useful for those who want to swap into a token over an extended period, such as in the case of dollar-cost averaging.
Uniswap v4 will see significant architectural changes, including ensuring all pools live within one single smart contract, dubbed a “singleton contract.” Tokens will be transferred between one single smart contract, rather than among different individual pools held in numerous smart contracts, which is expected to reduce gas fees significantly. The new architectural design is estimated to decrease pool creation gas prices by over 99% compared to v3. This change will be accompanied by “flash accounting,” where only net balances are transferred in and out of pools, rather than entire balances at the end of every swap.
No set deployment date for Uniswap v4 has been announced, as Uniswap Labs is inviting feedback from the community to help determine the next steps. The draft code has been released to encourage public input and ensure meaningful community contributions throughout the development process, which is expected to take several months. Uniswap v3 was announced in March 2021 and launched on the Ethereum mainnet in May 2021.
Source: Blockworks