Tuesday, July 8, 2025
  • About us
  • Economic Calendar
  • Price Predictions
  • Coins Alerts
  • Crypto Portfolio Tracker
  • Exclusively from Our Partners
Cryptheory
  • Cryptocurrency List
  • Cryptocurrency
    • Cryptocurrency Exchanges
      • Top exchanges for trading Bitcoin derivatives
      • How to buy bitcoin without KYC
      • How to Trade Bitcoin – best platforms
      • Best platforms to buy Bitcoin by debit or credit card
      • Platforms for Grid Trading
      • BYDFi: Review and Guide
      • BingX: Review and Guide
      • Kraken: Review and Guide
      • Bybit: Review and Guide
      • Bitpanda: Review and Guide
      • Phemex: Review and Guide
      • Huobi: Quick Guide
      • Binance: Review and Guide
        • Binance Futures Guide
    • Bitcoin
    • Tether
    • XRP
    • Dogecoin
    • Avalanche
    • Stellar
    • The Open Network
  • crypto news
  • Crypto Exchanges Info
  • Analysis
  • Attractions
No Result
View All Result
  • Cryptocurrency List
  • Cryptocurrency
    • Cryptocurrency Exchanges
      • Top exchanges for trading Bitcoin derivatives
      • How to buy bitcoin without KYC
      • How to Trade Bitcoin – best platforms
      • Best platforms to buy Bitcoin by debit or credit card
      • Platforms for Grid Trading
      • BYDFi: Review and Guide
      • BingX: Review and Guide
      • Kraken: Review and Guide
      • Bybit: Review and Guide
      • Bitpanda: Review and Guide
      • Phemex: Review and Guide
      • Huobi: Quick Guide
      • Binance: Review and Guide
        • Binance Futures Guide
    • Bitcoin
    • Tether
    • XRP
    • Dogecoin
    • Avalanche
    • Stellar
    • The Open Network
  • crypto news
  • Crypto Exchanges Info
  • Analysis
  • Attractions
No Result
View All Result
Cryptheory
No Result
View All Result

What is Uniswap In Simple Words?

by Margharet Tess
August 17, 2020
in DeFi, Guides
Reading Time: 8 mins read

Table of Contents

  • What is Uniswap?
  • How Does Uniswap’s Automated Liquidity Provisioning Work?
    • The “X * Y = K” Equation Explained
  • Understanding the Difference between Uniswap V1 and V2
    • Uniswap V1 Swaps
    • Uniswap V2 Swaps
  • Providing Liquidity on Uniswap: How to Profit?
  • Uniswap Flash Swaps: Useful or Dangerous?
  • In Conclusion
    • Pros
    • Cons

Uniswap guide to explain what is it and how it works. This protocol allows buyers and sellers to swap ERC20 tokens without the use of an exchange or order book.

What is Uniswap In Simple Words?
image source: uniswap

You may have heard of Uniswap has been a frequently debated topic among the DeFi space. Originally, Hayden Adams created the Uniswap protocol as he was inspired by Vitalik Buterin’s post about the market maker equation X * Y = K.

Hayden took a practical approach to the equation and created Uniswap, a protocol for automated liquidity provisioning.

This guide will help you understand the following concepts:

  • What is Uniswap?
  • How does automated liquidity provisioning work using X * Y = K equation?
  • What’s the difference between Uniswap V1 and V2?
  • How can you profit from liquidity provisioning on Uniswap?
  • What are the dangers of flash swaps (flash loans)?

Let’s dive right into the details!

What is Uniswap?

Let’s start with a basic introduction that answers the question, what is Uniswap?

Uniswap is a protocol that allows buyers and sellers to swap ERC20 tokens without the use of an exchange or order book. Use an algorithmic equation that automatically determines the swap rate based on the balances of both tokens and the actual demand for this swapping pair.

Now you may wonder why Uniswap is so revolutionary? Traditional markets require buyers and sellers to provide liquidity, which is not always easy to deliver. Even decentralized exchanges (DEX) suffer this problem as they heavily rely on liquidity for its success.

Uniswap tackles this problem in a different way through automated liquidity provisioning. It allows a DEX to swap ERC20 tokens without having to rely on the mechanic of buyers and sellers creating liquidity.

But how does automated liquidity provisioning work?

How Does Uniswap’s Automated Liquidity Provisioning Work?

The “X * Y = K” Equation Explained

In the “X * Y = K” equation, the X and Y represent respectively the number of available ETH and ERC20 tokens. Whereas K represents a constant that can be set by the creators of the exchange contract on Uniswap. K might look like some random constant, however, it matters most. When you multiply X by Y, the value must always be equal to the value of K.

What is Uniswap In Simple Words?

Now, let’s take a look at the above graph. The graph represents the constant K, which is a function. The Y-axis represents token B (ETH) while the X-axis represents token A (ERC20) token.

The first red dot (old position) represents the current price for swapping this ETH-ERC20 pair based on the current balance of ETH tokens against ERC20 tokens.

However, Alice decides to swap her ERC20 tokens for ETH.

Therefore, the balance of ETH tokens decreases, and the balance of ERC20 tokens increases. This means the red dot moves to the new position as we have more ERC20 tokens and fewer ETH tokens in the liquidity pool. In other words, it’s a very simple pricing algorithm where the price rate moves along a graph.

Next, it’s important to know that since March 23rd, 2020, Uniswap V2 was introduced.

V2 comes with a lot of new functionality and updates to existing features. Let’s learn about the differences.

Understanding the Difference between Uniswap V1 and V2

Many new features have been introduced with Uniswap V2, such as price oracles, flash swaps, and a swapping router. This last element is most important to understand how to get a better sense of the way Uniswap routes tokens between liquidity pools.

Uniswap V1 Swaps

From the Uniswap V2 blog post, we can read how Uniswap V1 works:

“In Uniswap V1, all liquidity pools are between ETH and a single ERC20 token. Having a constant numeraire provides a nice UX advantage — users can swap any ERC20 for any other ERC20 by routing through ETH.

Since ETH is the most liquid Ethereum-based asset and does not introduce any new platform risk, it was the best choice for Uniswap V1.”

What this means is that Uniswap V1 always executes two trades. A first trade to swap your ERC20 token for ETH, and a second trade to convert your ETH back to the wished ERC20 token. In other words, the end-user pays fees twice.

What is Uniswap In Simple Words?

This posed a couple of limitations on the use:

  1. Higher fees
  2. Uniswap strongly tied to the use of ETH
  3. Not possible to swap ERC20 tokens directly with other ERC20 tokens.

For the above reasons, Uniswap V2 has been created.

Uniswap V2 Swaps

V2 provides end-users with three different options to swap their tokens, using the “Router Contract.”

The Router Contract is nothing more than a contract that contains routing logic to send your tokens to the right swapping contract. In other words, the router contract is aware of every swapping contract that implements the Uniswap V2 protocol.

Here are the three swapping possibilities:

  1. A direct swap between two ERC20 pairs. For example, two stablecoins such as DAI/USDC may prove very useful for traders.
  2. Traditional swap through ETH, where you pay fees twice.
  3. Custom path swaps where you can build a more complex swapping path such as DAI/ETH, ETH/BAT, BAT/USDT, and USDT/USDC to convert your DAI to USDC. Often, this provides traders with interesting arbitrage opportunities.
uniswap3-min

Next, let’s learn why users provide liquidity to Uniswap’s liquidity pools and how you can profit from this opportunity.

Providing Liquidity on Uniswap: How to Profit?

How do users profit form liquidity provisioning on Uniswap? The answer is simple – trading fees. You can participate in those liquidity pools by providing an equal amount of ETH and ERC20 tokens to a Uniswap exchange contract.

In return, whenever someone makes a swap, the swapper has to pay a 0.3% fee per swap. This fee is subsequently added to the liquidity pool. Next, liquidity providers receive part of the transaction fee proportional to their weight in the liquidity pool.

Uniswap Flash Swaps: Useful or Dangerous?

Lastly, let’s discuss the new Flash Swaps functionality provided by Uniswap V2. From the same blog post, Uniswap explains Flash Swaps as:

“Uniswap V2 flash swaps allow you to withdraw as much as you want of any ERC20 token on Uniswap at no upfront cost and do anything you want with them (execute arbitrary code), provided that by the end of the transaction execution, you either:

Pay for all ERC20 tokens withdrawn, pay for a percentage of ERC20 tokens and return the rest, or return all ERC20 tokens withdrawn.”

This all sounds super exciting as it opens up a lot of new possibilities. Flash swaps, also referred to as flash loans, have been coined by Marble Protocol in 2018 by Max Wolff. Back then, he coined his invention a “smart contract bank,” that allows for zero-risk loans.

However, lately, we’ve seen many flash loan attacks happening across different protocols such as bZx where an attacker runs off with thousands worth of tokens, which he got for free through flash loans.

A flash loan attacker takes advantage of imbalances between different marketplaces and then pays back the initial loan while they keep the surplus they gained by trading those market imbalances.

Some industry leaders argue this is a serious risk for the DeFi space; however, others attribute the occurrence of flash loan attacks to the weak security of the bZx protocol.

Either way, Uniswap has decided to implement its so-called flash swaps. This allows anyone to withdraw as many ERC20 tokens from a liquidity pool as possible. But, the user has to return the tokens within the same block. Or, return their ETH equivalent to the ETH liquidity pool.

In Conclusion

It’s undeniable that automated liquidity provisioning has given a big boost to the DeFi space, creating many new and more sophisticated trading opportunities. However, time will tell if swaps were the right thing for the crypto space. Here’s a short recap list with the pros and cons of using Uniswap.

Pros

  • Decentralized
  • Any new token can directly access liquidity through adding their token for an exchange to the Uniswap V2 router contract.
  • Low-cost trades compared to a DEX or centralized exchange.
  • Liquidity providers can benefit from contributing liquidity to liquidity pools.

Cons

  • Possibility for flash swap attacks
  • It still relies on arbitrage trading to remove market imbalances. However, any natural market sees arbitrage trading occur to remove imbalances quickly.
  • Fake token listings.
  • Currently, high gas prices because of the high volume of trades make trading using Uniswap still a more expensive activity.
  • Author
  • Recent Posts
Margharet Tess
Margharet Tess
Editor, Developer at Cryptheory Labs
I have been active in the cryptocurrency world for over 6 years, during which I have written countless articles about this sector. What fascinates me most about cryptocurrencies is their technological aspect and the problems they aim to solve. In the past three years, I have ventured into app development and am currently working on a larger project called P2E Buzzer. Stay tuned for the surprise. 🙂 My previous experiences: Business2Community.com, TradingPlatforms.com
Margharet Tess
Latest posts by Margharet Tess (see all)
  • Bitcoin’s Ready to Blow… Upwards? - July 3, 2025
  • Ethereum’s $5K Dream: Breakout or Breakdown? - July 2, 2025
  • Ethereum’s Not Dead Yet: On-Chain Data Screams Rebound & Trading Tips - June 27, 2025
Tags: DeFiUniswap
Previous Post

Crypto News of the day 17.8. | In DeFi is now locked $ 6 billion, with $ 1 billion a week added and more

Next Post

Donald Trump Will Look at Pardoning Edward Snowden

Related Posts

What is Altcoin: Unveiling the World of Alternative Cryptocurrencies in 2025
Guides

What is Altcoin: Unveiling the World of Alternative Cryptocurrencies in 2025

June 18, 2025
How to Trade Meme Coins in 2025: A No-BS Guide for Degens and Smart Investors Alike
Guides

How to Trade Meme Coins in 2025: A No-BS Guide for Degens and Smart Investors Alike

June 9, 2025
Top P2E Erotic Games Where You Don’t Just Play… You Earn (and Maybe Break a Sweat Too)
Gaming

Top P2E Erotic Games Where You Don’t Just Play… You Earn (and Maybe Break a Sweat Too)

May 12, 2025
How to Start Trading Crypto Without Screwing Yourself Over: A Beginner’s Guide
Guides

How to Start Trading Crypto Without Screwing Yourself Over: A Beginner’s Guide

May 1, 2025
Where Can You Pay With Crypto? Best Vacation Destinations for 2025
Guides

Where Can You Pay With Crypto? Best Vacation Destinations for 2025

April 28, 2025
How to Store and Use Crypto During the Apocalypse: The Ultimate Survival Guide for the Digital Age
Guides

How to Store and Use Crypto During the Apocalypse: The Ultimate Survival Guide for the Digital Age

April 22, 2025
What is Ethereum Virtual Machine (EVM): Heart of Ethereum
Attractions

What is Ethereum Virtual Machine (EVM): Heart of Ethereum

April 15, 2025
What Is the Chaikin Money Flow (CMF) Indicator and Why Should You Watch It
Guides

What Is the Chaikin Money Flow (CMF) Indicator and Why Should You Watch It

April 7, 2025
How to Spot the First Signs of a Recession: A Guide for Every Investor
Attractions

How to Spot the First Signs of a Recession: A Guide for Every Investor

April 4, 2025
Please login to join discussion
Track all markets on TradingView
Score: 0
Game Over

Popular

The Centralized Trap: Is Web3 Quietly Turning Back Into Web2?

The Centralized Trap: Is Web3 Quietly Turning Back Into Web2?

June 24, 2025
Ethereum Price Analysis & Trading Tips: Triangle Squeeze and RSI Shenanigans – WTF Happens Next?

Ethereum Price Analysis & Trading Tips: Triangle Squeeze and RSI Shenanigans – WTF Happens Next?

June 18, 2025
2025 Déjà Vu? Why This Bitcoin Dump Might Just Be Your 2020 Moment All Over Again

2025 Déjà Vu? Why This Bitcoin Dump Might Just Be Your 2020 Moment All Over Again

June 23, 2025
BTC Analysis & Trading Tips: Bitcoin’s Banging on Resistance – Is It Time to Moon or Nuke?

BTC Analysis & Trading Tips: Bitcoin’s Banging on Resistance – Is It Time to Moon or Nuke?

June 25, 2025
Stablecoin Scrutiny: From Tether’s Launch to MiCA’s Dawn, Regulators Are Watching

Stablecoin Scrutiny: From Tether’s Launch to MiCA’s Dawn, Regulators Are Watching

June 12, 2025
Staking: Is it Just a Fancy Ponzi Scheme? Let's Get Real.

Staking: Is it Just a Fancy Ponzi Scheme? Let’s Get Real.

June 11, 2025
Bitcoin Price Analysis & Trading Tips – June 9, 2025

Bitcoin Price Analysis & Trading Tips – June 9, 2025

June 9, 2025
10 Brilliant Reasons I’m Still Holding My 2018 Altcoin Bag (And Totally Not Crying Inside)

10 Brilliant Reasons I’m Still Holding My 2018 Altcoin Bag (And Totally Not Crying Inside)

July 1, 2025
XRP Ain’t Dead: On-Chain Whispers and Trading Shenanigans You Can’t Ignore & Trading Tips

XRP Ain’t Dead: On-Chain Whispers and Trading Shenanigans You Can’t Ignore & Trading Tips

June 26, 2025
Bitcoin at $104K: Spoofers, Liquidations & Degens – Welcome to the Danger Zone

Bitcoin at $104K: Spoofers, Liquidations & Degens – Welcome to the Danger Zone

June 20, 2025

💥 What's Your Crypto Trading Spirit Animal?

1. Your reaction to a red 15% candle?

2. How do you read charts?

3. What’s your biggest trading sin?

4. Favorite indicator?

5. How do you set your stop-loss?

6. What's your ideal trading environment?

7. How do you handle losing trades?

8. What’s your position sizing like?

9. What's your backup plan if you get liquidated?

10. Your crypto endgame?

Crypto News

Bitcoin

Ethereum

Altcoins

Cryptocurrency

Platforms for Copy Trading

Platforms for Grid Trading

Glossary of trading and crypto terms

Crypto Portfolio Tracker

 

Cryptheory Labs Projects

Guest Post for Free

On our website, you can share your opinions and insights. This feature is reserved for non-promotional articles. We are already working on a system for donations and rewarding every author.

This website is here for those of you who want to be at the forefront of innovation and new technologies like Bitcoin. But first, we need to tackle the challenges and survive in the unforgiving world of crypto assets. THIS IS CRYPTHEORY!

Follow Us

  • Terms Of Use
  • Privacy Policy
  • About us
  • Contact us

© 2024 Cryptheory - F**k the forex, we want gains!

Shiba Inu loading
No Result
View All Result
  • Cryptocurrency List
  • Cryptocurrency
    • Cryptocurrency Exchanges
      • Top exchanges for trading Bitcoin derivatives
      • How to buy bitcoin without KYC
      • How to Trade Bitcoin – best platforms
      • Best platforms to buy Bitcoin by debit or credit card
      • Platforms for Grid Trading
      • BYDFi: Review and Guide
      • BingX: Review and Guide
      • Kraken: Review and Guide
      • Bybit: Review and Guide
      • Bitpanda: Review and Guide
      • Phemex: Review and Guide
      • Huobi: Quick Guide
      • Binance: Review and Guide
    • Bitcoin
    • Tether
    • XRP
    • Dogecoin
    • Avalanche
    • Stellar
    • The Open Network
  • crypto news
  • Crypto Exchanges Info
  • Analysis
  • Attractions

© 2024 Cryptheory - F**k the forex, we want gains!

This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy and Cookie Policy.