Uniswap Review: Decentralised Trading Protocol

Last updated: Apr 14, 2024
35 Min Read

Over the course of the last few years, the digital asset space has entirely re-architected the financial ecosystem as we know it and has generated some of the most value-rich, avant-garde economic applications. In fact, with the arrival of Decentralised Finance (DeFi), more and more crypto enthusiasts, private investors and institutional entities have been drawn to experiment with the new financial technologies offered by the space and fascinated by its alternative features.

This is because DeFi is proving to be a rapidly growing trend in the dynamic world of FinTech, taking elements from traditional finance and transforming them into trustless, transparent protocols via smart contracts and token architectures. In December 2019, the DeFi ecosystem had $700 million worth of assets locked in its financial products, whereas now, at the time of writing in 2024, this number is closing at $100 billion.

DeFi TVL.jpg
DeFi TVL According to DeFi Llama

DeFi is a particularly attractive proposition as it gives participants access to a borderless, open alternative to every financial service imaginable, including saving accounts, loans, insurance, trading and more.

Decentralized applications (dApps), spearheaded by the smart contract giant Ethereum, run on the blockchain’s distributed ledger system and completely eliminate the need for a central authority to act as an intermediary like in traditional finance. Essentially, this allows for the creation of a system in which there is not a single point of failure, as identical records are kept across thousands of computers via a peer-to-peer network.

Lending and borrowing, yield farming, liquid staking, restaking, and decentralized trading protocols are only a few of the alternative services that Decentralised Finance has to offer. Decentralized trading, in particular, has sparked the interest of many investors and crypto users alike, and has led to many projects developing their own trading, decentralized exchange (DEX) and automated market maker (AMM) protocols. One of the most notable projects to do so is Uniswap, with its fully decentralized protocol for automated liquidity provision on Ethereum.

About Uniswap

Uniswap is a leading crypto asset exchange operating in the EVM ecosystem. It differs from traditional exchanges in that it proposes a fully disintermediated, decentralized mechanism in which no single entity is allowed to own, control, or operate its network. Furthermore, Uniswap pioneered a trading model completely different from traditional, order-book-style trading markets called an automated liquidity protocol, which obliviates the need for trusted intermediaries and prioritizes decentralization and security.

Uniswap
Uniswap, A Sophisticated Decentralised Trading Protocol 

Launched in 2018, Uniswap has become the most popular and most used Decentralised Exchange (DEX) with over $5 billion locked in its smart contracts. It's also available on mobile. 

Because it is Ethereum-based, Uniswap is fully-compatible with all ERC-20 tokens and other Ethereum infrastructures such as wallet services like MetaMask and MyEtherWallet. In addition to this, the Uniswap platform is completely open-source, which means that anyone can essentially copy its codebase and redeploy it to create a similar DeFi protocol, as is the case for Sushiswap for instance.

Uniswap TVL.jpg
Uniswap TVL on DeFi Llama

As a DEX, Uniswap allows users to swap various ERC-20 tokens from a simple, user-friendly, all-in-one web interface that eliminates the many bottlenecks typical of other traditional and centralized exchanges. In order to do this, Uniswap implements the specific architecture of an Automated Market Maker (AMM) and utilizes liquidity pools, as opposed to traditional order books, to determine asset prices, perform transactions and execute trades.

AMM infrastructures indeed constitute one of the most notable developments to come out of the DeFi ecosystem as they offer users incredibly advantageous features, such as the ability to swap ERC-20 tokens without having to find a buyer or seller on the opposite side of the trade.

In fact, Uniswap does not use an order book to determine token prices but utilizes apparent market liquidity to calculate prices with a mathematical algorithm. This approach is crucial for operating an on-chain trading platform, as the data a traditional order book produces is too vast to store on-chain without causing the fees to skyrocket.

Automated Market Maker
Automated Market Makers Facilitate DEX Trading And Do Not Implement Traditional Order Book Systems 

Thus, it is clear that a brief AMM and liquidity pool analysis is due to better contextualise Uniswap’s DeFi functionalities and automated liquidity provision architecture. This will help better understand Uniswap’s role in the DeFi space and shed light on the problems that it seeks to solve.

DEXes, AMMs And Liquidity Pools

Automated Market Makers (AMMs) allow digital assets to be traded automatically and without permission by using liquidity pools instead of a traditional market of buyers and sellers. On traditional exchange platforms, buyers and sellers offer up different prices for an asset and when other users find a listed price to be acceptable, they execute the trade and that price becomes the asset’s market price. Real estate, stocks, gold and most other assets rely on this traditional market structure for trading.

Orderbook DEX
Order Books Are Primarily Used In Centralised Exchanges And Traditional Marketplaces - Image via StableTrade Medium 

If, for instance, a trader wanted to sell Bitcoin for a price of say $40,000 on a centralised exchange, they would have to wait for a buyer to appear on the other end of the order book who is looking to buy an equal or higher amount of Bitcoin at that price. However, the main issue with this type of economic structure is liquidity, which in this scenario refers to the market depth, or the amount of open orders for the asset, and the number of orders there are on the order book at any given time.

Thus, if liquidity is low, traders might not be able to fill their buy or sell orders, and AMMs attempt to solve this issue by offering a financial tool that is always available for trading and does not rely on traditional interactions between buyers and sellers.

Liquidity Restructured

Liquidity refers to how easily one asset can be converted into another asset without affecting its market price. Before AMMs came into being, liquidity presented Decentralised Exchanges (DEXes) on Ethereum with a hefty challenge. In fact, as a new technology with a complicated interface, the number of buyers and sellers remained pretty small, which essentially meant that it was difficult to find enough users willing to trade on a regular basis.

Market Liquidity
Through Liquidity Pools, Exchanges Gain Access To Greater Trading Activity And Capital Efficiency 

AMMs solve this problem of limited liquidity by creating liquidity pools and offering liquidity providers (LPs) an incentive to supply these pools with assets. Consequently, the more assets in a pool and the more liquidity the pool has, the easier trading becomes on Decentralised Exchanges.

On AMMs, instead of trading between buyers and sellers, users trade against a pool of tokens known as the liquidity pool. Users provide liquidity pools with tokens, and unlike an order book, the price of the tokens in the pool is determined by a mathematical ratio.

Anyone who holds any type of ERC-20 asset and has access to an internet connection can become a liquidity provider by supplying tokens to an AMM protocol. LPs will usually earn a fee for providing tokens to the pool and this fee is paid by traders who interact with the liquidity pool.

Protocol Architecture

As a DEX, Uniswap is more decentralized and flexible than many other digital asset exchanges. Therefore, it can offer its users a variety of advantageous features, enriching their DeFi experience overall. When viewing Uniswap’s website, it is important to remember that it is much more than just an interface.

In fact, Uniswap standardizes how ERC-20 tokens are exchanged with a set of in-house smart contracts and allows anyone to build an interface connecting to these smart contracts to start exchanging tokens with everyone else using Uniswap immediately. Uniswap has released several versions of these smart contracts over the years. While Uniwsap V1 facilitated simple ERC20-ETH exchange, V2 introduced token-token exchanges, V3 optimized exchange liquidity, etc. 

Every Uniswap version builds on the concepts of its predecessor. Therefore, one must understand the whole line up to fully grasp Uniswap's innovations. Let's go over each version one by one.

Uniswap V1

Two different types of smart contracts make up Uniswap V1: Exchange Contracts and Factory Contracts.

Exchange Contract Uniswap
A Visual Of Uniswap's Exchange Contract Mechanism - Image via ProgrammerSought 

Exchange contracts contain a pool of specific tokens and Ethereum, with which users can trade and exchange. The second type of contract is Factory, which is responsible for creating new exchange contracts and connecting the address of the ERC-20 token to its personal exchange contract.

Adding DAI To Uniswap
When DAI Was Added To Uniswap Via Factory Contract Call - Image via Coinmonks Medium

Because Uniswap charges no fees for listing new tokens on its protocol, anyone can call a function in the Factory contract to register a new token. The figure above displays the process of adding the DAI token to Uniswap and this happened when someone first called the ‘createExchange’ function in a Factory contract with the DAI contract address. The Factory then checks the registry to verify if the Exchange contract for this token was previously created. If it wasn’t created, Factory creates an Exchange contract and writes its address to the registry.

Uniswap Liquidity Pools

As previously mentioned, Uniswap does not leverage the order book system to estimate the price of assets. In more traditional crypto exchanges such as Coinbase or Binance, the value of an asset is purely based on supply and demand, where the highest price is the one for which someone is willing to buy and the lowest price is the one for which someone is willing to sell.

Binance Order Book
A Visual Of The Binance Spot Market Order Book For ETH - Image via Binance 

The image displayed above shows the highest ETH bid price on Binance is $1985.87 and the lowest bid price is $1985.88. Instead of implementing order books, Uniswap facilitates token exchange by creating a pool of a pair of tokens. Anyone can permissionlessly swap one token from the pool for another. There are separate pools for all pairs of tokens people are trading on-chain.

When a user exchanges ETH for another token on Uniswap, ETH is sent to the contract pool and the token is returned directly to the user. So, an order book-based exchange matches buy orders with sell orders in real-time, but Uniswap pools are simple smart contracts that do not require any matching, the protocol simply swaps one token for another.

One profound benefit of this mechanism is about liveness. An order book needs matching buyers and sellers to be live at the same time. Uniswap's design alleviates this precondition. Furthermore, anyone can create any liquidity pool pair on Uniswap without any permission, enabling complete market-making autonomy.

Automated Liquidity Protocol

We learned previously that trading on Uniswap works with the help of liquidity pools, but where does this liquidity come from? In order book changes, liquidity comes from the market makers, participants who commit to continuously offering to buy and sell stocks (or other assets) to ensure there is always a market for them, thereby facilitating trading and increasing liquidity.

Markets work differently in Uniswap. Here, a separate entity called liquidity providers (LPs) stake their assets in liquidity pools so that traders can initiate token swaps. While liquidity is fundamentally important for the price discovery of an asset in any market, it is a parameter Uniswap's liquidity pools factor directly in the price calculation algorithm. Therefore, liquidity is a more closely tied concept for price discovery than traditional exchanges. 

Anyone, even the traders themselves, can become a liquidity provider on Uniswap. The protocol incentivizes liquidity provision by allowing them to earn a portion of the fees collected from the users swapping tokens on respective pools.

Each listed token has its own pool that users can supply liquidity to and the price of each token is determined not through an order book system but by using a mathematical algorithm computer. In exchange for supplying pools with their funds, LPs receive a token that represents their staked contribution to the pool.

So, for instance, if an LP contributed $1,000 to a liquidity pool that held $10,000 in total, the LP would receive a staked contribution token for 10% of that pool. This token can be then redeemed for a share of trading fees as, in fact, Uniswap charges users a flat 0.30% fee for every trade that occurs on the platform and automatically sends it to Uniswap’s liquidity reserve.

Uniswap Pooling System
A Representation Of How Uniswap's Pooling System Works - Image via Uniswap.org 

While Uniswap has recently upgraded to Uniswap V3, its V2 protocol entailed the introduction of a fee structure that could be turned on and off depending on the community’s vote, through which 0.05% of every 0.30% trading fee was sent to a Uniswap fund to finance infrastructure and future development.

Determining Token Price Through Constant Product Formula

Instead of using an order book to determine an asset’s price, allocated to the highest buyer and the lowest seller, Uniswap leverages its AMM architecture to mathematically adjust the price of a token based on its available supply apparent to the other token in a liquidity pool. This essentially works by increasing or decreasing the price of a token depending on the ratio of tokens in a given liquidity pool.

Constant Formula Uniswap
The Constant Product Formula Was Developed By Vitalik Buterin And Popularised By Uniswap - Image via Finematics 

This token ratio is calculated through what is called the Constant Product Formula, an equation that was first proposed by Ethereum founder Vitalik Buterin and then popularised by Uniswap. The Formula presents itself as follows:

tokenA_balance (x) * tokenB_balance (y) = k, or simply x * y = k

The constant, represented by ‘k’, means there is a constant balance of assets that determines the price of tokens in a liquidity pool. For instance, if an AMM holds both ETH and BTC, every time ETH is bought, its price will increase as there will be less ETH in the pool than before the purchase. Conversely, the price of BTC will decrease as there is more of it in the pool. It is also important to note that only when new liquidity providers join will the pool grow in size.

Visually, the price of tokens in the Uniswap AMM follows an exponential curve determined by its Constant Product Formula.

Uniswap Formula Graph
A Visual Application Of Uniswap's Constant (k) Formula - Image via Paradigm 

In this constant state of balance, defined by k, buying one ETH in an ETH-BTC liquidity pool brings the price of ETH slightly higher along the curve, whereas selling one ETH brings its slightly lower. The opposite happens to BTC in the ETH-BTC pool, which allows the pool to deal with high levels of volatility and eventually return to a state of balance.

Further Visual Examples Of (K)

As mentioned previously, Uniswap uses Exchange contracts to pool both ETH and a specific ERC-20 token into one individual pool. When exchanging ETH for a token on Uniswap, ETH is sent to the contract pool and the token is returned to the user. The amount that is returned after the exchange is based on an AMM formula, x * y = k.

Essentially, the amount returned to users depends on the ratio of ETH to tokens in the pool.

Uniswap K Graph
Image via Uniswap.org 

If users supply liquidity pools with only 1 token, these pools maintain a price balance with external markets through oracles and traders who arbitrate between pools. Ideally, taking a DAI-ETH liquidity pool as an example, this could be conceptualised as weighing scale, as illustrated below.

ETH DAI Uniswap Scale
A Visual Of Balanced DAI-ETH Liquidity On A Centralised Exchange - Image via Coinmonks 

Let’s assume that the current price of ETH is $150 and the ratio in the Uniswap DAI-ETH pool returns 150 DAI per ETH. In this scenario, the pool is balanced as the price of its assets is coherent with the current market prices. If, however, there is a swift market movement that pushes the price of ETH down to $100 on a centralized exchange, the pool is unbalanced as traders can still exchange ETH for 150 DAI on Uniswap when ETH’s market price is $100.

Unbalanced Liquidity Pool Uniswap
A Visual Of Unbalanced DAI-ETH Liquidity On A Centralised Exchange - Image via Coinmonks 

Thus, Uniswap users can put ETH into a pool, withdraw DAI, exchange the DAI for ETH and profit along the way. This can be done until the pool balances out again and reflects the current market price, creating considerable arbitrage opportunities for traders on Uniswap.

Becoming a Liquidity Provider

liquidity provision involves users depositing two types of tokens in a pool to facilitate trading. This process earns them liquidity provider (LP) tokens, representing their share in the pool and entitling them to a portion of the trading fees. The economic incentive is the earning potential from these fees, balanced against risks like impermanent loss, where the value of deposited tokens can decrease relative to holding them outside the pool. The economics of liquidity provision also consider factors like pool size, trading volume, and the relative price movements of the paired assets.

How to Become a Liquidity Provider in Uniswap?

To become a liquidity provider on Uniswap, you need to add an equal value of two tokens to a liquidity pool. Here's a simplified process:

  1. Connect Your Wallet: Access the Uniswap interface and connect your Ethereum wallet.
  2. Choose a Pool: Select the pair of tokens you want to supply liquidity to.
  3. Add Liquidity: Input the amount for one token, and the interface will automatically calculate the equivalent amount for the other token based on the current pool prices.
  4. Confirm Transaction: Approve the transaction in your wallet, considering gas fees and potential slippage.
  5. Receive LP Tokens: Once the transaction is confirmed, you receive LP tokens representing your share of the pool, which entitle you to a portion of the trading fees.

Always remember that providing liquidity involves risks like impermanent loss, so it's essential to understand these before proceeding.

Slippage

Slippage occurs when the execution price of a trade differs from the expected price, often seen in volatile markets or large orders. For example, if a trader places an order to buy a cryptocurrency at $100, but due to rapid price movements, the order is executed at $102, the $2 difference is the slippage.

Impermanent Loss

Impermanent loss happens to liquidity providers in decentralized exchanges when the price ratio of assets in a pool changes after they've provided liquidity. If a provider adds an equal value of two tokens to a pool, and the price of one token rises significantly compared to when they deposited, the dollar value of their pooled assets becomes less than if they had held the tokens separately. This loss is "impermanent" because it can be reversed if the prices return to the initial ratio.

Uniswap V1 liquidty chart.jpg
Uniswap V1 Liquidity Illustrated by DeFiLlama

The chart above illustrates the liquidity locked in Uniswap V1 liquidity pools, which have dwindled over the years. The reason these pools are losing popularity is the launch of Uniswap V2, which introduces even more flexibility for users. Let's dive in.

Uniswap V2

Uniswap V1 was the first version of the protocol launched in November 2018 at Devcon 4. Among its key features, Uniswap V1 offered:

  • Support for any ERC-20 token using Factory contracts.
  • Liquidity pools to collect fees on ETH-ERC-20 pairs.
  • Liquidity-sensitive automated pricing using constant formula (k).
  • ETH trading for any ERC-20 without wrapping.
  • Low gas fees.
  • Support for private and custom Uniswap exchanges.
  • Open source front-end implementation.
  • Funding through an Ethereum Foundation grant.

In May 2020, Uniswap launched its second iteration and introduced a series of new optimizations and improvements. Among its key features, Uniswap V2 offered:

  • ERC-20 to ERC-20 trading pairs, as opposed to V1’s exclusive ETH to ERC-20 and ERC-20 to ETH pairs.
  • Price Oracles
  • Flash Swaps
  • Core/Helper Architecture
  • Technical Architecture
  • Path to Sustainability
  • Testnet and Launch Details

Uniswap V2’s ERC-20 to ERC-20 pairs constitute perhaps the most notable improvement as they open up an entirely new market for trading digital assets, removing many of the bottlenecks of centralized exchanges. In Uniswap V2, any ERC-20 asset can be pooled together with any other ERC-20 token. While in Uniswap V1 all liquidity pools are established between ETH and individual ERC-20s, V2 allows users to swap any ERC-20 with any other ERC-20 by routing through ETH.

ETH Router
The ETH Intermediary When Swapping DAI X USDC In v.1 - Image via Uniswap.org 

Implementing V2’s ERC-20 to ERC-20 token pools is advantageous for liquidity providers, who can maintain more diverse ERC-20 token-denominated positions. Furthermore, if a user wanted to swap say DAI for USDC in V1 they would have had to undergo a double transaction fee, namely DAI to ETH and ETH to USDC.

DAI To USDC Swap
DAI To USDC Swap With Router On Uniswap v.2 - Image via Uniswap.org 

With Uniswap V2, however, users can transact directly between two ERC-20s through an ETH Router.

Uniswap V2 liquidity chart.jpg
DeFiLlama Illustrates the Liquidity Locked in Uniswap V2 Pools

The image above illustrates the liquidity locked in Uniswap V2 pools. These pools have been out of fashion since the launch of Uniswap V3. V3 pools introduced significant liquidity management and optimization options, which resulted in less slippage for traders and more returns for liquidity providers. Let's learn more about V3.

Uniswap V3: A New Era Of AMMs

It is by now clear that Uniswap serves as critical infrastructure for decentralized finance and incentivizes developers, traders, and liquidity providers to participate in a robust and secure digital asset marketplace.

Uniswap Version 3
Uniswap v.3 Introduces A New Layer To Decentralised Exchange Trading 

On May 5th, 2021, the Uniswap team announced the launch of Uniswap V3, its most powerful version yet, on the Ethereum mainnet.

Uniswap Tweet V3
On May 5th, Uniswap v.3 Went Live On The ETH Mainnet - Image via Uniswap Twitter 

Uniswap V3 introduces:

  • Concentrated Liquidity, giving LPs granular control over what price ranges their capital is allocated to.
  • Multiple Fee Tiers, allowing LPs to be appropriately compensated for taking on varying degrees of risk.
  • Liquidity Provision with up to 4000x capital efficiency compared to V2, meaning higher return for LPs.
  • Lower Slippage.
  • Fast and Cheap Price Oracles. Uniswap V3 Oracles are capable of providing time-weighted average prices on demand for any period within the last 9days of execution.
  • Significantly Cheaper Gas Fees! V3 swap transactions will occur on Optimism’s Layer-2 solution.

V3 Capital Efficiency

One of the most significant changes coming with Uniswap V3 relates to capital efficiency. This is because most AMMs have proven to be rather capital inefficient, the majority of their funds at any given time are not used. For instance, Uniswap currently has $5 billion locked in its contracts, however, it does only $1 billion in volume per day.

Uniswap V3 seeks to solve this issue by allowing LPs to set custom prices for which they want to provide liquidity for. This will, in turn, lead to more concentrated liquidity in the price range that most trading activity happens in.

uniswap v3.jpg
Uniswap V3 Concentrated Liquidity Illustrated On a Graph | Image via Medium

Let's dive into Uniswap V3, visualizing the concept step by step:

  1. Understanding the V2 Curve: Imagine a graph where the x-axis represents the amount of one token (say, Token A), and the y-axis represents another token (Token B). The product of Token A and Token B amounts is a constant, forming a hyperbolic curve. In V2, liquidity is spread across this entire curve, even in price ranges where no trades occur.
  2. Identifying Liquidity Inefficiencies: In V2, if most trades happen within a narrow price range, the tokens outside this range aren't effectively utilized, leading to inefficiencies. For instance, if Token A is mostly traded between 1 and 2 units for Token B, liquidity beyond these values is less active, not contributing much to fee earnings for LPs.
  3. Introducing V3's Concentrated Liquidity: Now, envision transitioning to V3. Instead of providing liquidity across the whole curve, LPs can choose a specific segment—say, between 1 and 2 units of Token A for Token B. They allocate their tokens only within this range, concentrating liquidity where it's most needed.
  4. Visualizing Concentrated Liquidity: On the same graph, imagine a vertical band between 1 and 2 units of Token A, representing the chosen price range. LPs now contribute liquidity only within this band, creating a denser, more focused area of liquidity.

Implications of Concentrated Liquidity:

For Liquidity Providers:

  • LPs earn fees from trades within their chosen price band. The narrower the band, the greater their share of fees from that segment, rewarding precision in selecting price ranges.
  • LPs must now strategize on where to place their liquidity, considering market trends and potential price movements.
  • Skilled LPs can capitalize on anticipated price shifts by placing liquidity at less active ranges, potentially earning more if the market moves as expected.

For Pool Users:

  • Trading within a concentrated liquidity band results in less slippage and more efficient trades, as there's more liquidity at the specific prices where trading is happening.
  • This concentration could lead to better price discovery, reflecting more accurately the market's valuation of the assets within that range.

Improved Price Oracles

Uniswap V3 introduces an enhanced oracle system that provides more accurate and granular price data. These oracles accumulate price information over time, allowing users and developers to access historical price data efficiently. This feature is particularly useful for external applications requiring reliable price feeds, like lending platforms or financial products, enhancing the DeFi ecosystem's overall functionality and interconnectivity.

Uniswap On Layer-2

Transaction fees on the Ethereum network have been at an all-time high in the last year and this has, at times, made Uniswap unaffordable for many smaller investors out there. Thus, to counter this, Uniswap V3 will be deployed on a Layer-2 scaling solution called Optimism.

Optimism
Optimism Will Allow Uniswap To Reach Greater Scalability And Perform Transactions More Efficiently - Image via Uniswap.org 

By implementing a Layer-2 Optimistic rollup, Uniswap will benefit from the security of the Ethereum blockchain and enjoy greater transactional throughput as well as scalability.

Uniswap V4

With every new iteration, Uniswap continues to upgrade and improve its liquidity pools. The goal has been to keep refining the experience of using Uniswap. It may be that Uniswap V1 was a proof of concept that smart contracts can support efficient on-chain market-making through liquidity pools. 

Uniswap V2 improved the experience by introducing token-token liquidity pools and V4 made those pools significantly capital efficient with concentrated liquidity. On June 13th, 2023, Uniswap unveiled V4, a complete overhaul of how smart contracts manage liquidity pools and users interact with the Uniswap protocol. There is a lot to unpack in Uniswap V4. Every change introduced has major implications, making it the most significant upgrade the community has pushed so far.

Singleton Contract

Uniswap V1 introduced Factory contracts and Exchange contracts, where the factory was responsible for deploying unique smart contracts, each representing a particular liquidity pool. In this system, the factory produces mutually exclusive token pools, each with separate liquidity and requiring the users to interact with them individually. Such a system is gas inefficient because cross-pool swaps, involving several individual steps, cost significant gas.

Uniswap Singleton Contract.jpg
Transaction Consolidation in Uniswap v.4

Uniswap V4 relieves the Factory contract in favor of a singleton contract. Think of the singleton contract as a master contract that consolidates all pools within it. When all the pools live under the same contract, cross-pool interactions become significantly cheaper. Where such transactions in V3 had to hop stepwise from one pool to another, singleton contract enables complex, multi-step transactions to be executed in a single step, reducing gas fees. Singleton contract also reduces the gas cost of deploying new pools by 99%.

Pool Manager

Uniswap Pool Manager.jpg
Pool Manager Architecture | Image via Uniswap Docs

Uniswap V4 introduces the Pool Manager, a smart contract that has mapped out all the pools and acts as the interface between the user and the liquidity pools. The pool manager is the singleton contract taking care of all operations in Uniswap.

Flash Accounting System

Uniswap V4 introduces a novel “flash accounting” system that enables users to execute multi-step atomic transactions. An atomic transaction involves multiple steps, and the contract ensures that if any step fails to execute successfully, the entire transaction is reverted.

Therefore, it will enable users to chain together multiple transactions, like swap-and-add liquidity, and the protocol will ensure they are executed atomically. The protocol reduces the fees for such complex transactions by making all the internal calculations simultaneously and executing only the final result.

Other Updates in Uniswap V4

Uniswap V4 also includes some more updates, which, while not as profound as flash accounting or singleton contracts, are still significant, adding up to enhanced flexibility of the ecosystem. These updates are:

  • Unlimited Fee Tiers: Uniswap V4 introduces unlimited fee tiers, offering more flexibility to accommodate various assets and trading strategies. This feature allows for customized fee structures for different liquidity pools, enhancing the platform's adaptability to diverse market conditions and user preferences.
  • Native ETH Support: The new version also supports native ETH trading pairs, simplifying transactions by removing the need to use Wrapped ETH (WETH). This change is expected to streamline the trading experience and reduce associated costs, making it more user-friendly and efficient.
  • Community Driven Development: V4 emphasizes community-driven development, encouraging contributions from users worldwide. This collaborative approach fosters innovation, with the community actively participating in proposing features, identifying issues, and enhancing the protocol, shaping the future direction of Uniswap's automated market makers.

As of April 2024, Uniswap V4 is under development, with a tentative launch planned for Q3 2024.

UniswapX

Since its launch in 2018, Uniswap has played a pivotal role in the growth of onchain trading, boasting a staggering $1.5 trillion in trading volume. Building on this legacy, Uniswap is now unveiling UniswapX, a groundbreaking protocol designed to advance onchain trading and facilitate self-custody swapping.

Unveiling UniswapX

  • Innovative Trading Protocol: UniswapX is a permissionless, open-source protocol based on the Dutch auction mechanism. It is designed to optimize trading across various AMMs and liquidity sources.
  • Opt-in Beta Launch: The protocol is currently available in an opt-in beta version on the Uniswap Labs interface for Ethereum Mainnet, with plans to expand to other chains and the Uniswap app.

Key Features of UniswapX

  • Enhanced Price Efficiency: By aggregating multiple liquidity sources, UniswapX ensures users get better pricing for their trades.
  • Gas-Free Swapping: Users can initiate swaps without incurring on-chain gas fees, a revolutionary step forward in reducing trading costs.
  • Protection Against MEV: UniswapX includes mechanisms to protect users from Maximal Extractable Value, ensuring fairer transaction outcomes.
  • No Cost for Failed Transactions: Users are not penalized financially for transactions that do not succeed, enhancing the trading experience.
Uniswap fillers.jpg
Unoswap Will Leverage Fillers That Perform Efficient Routing | Image via Uniswap

Future Developments

  • Cross-Chain Swapping: UniswapX is set to introduce gas-free cross-chain swaps, further enhancing its utility and flexibility.
  • Routing Optimization: With an evolving landscape of liquidity pools and protocols, UniswapX's innovative routing system ensures competitive pricing and efficient trade execution.

Security and Governance

  • Immutable Smart Contract: The UniswapX protocol is designed as an immutable smart contract, ensuring reliability and trust.
  • Community-Driven Governance: UniswapX maintains a protocol fee switch, governed by Uniswap Governance, reinforcing its community-centric approach.

Conclusion: UniswapX - Leading the Next Wave of DeFi Innovation

UniswapX represents a significant leap forward in decentralized finance, offering a suite of features that enhance trading efficiency, reduce costs, and protect users. With its commitment to innovation, security, and community governance, UniswapX is poised to redefine the DeFi landscape, continuing Uniswap's legacy as a trusted leader in the space. There's a whole lot more in the UniswapX whitepaper.

Uniswap's Regulatory Headwinds

The US Securities and Exchange Commission issued a Wells Notice to Uniswap in April 2024.

A Wells notice is a preliminary notification issued by the SEC to indicate its initial decision to recommend enforcement action by the commission for securities law violations. It outlines the specific violations identified and offers the individual an opportunity to respond.

During a press conference, Uniswap COO Mary-Catherine Lader and Chief Legal Officer Marvin Ammori disclosed that the Wells Notice focuses on allegations of operating as an unregistered securities broker and exchange, according to CoinDesk. Ammori argued that Uniswap does not fit the SEC's definition of an exchange and referenced a favourable ruling for Coinbase in a similar case, suggesting optimism for Uniswap's defence against the SEC's charges.

Yes, I'm frustrated that the SEC seems to be more concerned with protecting opaque systems than protecting consumers. And that we'll have to fight a US government agency to protect our company and our industry. - Uniswap founder Hayden Adams on X

In a blog post, Uniswap argued against the SEC's stance that most tokens are securities, emphasizing that tokens, as a digital file format, inherently hold various types of value and are not automatically securities. The platform highlights that the majority of traded tokens, including stablecoins, community and utility tokens, and commodities like Ethereum and Bitcoin, do not qualify as securities. Uniswap also contends that tokens traded on secondary markets do not constitute investment contracts. The company also criticizes the SEC for not providing a clear regulatory pathway for tokens that might be considered securities to be registered.

I think freedom is worth fighting for. I think DeFi is worth fighting for. - X

How To Use Uniswap

Uniswap offers a user-friendly interface that allows users to connect their Metamask, Portis, WalletConnect, Coinbase Wallet or Fortmatic wallets and begin trading right away. Below is a step-by-step guide on how to get started using the Uniswap platform:

  • Once a wallet is fully set up, users can go to the official Uniswap website, click ‘Launch App’ and then ‘Connect Wallet’.
Connect Wallet Uniswap
Image via app.uniswap.org 
  • Users can then select their preferred wallet and begin using the platform.
  • A pop-up will subsequently appear showing the user’s account, and they should click ‘next’ and ‘connect’.
  • Now that the selected wallet is connected to Uniswap, users can begin swapping.
  • On the swap tab, users can choose the token amount they wish to swap, and if a token is not listed they will have to manually enter the official contract address of the desired token.
Token Amount
Image via TheCryptoBasic 
  • Uniswap will then provide users with an estimate of the amount of tokens they will receive after the swap.
  • Users can confirm the swap simply by clicking ‘Confirm Swap’.
  • After having confirmed the swap, a window will show up with the gas fee required to execute the transaction.
  • Once the transaction is completed, Uniswap provides users with a link to their transaction on Etherscan.

UNI Token

UNI is an ERC-20 token and Uniswap’s native asset. The UNI token acts as a governance token for the Uniswap platform and gives holders the right to vote on new changes and developments to the platform, including how minted tokens should be distributed to the community and developers, as well as any changes to the fee structure.

UNI was created in September 2020 in an effort to prevent Uniswap users from migrating to SushiSwap, which had offered Uniswap users SUSHI tokens in return for their migration. Thus, Uniswap minted 1 billion UNI tokens and decided to distribute them to anyone who had previously used the platform. On September 1st, each user received 400 UNI tokens, equating to approximately $1,400 at the time.

UNI Token.jpg
Since The Beginning Of 2021, Uniswap Has Enjoyed A Progressive Upward Trend But Has Retraced From Its Highs Of May 2021 | Image via CoinMarketCap 

Uniswap received backing and investments from heavyweight venture capital firms in the blockchain space, such as Andreessen Horowitz, Paradigm Venture Capital, Union Square Ventures, and Parafi. 

What are Uniswap's fees?

Starting Oct. 17, Uniswap started charging a 0.15% swap fee, the first in its history, on certain tokens in its web app and wallet, Founder Hayden Adams announced on X (formerly Twitter). This fee is separate from the Uniswap Protocol fee switch, which is voted on by Uniswap governance.

In April 2024, Uniswap raised the trading fee on its interface to 0.25% from 0.15% for most swaps. However, certain transactions like those involving stablecoins or swaps between Ethereum and wrapped Ether remain exempt from this fee increase. Users can also avoid the fee hike by using alternative interfaces to access the protocol. Nonetheless, all other trades on the mainnet and supported Layer 2 networks will now be subject to the higher fee, set by Uniswap Labs.

Uniswap Team

Uniswap was founded on November 2nd 2018 by Hayden Adams, a former mechanical engineer for Siemens. Hayden graduated from Stony Brook University with a bachelor's in engineering in 2016 and was deeply inspired by Vitalik Buterin’s 2016 proposal for a Decentralised Exchange that would employ an on-chain automated market maker with certain unique characteristics. Just two years later, Hayden Adams began working on his own AMM-DEX and has since then become the founder and leading catalyst of Uniswap.

After receiving several funding rounds as well as a $100,000 grant from the Ethereum Foundation, Hayden began expanding his employee base for the Uniswap platform.

The Team at Uniswap Labs is composed of:

Conclusion

Uniswap has taken the DeFi space by storm as it offers its users a variety of exciting and advantageous functionalities, ultimately re-architecting the concept of liquidity via its AMM infrastructure.

As a DEX, Uniswap allows users to swap various ERC-20 tokens from a simple, user-friendly, all-in-one web interface that eliminates the many bottlenecks typical of other traditional, centralized exchanges, and it furthermore incentivizes traders and developers to provide liquidity to its pools and receive attractive trading fees. Uniswap has created an innovative DeFi architecture that is truly reshaping the process of decentralized on-chain trading.

Frequently Asked Questions

What is UniswapX?

UniswapX is a permissionless, open-source protocol based on the Dutch auction mechanism. It is designed to optimize trading across various AMMs and liquidity sources.

How Does Concentrated Liquidity Work?

In Uniswap V3, concentrated liquidity allows liquidity providers to allocate their funds to specific price ranges within a pool. This means liquidity is denser where it's most needed, enhancing capital efficiency. Providers can earn higher fees if trades occur within their chosen price range, incentivizing strategic liquidity placement based on market predictions.

What are the Upcoming Updates in Uniswap v.4?

Uniswap V4 plans to introduce unlimited fee tiers, enabling more tailored fee structures for different liquidity pools. It will also support direct trading pairs with native ETH, simplifying transactions. Furthermore, V4 emphasizes community-driven development, encouraging user contributions to its open-source protocol and enhancing its functionality and inclusivity.

What is the Utility of UNI Token?

The UNI token serves multiple purposes in the Uniswap ecosystem. It grants governance rights, allowing holders to vote on key protocol decisions, including upgrades and treasury management. UNI also plays a role in incentivizing participation in the platform's development and operation, contributing to its decentralized governance structure.

Can You Perform Cross-chain Transactions on Uniswap?

Currently, Uniswap operates on the Ethereum blockchain and does not natively support cross-chain transactions. However, with the introduction of UniswapX and other developments, there are plans to facilitate cross-chain swaps, enabling users to trade assets across different blockchain networks seamlessly, enhancing Uniswap's interoperability and utility.

Editorial Team

The Coin Bureau Editorial Team are your dedicated guides through the dynamic world of cryptocurrency. With a passion for educating the masses on blockchain technology and a commitment to unbiased, shill-free content, we unravel the complexities of the industry through in-depth research. We aim to empower the crypto community with the knowledge needed to navigate the crypto landscape successfully and safely, equipping our community with the knowledge and understanding they need to navigate this new digital frontier. 

Disclaimer: These are the writer’s opinions and should not be considered investment advice. Readers should do their own research.

Previous article
Stellar Review: The Network Moving Micro Payments
next article
NEAR Protocol Review 2024: Updates You Don't Want to Miss!