Investing
What's New for Uniswap? Devs Release v4 Whitepaper for Feedback
Published:
Last Updated:
On Tuesday, Uniswap’s CEO Hayden Adams released the draft technical whitepaper for Uniswap v4. As Uniswap’s inventor and core developer, Adams introduced several improvements that build upon the liquidity customization of Uniswap v3.
Namely, Uniswap v4’s “hooks” and a “flash accounting” system for the new singleton contract architecture. The latest open-sourced version is hailed as an entirely new protocol that coexists with v3, leaving it up to developers to choose which features to adopt.
What does that mean for Uniswap’s liquidity providers, given its domineering market share of 72% among decentralized exchanges (DEXes)?
Instead of relying on traditional order books, DEXes like Uniswap rely on liquidity pools. These smart contracts track the balances of token pairs, such as USDT/ETH, for swaps. Users act as liquidity providers (LPs) to fill these pools with deposits.
Traders then drain liquidity pools when they need a token swapped, giving LPs fees based on the amount of liquidity provided. With v4, Uniswap is introducing plugins called “hooks.” They aim to customize the relationship between LP positions, fees, and swaps.
So far, Adams has released four hooks examples to showcase what is possible:
Among other possible hook novelties are auto-compounded LP fees that provide feedback into LP positions. Likewise, internalized MEV (Maximal Extractable Value) profits are distributed back to LPs. In essence, Uniswap v4’s hooks allow dApp developers to externally deploy contracts that execute a customized logic in the liquidity pool’s lifecycle.
While hooks expand Uniswap v4 customizability, the newly introduced singleton design allows liquidity pool management with a single contract. This makes pool deployment 99% cheaper. The singleton architecture goes hand-in-hand with flash accounting.
Flash accounting simplifies more complex liquidity pool executions, such as atomic swapping or adding liquidity. Previously, such operations ended by token transfers in and out of pools for every swap. In contrast, flash accounting in v4 updates pools’ internal net balance (delta).
“It’s essentially just a new cool way of doing balance accounting and it ensures that the pool’s balance is safe and the user’s balance is safe,”
Uniswap Labs smart contract engineer, Sara Reynolds, to The Block
Therefore, external transfers happen only at the end of the token pair lock via transient storage specified in EIP-1153. With singleton contracts, flash accounting saves gas fees as liquidity fragmentation costs are reduced. These savings are needed as hooks will “greatly increase the number of pools.”
Ethereum blockchain is Uniswap’s main host, so the DEX relies on Ethereum’s smart contract standard, such as ERC-20. Although Ether (ETH) is Ethereum’s native cryptocurrency, it is not an ERC-20 token. The Uniswap v4 upgrade is bringing back native ETH in token swaps from Uniswap v1.
In v2, such a feature was removed because of liquidity fragmentation concerns for Wrapped Ether (WETH) trading. However, as singleton architecture and flash accounting reduce liquidity fragmentation impact, native ETH support is back. This is significant, as native ETH transfers cost half as much as ERC-20 token transfers.
Lastly, v4’s singleton architecture will support the minting and burning of ERC-1155 tokens. Enjin, a Singapore-based blockchain firm, built this new token standard for creating fungible (altcoins) and non-fungible assets, known as NFTs. As with flash accounting, this allows users to avoid costly ERC-20 transfers in and out of liquidity pools, bringing extra efficiency for high-frequency swappers or LPs.
This article originally appeared on The Tokenist
Credit card companies are at war, handing out free rewards and benefits to win the best customers. A good cash back card can be worth thousands of dollars a year in free money, not to mention other perks like travel, insurance, and access to fancy lounges. See our top picks for the best credit cards today. You won’t want to miss some of these offers.
Flywheel Publishing has partnered with CardRatings for our coverage of credit card products. Flywheel Publishing and CardRatings may receive a commission from card issuers.
Thank you for reading! Have some feedback for us?
Contact the 24/7 Wall St. editorial team.