Uniswap V4: Powerful New Features and Controversial Code Allegations
<p>Uniswap, among the top decentralized exchanges (DEX) released the draft code for its latest version, <a href="https://github.com/Uniswap/v4-core" target="_blank" rel="nofollow">Uniswap V4</a>. The code has been released as the developers wish V4 to be built in public. Launched in 2018, Uniswap is one of the most known <a href="https://www.financemagnates.com/tag/dex/" target="_blank" rel="follow">DEX</a> for trading Ethereum and eth-based tokens.</p><p>In V2 which was released in 2020, Uniswap introduced ERC-20 trading pairs and Flash Swaps. In V3, concentrated liquidity was added to the protocol. Concentrated liquidity allows allocating liquidity to a price interval. This model improved the standard AMM model.</p><p>Liquidity providers (LPs) can execute as many positions as they wish in the pool. LPs have better control over what price ranges their funds will be used. The Uniswap V3 Business Source License (BSL) expired in April 2023. </p><p>Other DEX, such as <a href="https://www.financemagnates.com/tag/SushiSwap/" target="_blank" rel="follow">SushiSwap</a>, announced it is adding Concentrated Liquidity to 13 different chains. Arbitrum, Fuse, <a href="https://www.financemagnates.com/tag/polygon/" target="_blank" rel="follow">Polygon</a>, and Gnosis are some of the <a href="https://www.financemagnates.com/tag/blockchain/" target="_blank" rel="follow">blockchains</a> that Concentrated Liquidity will be enabled for. The latest version has a new BSL license, which limits its use in commercial or production settings for up to 4 years.</p><p dir="ltr">What Is New in Uniswap V4?</p><p>The highlight of the new code is ‘Hooks.’ To simplify, Hooks are smart contracts that are executed at certain times in a pool. For example, hooks can be used when liquidity is added or removed from the pool. This allows pool creators to have better control over how their pool behaves in certain conditions.</p><p>Hooks can be used for on-chain limit orders and a time-weighted average market maker (TWAMM) pool. TWAMM enables traders to execute large trades (over $30M for example) with minimal gas fees and impact on the price.</p><p>The large order is broken down into multiple orders (an infinite number of small orders) using AMM for a predetermined period (days, weeks, etc.). The same applies to buying large amounts. The TWAMM algorithm will split the amount into multiple orders that will be spread across predefined parameters (hours, days, etc.).</p><p>TWAMM eliminates the need to use <a href="https://www.financemagnates.com/tag/cex/" target="_blank" rel="follow">CEX</a> or a trading desk for such transactions. Other features include customized on-chain oracles and internalized MEV profit, which are distributed across LP. Uniswap released several samples on <a href="https://github.com/Uniswap/v4-periphery/tree/main/contracts/hooks/examples" target="_blank" rel="nofollow">github</a>.</p><p>The Singleton Contract</p><p>Another major upgrade from V3 is the use of a ‘singleton’ contract. As opposed to V3 where each pool has its own smart contract, in V4 all pools reside within a single contract. Traders will benefit from lower fees on token swaps as routing is dramatically enhanced. Flash accounting will also be enabled. Changes in the pool will be calculated based on net balances rather than at the end of the swap, which will reduce some gas.</p><p>Did Uniswap Copy Shell Protocol’s Code?</p><p>There have been allegations that Uniswap copied some of the code from the Shell Protocol.</p><blockquote><p lang="en" dir="ltr">Uniswap even copied the variable name for this transient ledger, “BalanceDelta.sol”. The file names in github are verbatim the same. <a href="https://t.co/7f2NNOg5Ne">pic.twitter.com/7f2NNOg5Ne</a></p>— Kenny White
Leave a Comment