What is Uniswap (UNI): how does the popular DEX work?

Decentralized Exchanges (DEXs) have cemented their place in the blockchain and cryptocurrency industry. They provide a solution to centralization by allowing users to interact with their platform in a self-custodial manner. A prime example of one of the leading DEXs is Uniswap. Since its creation in 2018, it's become the largest DEX in the world. According to DefiLlama's Total Value Locked (TVL) ranking for DEXs, Uniswap sits on top with a TVL of over $4,000,000,000. This is above competitors like Curve Finance and PancakeSwap, which as of late 2023 have less than half of Uniswap's TVL.

The DEX's appeal and success led us to become the first major industry player to fully integrate Uniswap Labs' trading API into our product in February 2024. The integration enhances the reliability and security of DeFi transactions while simplifying the trading process and reducing costs for users.

Uniswap has made a significant contribution to the evolution of the cryptocurrency industry, especially within the decentralized finance (DeFi) sector, as it continues incorporating the latest technology into its platform. Interested to find out more about Uniswap and how it managed to become a leader among DEXs? Read on as we cover everything you need to know about Uniswap and the UNI token.

What is Uniswap?

Uniswap is a decentralized exchange that operates on the Ethereum blockchain. It's a cryptocurrency trading platform that allows traders to engage with one another on a peer-to-peer basis. Uniswap doesn't employ order books or intermediaries to facilitate transactions. Instead, it uses an automated liquidity protocol operated by Automated Market Makers (AMM).

How does Uniswap work?

The Uniswap ecosystem is made up of several components, each playing a role in making sure the automation process works 24/7 without interruption.

Automated Market Maker (AMM)

Automated market makers are the foundation of Uniswap. Instead of order books where traders pair with their counterparts from the other side of a trade, AMMs provide a liquidity pool that seamlessly facilitates trading. AMMs make sure of constant liquidity in the DeFi ecosystem via liquidity pools to support transactions.

In comparison, traditional markets use buyers and sellers in a system moderated by centralized figures. AMMs function in a permissionless and automated system that relies on liquidity pools. Users with crypto tokens supply liquidity pools. A predetermined mathematical formula then calculates token prices in these liquidity pools.

Uniswap's AMM is a smart contract that manages the pools deployed when trades execute on the DEX. It uses an algorithm to determine a token's effective price during active trading. Assets' prices on Uniswap are determined based on the principles of supply and demand between the traded ERC-20 tokens and the liquidity pools.

Liquidity pool and liquidity providers

In finance, liquidity refers to the ease with which an asset can be converted from one form to another without affecting the market price. During the early stages of DEXs, it was difficult to resolve issues surrounding liquidity. Considering the novelty of the technology, users were reluctant to participate in the ecosystem.

Uniswap

The introduction of AMMs revolutionized the way DEXs work. It solved the complicated liquidity problem by creating liquidity pools and incentivizing liquidity providers to power them.

A liquidity pool is a crowdsourced pool of cryptocurrencies or tokens used to facilitate trades in a decentralized manner. Smart contracts manage digital assets in a liquidity pool. Developers program smart contracts to determine the prices of such tokens at any given time. Meanwhile, a liquidity provider refers to anyone contributing tokens to a liquidity pool to provide liquidity in a DEX or a DeFi ecosystem.

Stakers — also called liquidity providers — contribute to the liquidity pool on Uniswap. Usually, traders pay a fee of about 0.3% when transacting on Uniswap. Uniswap distributes the fees among liquidity providers based on the proportion of their contributions to the liquidity pool.

The Uniswap constant product formula

To provide ample liquidity, Uniswap integrates a constant product formula to balance the liquidity ratio of every cryptocurrency pair. The formula considers the individual tokens that make up a pair as variables. While withdrawing one type of token against another, the constant product formula balances the supply-demand ratio and the price between both pairs. The programmed formula makes sure market value remains fair while maintaining liquidity.

Arbitrage traders

Pricing efficiency is an essential characteristic of any DEX. After all, no one would want to trade and swap tokens with a DEX that offers unnecessarily high slippage and large bid-ask spreads. That's why arbitrage traders are important to the Uniswap ecosystem. In essence, arbitrage traders specialize in seeking out price discrepancies across multiple CEXs and DEXs and use them to secure gains. For example, if Bitcoin was trading on OKX for $42,800 and Uniswap at $42,750, arbitrage traders would buy BTC on Uniswap and sell it on OKX to secure a lower-risk earning.

What arbitrage traders do on Uniswap is to look out for coins and tokens that are trading above or below their average market price. This typically happens due to large block trades creating imbalances in the liquidity pool, which lead to fluctuations in prices that often go under the radar. Arbitrage traders then trade these cryptocurrencies until pricing efficiency is achieved and crypto prices are rebalanced to be in line with the price on other exchanges. This ultimately creates a win-win relationship between the AMM and arbitrage traders — the AMM achieves its goal of efficient prices for its coins and tokens that are aligned with the rest of the DEXs and CEXs in the market, while arbitrage traders get to enjoy lower-risk gains.

How has Uniswap evolved?

Uniswap has changed over the years since launching in 2018. A series of updates and protocol adjustments led to different protocol versions.

Uniswap v1

Uniswap v1 is the earliest version of the protocol with the basic attributes of a DEX. Despite the buzz generated by the protocol, it simply allowed users to trade ERC-20 tokens directly on the Ethereum blockchain.

Its key feature was implementing the AMM model, which used a constant product formula (x*y=k) for liquidity pools. This formula was crucial in automatically modifying token prices, providing fair and adaptable pricing, and preserving consistent liquidity by changing trade sizes and market circumstances.

Uniswap v2

Uniswap's first upgrade came in 2020 with Uniswap v2. One of the main features of Uniswap v2 was to introduce the ERC-20 to ERC-20 trading pairs. With this version, liquidity providers had the power to create pair contracts for any two ERC-20 tokens. It also eliminated the need for ETH as an intermediate token to support trading across ERC-20 tokens.

The v2 platform offered a new price oracle system and applied the platform's existing liquidity pools to deliver more precise and tamper-proof price information. This enhancement aimed to reduce the possibility of price manipulation and oracle attacks, ultimately strengthening the platform's dependability.

Uniswap v3

Uniswap v3 is the latest and current version of the DEX. One of the significant features of Uniswap v3 is the ability of liquidity providers to set their custom price ranges within which they want to provide liquidity. That implies that a liquidity provider setting a price range between $1,000 and $5,000 can only enable trades that fall into that range. This update solves the problem of capital inefficiency seen with undefined liquidity ranges.

While Uniswap v2 has fungible liquidity positions in the form of ERC-20 tokens, Uniswap v3 uses NFTs to represent these positions. Each liquidity provider (LP) selects unique price ranges and fee tiers.

Uniswap v4

By 2024, significant advancements have been made with Uniswap, and there's now a focus on Uniswap v4. Uniswap has set aside a budget of $300,000 to develop its v4 edition. The updated DEX version improves various elements, with a particular emphasis on making the user interface more intuitive for pool launchers and liquidity providers.

Despite being introduced over two years ago, Uniswap v3 hasn't overshadowed the popularity of v2, which still manages a significant $1.8 billion total value locked (TVL). The v4 iteration aims to elevate the user experience even higher and is scheduled to roll out in Q3 of 2024.

The funding allocated for this project is expected to cover two years of development and may be prolonged depending on its success. One noteworthy element of the v4 development is a specific benchmark, known as a key performance indicator (KPI), which mandates that 5% of Uniswap's total value locked (TVL) must be attained through tokens released using the new interface within a year. That's equivalent to about $150 million in present currency.

UniswapX

To grow on-chain trading and improve self-custody swapping, the Uniswap team recently announced the UniswapX protocol. As a permissionless, open-source, Dutch auction-based protocol, UniswapX aims to improve core features of Uniswap v2 and v3 in two key areas: scalability and Maximal Extractable Value (MEV) protection. In doing so, UniswapX gives token swappers the best prices and user experience possible. Several key features of UniswapX that are worth highlighting include:

  • Enhanced security and MEV protection: UniswapX employs various mechanisms like private transaction relays, auction-based routing, and decentralized MEV protection to mitigate the risks associated with MEV. These risks can disadvantage users in traditional DEXs and cause common issues like network congestion and expensive gas fees.

  • Flexible trading mechanisms: By leveraging an auction-based routing system instead of the AMM model used in Uniswap, UniswapX allows for dynamic price discovery and potentially better execution prices compared to the fixed-price model.

  • Cross-chain swaps: UniswapX facilitates seamless swaps between tokens on different blockchains through its integrated "UniswapX Bridges". It offers a user-friendly experience that merges swapping and bridging into one seamless action for cross-chain asset transfers.

  • Limited gas-free swaps: For specific token pairs and trade sizes within its internal network, UniswapX allows users to conduct swaps without paying transaction fees, potentially reducing overall costs and improving swap efficiency for users.

The Uniswap (UNI) token

Although Uniswap launched in 2018, it didn't introduce a native token until 2020. Uniswap launched UNI in 2020 as a governance token on the Uniswap platform. It's an ERC-20 token built on the Ethereum platform and stored in any ERC-20-compatible wallet.UNI holders preserve the right to vote on changes and improvements in the Uniswap protocol. Like other governance tokens, a UNI holder's voting power is proportional to the ratio of UNI held. Voting on Uniswap is decentralized, and anyone holding UNI tokens can submit a proposal and vote whenever the need arises.

Uniswap (UNI) tokenomics

Genesis UNI allocation

Source: blog.uniswap.org

Tokenomics wise, UNI has a maximum supply of 1,000,000,000, with 753,766,667 UNI tokens currently in circulation. As of mid-December 2023, UNI had a last-traded price of $6.33, which is an 85.9% decline from its all-time high of $44.97 on May 3, 2021. With a whole 60% allocated to the community, most of these UNI tokens have already been distributed to early Uniswap adopters who have supported the DEX by interacting with it and making active swaps and trades. One thing to note is that UNI has a perpetual 2% annual inflation rate that'll kick in once UNI reaches its maximum supply and is fully distributed. According to Uniswap, this will help to encourage continued participation and contribution to the Uniswap DEX.

Utility of UNI

Some commentators have claimed that UNI lacks any form of utility except for governance and voting rights in determining the future of Uniswap. Many believe this differs from DEX tokens like CAKE and JOE, which offer attractive benefits for holding the token, including bonus staking yields, reduced trading fees, and trading revenue payouts.

This has led to a talking point about how UNI tokens are essentially disconnected from the success of Uniswap as a DEX. While the platform continues to succeed in drawing in trades and token swaps, many believe there's no advantage to holding UNI for the long haul, aside from hoping that this value will soon be transferred to token holders.

Although there have been rumors about how some of these benefits might materialize in the near future, the main reason for crypto traders to hold UNI is to access voting rights on governance proposals. This ultimately aligns with Uniswap's core vision of providing limited benefits to UNI token holders and keeping the Uniswap platform as a public good that's owned and governed by UNI holders.

Trading on Uniswap DEX

Trading on the Uniswap DEX involves a few simple steps that differ from trading on centralized exchanges. Anyone with a cryptocurrency wallet containing ERC-20 tokens can connect and carry out trading on Uniswap in the following steps:

  1. Visit the Uniswap website and connect your Ethereum wallet.

  2. From the list of ERC-20 tokens, select the one you want to trade on Uniswap.

  3. Input the amount of the selected ERC-20 token you wish to trade. The platform will automatically calculate the estimated equivalent amount of the alternative token you'll receive.

  4. Click on the "Swap" icon to start the transaction, and confirm the process with the following prompt.

  5. After confirmation, the trade will instantly execute, and the tokens will reflect in your wallet.

Uniswap's impact on the DeFi sector

Many believe that Uniswap has played an important role in promoting DeFi. The entity has helped boost the sector by supporting decentralized exchange infrastructure, permissionless listings, liquidity provisioning, token price discovery, and interoperability.

To many, Uniswap is the game-changer that introduced the current DeFi revolution sweeping the cryptocurrency industry. It has also provided users with the opportunity to benefit by joining liquidity pools. By doing so, users can earn passively from the transaction fees charged on the exchange, depending on the proportion of their contribution.

The final word and next steps

Overall, Uniswap remains a market leader among DApps for being the DEX with the highest trading volume in the DeFi space. From revolutionizing the way DEXs work with AMMs to offering a staggering variety of coins and tokens to swap and trade, Uniswap looks to maintain this TVL lead for the long haul by continually innovating and being a bastion for DeFi in the crypto community. While some crypto traders may emphasize that UNI tokens don't offer value beyond governance and voting rights, Uniswap enthusiasts often argue that one UNI token offers the equivalent of one vote, which will help in dictating the direction Uniswap will grow as a DEX in the future.

Keen to read more about DEXs? Check out our guides to Shibaswap and Balancer to learn more about competing DEXs that are striving for market share alongside Uniswap.

FAQs

What is the downside of Uniswap?

Uniswap runs on the Ethereum blockchain and shares some of the weaknesses of Ethereum, including high gas fees during network congestion.

How does Uniswap set prices?

Uniswap automatically sets token prices using the already programmed constant product formula.

Is Uniswap risky?

Like any other decentralized exchange, there are inherent risks on Uniswap that users should be aware of, such as smart contract volatility and slippage. However, there's also the risk of impermanent loss on Uniswap.

Does Uniswap have high fees?

Transaction fees on Uniswap are generally competitive. However, since it runs on the Ethereum blockchain, Uniswap users can experience high gas fees during congestion.

Is it safe to link a wallet to Uniswap?

Linking your wallet to Uniswap is generally considered safe if you observe the basic wallet protection protocols.

Related articles
View more
View more