The Uniswap protocol, introduced in 2018, was the first to introduce an Automated Market Maker (AMM) based on the Ether token. Through various iterations, the founding team developed advanced features for the decentralized exchange, which culminated in the Uniswap V4 upgrade.
Decentralized exchanges (DEXes) are platforms that enable peer-to-peer trading of cryptocurrencies without the need for intermediaries or central authorities. DEXes operate using blockchain technology, allowing users to directly trade digital assets while retaining full control over their funds. Uniswap has been the unequivocal leading decentralized trading platform since the rise of the DeFi markets in 2020. The recently announced Uniswap V4 upgrade aims to solidify the protocol's position.
The history of the Uniswap protocol
In terms of trading volume, decentralized exchanges, also known as Automated Market Makers (AMMs), are the most widely used DeFi applications. Unlike centralized exchanges (CEXes), DEXes like Uniswap do not rely on order books to determine token prices. Instead, liquidity pools can be created for all ERC-20 tokens, with anyone able to provide liquidity. When a user wants to buy a specific token or swap it with another token like Ether (ETH), they access the respective Uniswap liquidity pool. The price is automatically adjusted by the protocol, without the need for a third party, based on the token reserves in the liquidity pools. As a reward or incentive, liquidity providers (LPs) receive a share of the fees.
The Uniswap V1 protocol, launched in 2018, pioneered this concept. It was the first AMM concept to enable trading and liquidity provision for any token against Ether. However, due to the subdued market sentiment during the "crypto winter," the protocol did not experience exceptional usage. Then, in 2020, Uniswap V2 introduced a groundbreaking improvement: token-to-token swaps. Users could now create their own cryptocurrencies and offer them for trading on a decentralized platform. This functionality was central to the rise of the so-called DeFi summer. A year later, Uniswap V3 introduced "concentrated liquidity," allowing the creation of sophisticated liquidity strategies that ultimately solidified Uniswap's overwhelming dominance.
What is Uniswap V4?
Uniswap V4 is the latest upgrade of the Uniswap protocol and introduces the concept of "hooks." These are customizable plugins that allow developers to define specific actions to be executed at different stages of a liquidity pool's lifecycle. Unlike the tightly coupled sequence of events in Uniswap V3, hooks provide pool developers with the flexibility to integrate code that performs actions before or after swaps, liquidity adjustments, or changes to LP positions. The introduction of hooks opens up a range of possibilities for innovation based on the Uniswap protocol. The Uniswap V4 announcement explicitly mentions the following functionalities:
- Time-weighted average market maker (TWAMM)
- Dynamic fees based on volatility or other parameters
- On-chain limit orders
- Liquidity provision beyond reach in credit protocols
- Custom on-chain oracles, such as geometric mean oracles
- Automatic compounding of LP fees back into LP positions
- Internalized MEV (Miner Extractable Value) profits to LPs
By allowing a custom hook smart contract for each pool, Uniswap V4 enables diverse and unique liquidity pools that go beyond the token and fee layer. Uniswap V4 remains non-upgradable in its core logic to ensure protocol stability. At the same time, developers are encouraged to find new and original ways to develop features using hooks, enabling further innovations and adaptations within the Uniswap ecosystem. A side effect of the Uniswap V3 upgrade has been lower transaction fees when creating a liquidity pool.
Uniswap V4 is also not "Open Source"
The term "open source" refers to software or projects whose source code is freely accessible, modifiable, and available to anyone. This approach promotes transparency, collaboration, and innovation, as a diverse community of developers can contribute to and improve the software, leading to faster progress and broader adoption. Particularly in the DeFi space, most protocols value open-source development to align with the blockchain ethos of transparency.
With Uniswap V3, the protocol already adopted a different approach, which also applies to Uniswap V4. The source code is released under a Business Source License 1.1, which restricts the use of the V4 source code in a commercial or production environment for up to four years, after which the protocol becomes open source. For some Twitter users, this decision raises questions, as Uniswap V4 was heavily inspired by competing projects such as Balancer and Crocswap.
Hey I asked yesterday. There has been no answer. Why:
1. Present BSL as an opensource license?
2. Incorporate ideas from other opensource projects into v4 and then think its okay to slap BSL on it?
3. LARP as building in public while you act as a leech?https://t.co/jrlL3GEnIi
— Lefteris Karapetsas | Hiring for @rotkiapp (@LefterisJP) June 14, 2023