What Is Uniswap? Understanding the Largest Decentralized Exchange

The boom in decentralized Finance (DeFi) has been fueled by various projects on the Ethereum blockchain. Uniswap is one of them, in this guide we will look at what Uniswap is, how it works and why it’s so important to the DeFi ecosystem.

At its core, Uniswap is a decentralized automated market maker (AMM) built on top of the Ethereum blockchain. It’s a decentralized exchange that does not have an order book, a token listing evaluation process, and can be used directly from an Ethereum wallet like Metamask.

To better understand it, let’s look at how it came to be, some of its key features, what set its apart, its UNI governance token, and more.

Table of contents

Origin of Uniswap

For over a decade now, centralized cryptocurrency exchanges have been a central pillar in the crypto ecosystem, providing users an on and off-ramp that’s easily accessible. These trading platforms have increasingly been regulated and this means that before using them, often users have to provide know-your-customer (KYC) identification, which requires various personal documents.

On top of that, centralized exchanges require user deposits and keep the funds under their custody. This is a risk for crypto users, as exchanges can get hacked and users’ funds are lost in the process. Most top exchanges, including Bitfinex and Binance, have been hacked at some point, but these platforms managed to reimburse users. In the case of Mt Gox’s 740,000 bitcoin hack that occurred in late 2013, however, users are still looking to get their bitcoins back.

These events have seen some in the community tout decentralized exchanges (DEXs), exchanges that aren’t managed by a central authority and are non-custodial. The first decentralized exchanges didn’t take off because of a lack of liquidity and poor user experience.

Uniswap solved the liquidity and user experience problem using automated market makers (AMM). The exchange was created by Hayden Adams, who gained inspiration to create the exchange after reading a post from Ethereum co-founder Vitalik Buterin on building decentralized exchanges that executed trades on the blockchain using smart contracts.

The platform was launched on the Ethereum blockchain on November 2, 2018, after Adams worked on it for over a year. Uniswap was then funded via a $100,000 grant from the Ethereum Foundation. The exchange was later on audited by the ConsenSys Diligence team. Since then, new versions of the Uniswap protocol were launched.

What is Uniswap?

Uniswap is a decentralized exchange using an automated liquidity protocol on the Ethereum network. Unlike traditional centralized exchanges it does not use an order book, and allows traders to trade directly from their ETH wallets without any intermediaries, making it censorship-resistant.

Instead of using an order book, Uniswap uses a model that requires liquidity providers to deposit their funds into liquidity pools. Uniswap matches buy and sell orders against these liquidity pools, and uses a decentralized pricing mechanism that smooths out order book depth. The code behind it is open-source and can be reviewed on GitHub.

As it’s a decentralized exchange, there is no formal listing process. Any ERC-20 token can be launched on Uniswap, as long as a liquidity pool is created on it. Similarly, Uniswap doesn’t charge any listing fees.

It does, however, charge trading fees but the money coming from them doesn’t go to its founder or its team.

What are liquidity pools?

Uniswap works thanks to smart contracts on the Ethereum blockchain. These are self-executing contracts that exist on the blockchain, and their execution is controlled by code. Uniswap’s smart contracts control its liquidity pools and ensure orders are matched, and liquidity providers are rewarded.

Currently, Uniswap charges a 0.3% trading fee, which is distributed to liquidity providers. Anyone can become a liquidity provider by depositing tokens into a liquidity pool. Deposits require that an equivalent value of the two tokens in the liquidity pool is deposited.

Let’s use the ETH-DAI liquidity pool as an example. To add $100 worth of DAI in liquidity to the pool and get rewarded with the trading fees, a user would also have to deposit $100 worth of ether. The liquidity provider will then receive a share of the fees received on every order, according to their share of the pool.

Upon providing liquidity to a pool, liquidity providers receive “liquidity tokens” on their wallets, which represent their share of the pool. These tokens can be redeemed for the share of the pool they represent.

How does it work?

On Uniswap, the value of both tokens within a liquidity pool must remain constant. Vitalik Buterin explained this in his original post as “X*Y=k.” Using the ETH-DAI pool example, x is the amount of ETH in the pool, and y is the amount of DAI in the pool.

Anyone can buy or sell either ETH or DAI in the pool, and this would shift the liquidity provider’s position. If a user buys ETH, for example, the amount of DAI the liquidity provider has goes up, while the amount of ETH goes down.

As a result, the more ETH traders buy, the higher the amount of DAI they will have to pay to buy more, just like in a centralized exchange. The more liquid a pool is, the lesser this effect is felt. Per Buterin, a 0.3% trading fee is enough to make the liquidity provider a profit for putting its funds on the line.

The model has significant advantages, as Buterin put it:

“The nice thing about this kind of design is that it is provably resistant to money pumping; no matter how many people make what kind of trade, the state of the market cannot get off the curve.”

The model is resistant to money pumping as larger orders become exponentially more expensive than smaller orders, as they lead to larger amounts of slippage. The model does have its shortcomings, and one of them is called impermanent loss.

Understanding impermanent loss

While liquidity providers earn passive income from the trading fee charged on Uniswap’s traders, they are at risk of an effect called impermanent loss, which essentially describes losses that could occur due to price divergence.

In the example given in the first article used to describe impermanent loss Pintail pointed to 1 ETH and 100 DAI being supplied to the ETH-DAI pool, giving the provider 1% of the pool’s total. This would mean the pool contains 10,000 DAI and 100 ETH in total liquidity (k), and implies the price of 1 ETH at the time is 100 DAI.

Leaving fees aside, if the price of 1 ETH moves up to 120 DAI, the total amount of funds in the pool will shift to 91.2971 ETH and 10,954.4511 DAI. The 1% stake in the pool is now 0.9129 ETH and 109.54 DAI. Our liquidity is now worth $219.09 in total.

While the liquidity provider is in the green, if they had held onto the 1 ETH and 100 DAI without putting them on Uniswap, the value of their holdings would be $220.  Essentially, the liquidity provider could lose out on potential opportunities using Uniswap. So in this case the impermanent loss is $220 - $219.09 = $0.91, which might not seem like a lot but it adds up as the liquidity size and price change in the pool assets increases.

The impermanent loss effect occurs whether the price of cryptoassets goes up or down. The loss is impermanent, however, as the price of the pooled funds could fluctuate back to when they were first added to the pool. In this case, the effect is mitigated and the liquidity provider earns fees.

Liquidity providers are looking for low volatility markets but as we all know that is not likely in crypto! So liquidity providers need to be aware of impermanent loss before committing funds to a Uniswap pool.

The UNI Token

In September 2020, Uniswap launched its native UNI token, which entitles its holders to governance rights over the protocol. UNI token holders can vote on changes to the Uniswap protocol, further decentralizing it.

A total of 1 billion UNI tokens were minted at the time. 60% of the tokens were distributed to existing Uniswap community members, while 40% of the tokens are set to be made available to team members, advisors and investors over the next four years.

Uniswap community members were those who had interacted with the protocol before the UNI token was launched. This means that anyone who used an Ethereum address to interact with Uniswap was entitled to a 400 UNI token airdrop.

Part of the community distribution also happened through liquidity mining, with UNI tokens being distributed as rewards to those providing liquidity to four different pools:

The 400 UNI airdrop was initially worth $1,200, as each UNI token was trading at $3. Soon after Uniswap’s announcement top cryptocurrency exchanges scrambled to list UNI trading pairs, and a flurry of activity ensued. The token’s price surged to an all-time high of $8.57 before returning to around $3.

How to use Uniswap

Uniswap’s trading interface can be accessed at https://app.uniswap.org/. To use it you need a wallet that allows you to access Web 3.0. On mobile devices, it’s possible to access the wallet using MetaMask, the Opera browser’s built-in crypto wallet, Trust Wallet, Coinbase Wallet, and others.

On desktop devices, it’s possible to connect using MetaMask, Coinbase Wallet and Trust Wallet’s wallet connection, Brave’s built-in crypto wallet, Opera’s built-in crypto wallet, Fortmatic and others.

The Uniswap platform has a few options on its top menu:

The last section, “Charts,” will take you to a new page on Uniswap where you can monitor the liquidity of each cryptocurrency and trading pair in the trading platform, as well as the trading volume it has seen in the last 24-hour period. Clicking on a trading pair will show you information on how much has been collected in trading fees in the last 24 hours, charts on liquidity, volume, and price movements, and a transaction history.

For more detailed charts on Uniswap’s trading pairs, you can also visit Uniswap.vision. There you can find charts for most of Uniswap’s top pools integrated with TradingView, making it easier to use indicators and charting patterns.

If you have already connected and interacted with the Uniswap protocol before, then you just need to connect with the wallet you used at the time, and click on “Claim your UNI tokens.” You will need to confirm a transaction in your wallet to receive your 400 UNI tokens.

Risks associated with Uniswap

Uniswap is an innovative decentralized exchange built on top of the Ethereum network. It allows anyone to trade ETH and ERC-20 tokens without having to go through know-your-customer and anti-money laundering (AML) checks, which could put it on regulators’ radars.

Moreover, as the protocol charges no listing fees and has no formal screening process, anyone can create liquidity pools with their own tokens. This means less-than-stellar projects’ tokens are bound to be found on the platform, and in some cases scammers create tokens with tickers meant to trick users into believing they are trading popular cryptoassets like DAI and ETH.

Its decentralized nature means every trade incurs a transaction fee on the Ethereum blockchain, which has been clogged numerous times in the past in periods where ETH users were highly active. Ethereum 2.0 is a scalability solution that could fix the problem, however.

Conclusion

As Uniswap uses an automated market maker (AMM) model and rewards liquidity providers, it’s unlikely it will run out of steam. As any decentralized finance project it may be risky to use Uniswap or invest in the UNI token as this is nascent technology.

While the platform has its limitations and setbacks, it has a large number of users, something other DEXs cannot easily replace. With the launch of Ethereum 2.0 it could become a lot cheaper to use Uniswap, which could greatly benefit the platform.

Related guides

DYP.Finance: A Unique Yield Farming Platform DeFi Yield Protocol Liquidity Providers Earn $25,000 in ETH per Day Staking DYP 12 Ethereum DApps You Can Use Right Now What Are dApps? What is Decentralized Finance (DeFi)? A Complete Guide Beyond the Token Economy – How Convergence Brings Private Investment Into DeFi DeFi Has Fueled the Ether Boom — Could a Crash Be Coming?

Popular guides

Get Instant Crypto Loans in 3 Easy Steps What is a Bitcoin ETF? A Basic Overview of the Best Privacy Coins What Is the Binance Coin (BNB)? How to buy on Amazon with Bitcoin What is El Petro and What Does it Mean for the World What is TrueUSD (TUSD) and how to use it