Brief content
Uniswap is a set of computer programs that work on the Ethereum blockchain and allow for the decentralization of token swaps. It works with the help of "unicorns" (as evidenced by their logo).
Traders can exchange Ethereum tokens on Uniswap without trusting anyone with their funds. Meanwhile, anyone can lend their cryptocurrency to special reserves called liquidity pools. In exchange for providing money to these pools, they earn commissions.
How do these "magical unicorns" convert one token into another? What do you need to use Uniswap? Let's find out.
Introduction
Centralized exchanges have been the backbone of the cryptocurrency market for years. They offer fast settlement times, high trading volume, and constantly increasing liquidity. However, there is a parallel world that is being built in the form of trustless protocols. Decentralized exchanges (DEX) do not require intermediaries or custodians to facilitate trading.
Due to the inherent limitations of blockchain technology, it has been difficult to create DEXs that compete significantly with their centralized counterparts. Most DEXs can be improved both in terms of performance and user-friendliness.
Many developers have been thinking about new ways to create decentralized exchanges. One of the pioneers is Uniswap. How Uniswap works can be a bit more complicated to understand than a more traditional DEX. However, we will soon see that this model offers a number of attractive advantages.
As a result of this innovation, Uniswap has become one of the most successful projects in Decentralized Finance (DeFi).
Let's see what Uniswap is, how it works, and how you can exchange tokens simply by using an Ethereum wallet.
What is Uniswap?
Uniswap is a decentralized exchange protocol built on Ethereum. To be more precise, it is an automated liquidity protocol. There is no order book or any centralized party required to execute transactions. Uniswap allows users to trade without intermediaries, with a high degree of decentralization and resistance to censorship.
Uniswap is open source software. You can check it out for yourself on the Uniswap GitHub.
OK, but how to trade without an order book? Well, Uniswap works with a model where liquidity providers create pools of liquidity. This system provides a decentralized pricing mechanism that significantly smooths the depth of the order book. We will look at how it works in more detail. For now, just note that users can easily swap between ERC-20 tokens without the need for an order book.
Since the Uniswap protocol is decentralized, there is no listing process. Essentially, any ERC-20 token can be launched as long as a liquidity pool is available for traders. As a result, Uniswap also does not charge any listing fees. In a sense, the Uniswap protocol acts as a kind of public good.
The Uniswap protocol was created by Hayden Adams in 2018. But the technology behind its implementation was first described by Ethereum co-founder Vitalik Buterin.
How does Uniswap work?
Uniswap leaves behind the traditional digital exchange architecture as it does not have an order book. It works with a development called "Constant Product Market Maker", which is a variant of the model called "Automated Market Maker" (AMM).
Automated market makers are smart contracts that contain liquidity reserves (or pools of liquidity) against which traders can trade. These reserves are funded by liquidity providers. A liquidity provider can be anyone who contributes an equivalent value of two tokens to the pool. In turn, traders pay a fee to the pool, which is then distributed among the liquidity providers according to their shares in the pool. We will look at how it works in more detail.
Liquidity providers create a market by depositing the equivalent value of two tokens. It can be ETH and an ERC-20 token or two ERC-20 tokens. These pools usually consist of stablecoins such as DAI, USDC or USDT, but this is not a mandatory requirement. In return, liquidity providers receive "liquidity tokens" that represent their share of the overall liquidity pool. These liquidity tokens can be exchanged for the share they represent in the pool.
So let's take a look at the ETH/USDT liquidity pool. We'll refer to the ETH portion of the pool as x and the USDT portion as y. Uniswap takes these two values and multiplies them to calculate the total liquidity in the pool. Let's call it k. The basic idea behind Uniswap is that k must remain constant, which means that the total liquidity in the pool is constant. So, the formula for total liquidity in the pool is:
x * y = kSo what happens when anyone wants to make a deal?
Let's say Alice buys 1 ETH for 300 USDT using the ETH/USDT liquidity pool. It thereby increases the share of the pool in USDT and decreases the share of the pool in ETH. This effectively means that the price of ETH is rising. Why? After the transaction, there is less ETH in the pool and we know that the total liquidity (k) should remain the same. This mechanism determines the price. Ultimately, the price paid for that ETH depends on how much a given transaction changes the relationship between x and y.
It should be noted that this model does not scale linearly. In fact, the larger the order, the more the balance between x and y shifts. This means that larger orders become exponentially more expensive compared to smaller orders, resulting in larger and larger slippage amounts. This also means that the larger the liquidity pool, the easier it is to process large orders. Why? In this case, the shift between x and y is smaller.
Uniswap v3
The technology behind Uniswap has gone through several iterations. Chances are, if you've used Uniswap, you've used Uniswap v2. However, there are always new improvements in development. Let's take a look at the most important updates of Uniswap v3.
Capital efficiency
One of the most significant changes in Uniswap v3 concerns capital efficiency. You see, most AMMs are very capital inefficient - that is, most of the funds in them at any given time are not being used. This is due to the characteristics inherent in this x*y=k model discussed earlier. Simply put, the more liquidity in the pool, the larger orders the system can support in a larger price range.
However, liquidity providers (LPs) in these pools essentially provide liquidity for a price curve (range) from 0 to infinity. All this capital is reserved for the scenario where one of the assets in the pool is 5x-s, 10x-s, 100x-s.
If this happens, these idle assets ensure that there is still liquidity on that part of the price curve. This means that only a small part of the liquidity in the pool is where most of the trading takes place.
For example, Uniswap currently has about $5 billion in locked-up liquidity, while the daily volume is only about $1 billion. You might think that this is not a particularly elegant way of solving problems, and it seems that the Uniswap team agrees. Uniswap v3 solves this problem.
Liquidity providers can now set individual price ranges for which they want to provide liquidity. This should lead to more concentrated liquidity in the price range where most of the trading activity occurs.
In a sense, Uniswap v3 is a rudimentary way of creating an on-chain Ethereum order book, where market makers can decide to provide liquidity in their set price ranges. It is worth noting that this change favors professional market makers over retail participants. The advantage of AMM is that everyone can provide liquidity and make their funds work.
However, with this added level of complexity, "lazy" LPs will earn much less in trading commissions than professional players who can constantly optimize their strategy. Meanwhile, it's not hard to imagine aggregators like yearn.finance offering retail LPs a way to remain somewhat competitive in this environment.
Uniswap LP Tokens as NFTs
We now understand that each Uniswap LP position is unique, as each investor can set their own price range. This means that Uniswap LP positions are no longer interchangeable. As a result, each LP position is now represented by a non-fungible token (NFT).
One of the benefits of representing the Uniswap LP position as a replacement token was how it could be used in other parts of DeFi. Uniswap v2 LP tokens can be deposited with Aave or MakerDAO as collateral. This is no longer the case with v3 as each position is unique. However, this gap in layout capabilities can be addressed with new types of derivative products.
Uniswap on layer 2
Ethereum transaction fees have increased dramatically over the past year. This makes using Uniswap economically unprofitable for many small users.
Uniswap v3 will also be deployed in a layer 2 scaling solution called optimistic stacking. This is a great way to scale smart contracts while maintaining the security of the Ethereum network. This deployment should lead to a significant increase in transaction throughput and lower user fees.
What are non-permanent losses?
As we said, liquidity providers receive a fee for providing liquidity to traders who can swap tokens. What else should liquidity providers know? So. There is another effect called non-permanent damage.
Suppose Alice deposits 1 ETH and 100 USDT into the Uniswap pool. Since the token pair must have an equivalent value, this means that the price of ETH is 100 USDT. At the same time, there are only 10 ETH and 1,000 USDT in the pool - the rest are funded by other liquidity providers such as Alice. This means that Alice owns 10% of the pool share. Our total liquidity (k) in this case is 10,000.
What will happen if the price of ETH increases to 400 USDT? Remember that the total liquidity of the pool must remain unchanged. If the price of ETH is now 400 USDT, it means that the ratio between how much ETH and how much USDT is in the pool has changed. In fact, the pool currently has 5 ETH and 2,000 USDT. Why? Arbitrage traders will add USDT to the pool and remove ETH from it until the ratio reflects the exact price. This is why it is important to understand that k is a constant.
So, Alice decides to withdraw her funds and receives 10% of the pool according to her share. As a result, she receives 0.5 ETH and 200 USDT for a total of 400 USDT. Looks like she made a good profit. But wait, what would happen if she didn't put her funds into the pool? She would have 1 ETH and 100 USDT, for a total of 500 USDT.
In fact, Alice would be better off holding the assets rather than depositing into the Uniswap pool. In this case, non-permanent losses are essentially the opportunity cost of adding a token to a pool that is appreciating. This simply means that by depositing funds into Uniswap in the hope of receiving commissions, Alice may be missing out on other opportunities.
Please note that this effect works regardless of the direction in which the price changes from the moment of the deposit. What does it mean? If the price of ETH decreases compared to the term of the deposit, the losses can also increase. If you want a more detailed explanation of this issue, check out this article from Pintail.
But why are the losses inconsistent? If the price of the pooled tokens returns to the price when they were added to the pool, the effect is mitigated. Also, since liquidity providers receive a fee, losses can be offset over time. However, liquidity providers should be aware of this before adding funds to the pool.
How does Uniswap make money?
Any. Uniswap is a decentralized protocol backed by Paradigm (a cryptocurrency hedge fund). All fees go to the liquidity providers, and none of the founders get a share of the transactions that happen through the protocol.
Currently, the transaction fee paid to liquidity providers is 0.3% per transaction. By default, they are added to the liquidity pool, but liquidity providers can redeem them at any time. Fees are distributed according to each liquidity provider's share in the pool.
Part of the commissions can be directed to the development of Uniswap in the future. The Uniswap team has already deployed an improved version of the protocol called Uniswap v2.
➟ Want to start trading cryptocurrency? Buy Bitcoin on Binance!
How to use Uniswap
Uniswap is an open source protocol, which means that anyone can create their own front-end application for it. However, the most commonly used ones are https://app.uniswap.org or https://uniswap.exchange.
Go to the Uniswap interface.
Attach your wallet. You can use MetaMask, Trust Wallet or any other supported Ethereum wallet.
Select the token you want to exchange with.
Select the token you want to exchange for.
Click "Swap".
Preview the transaction in the pop-up window.
Confirm the transaction request in your wallet.
Wait for the transaction to be confirmed on the Ethereum blockchain. You can follow its status at https://etherscan.io/.
Uniswap (UNI) token
UNI is a native token of the Uniswap protocol, and it gives its holders management rights. This simply means that UNI owners can vote on changes to the protocol. Earlier we discussed how the protocol already operates as a kind of public good. The UNI token reinforces this idea.
1 billion UNI tokens were minted at creation. 60% of these will be shared among existing Uniswap community members, and 40% will be available to team members, investors and advisors over four years.
Part of the community distribution is through liquidity mining. This means that UNI will be distributed among those who provide liquidity to the following Uniswap pools:
ETH/USDT
ETH/USDC
ETH/DAI
ETH/WBTC
But who are the members of the Uniswap community? Any Ethereum address that interacted with Uniswap contracts. Let's see how to get UNI tokens.
How to get Uniswap (UNI) tokens
If you used Uniswap, you can get 400 UNI tokens per address. To claim your tokens, you must:
Go to https://app.uniswap.org/.
Connect the wallet you previously used with Uniswap.
Click "Get Your UNI Tokens".

Confirm the transaction in your wallet (you can check current gas prices in Ethscan Gas Tracker).
Congratulations, you are now a UNI holder!
Want to trade your UNI tokens? You can do this on Binance.
➟ Click here to trade UNI Tokens on Binance!
How to buy UNI on Binance
To buy UNI, you will need to exchange fiat or cryptocurrency using the Binance exchange interface. You cannot use a debit/credit card to purchase UNI directly. Below are the possible pairs giving you a choice of BNB, BTC, BUSD, USDT, or EUR.

If you want to buy UNI for cryptocurrency, you can either transfer the coins to your spot wallet or buy them. BUSD is one of the recommended options due to its price stability. You can buy BUSD with your card by going to the [Buy Cryptocurrency] page. Enter the amount you want to buy and click [Continue] to enter your card details.

After receiving the cryptocurrency, go to the exchange and select the UNI pair you want to trade. You can change your pair by clicking on the current market pair in the upper left corner.

Enter your chosen pair in the search bar. For our example, we will take UNI/BUSD.

You can now create a UNI buy order. The fastest way is to set a market order, which will specify the current spot price. You can also set a limit order or a stop-limit order if you want to buy at a certain price or better.
To create a market order, go to the right part of the exchange interface and click [Spot]. Make sure you select [Market] as your order type on the [Buy] tab and enter the amount of BUSD you want to exchange. Finally, click [Buy UNI] to place the order.

How to sell UNI on Binance
Selling your UNI is similar to buying. First, make sure your UNI is in your Binance spot wallet. If you haven't deposited your tokens, go to the [Fiat and Spot] page and search for UNI. Click [Deposit] for detailed instructions on how to transfer your UNIs. You can also read our How to Deposit on Binance guide for more information.

After you have successfully deposited your UNIs, open the exchange interface and select the UNI pair you want to trade. Let's take a look at UNI/BTC.

Use the search bar to find the right pair. In our case, press [UNI/BTC].

To sell your UNI at the current market price, go to the right side of the screen. Click [Spot] and select [Market] as the order type on the [Sell] tab. Enter the amount of UNI you want to sell and click [Sell UNI].

Final thoughts
Uniswap is an innovative exchange protocol built on Ethereum. This allows anyone with an Ethereum wallet to exchange tokens without the involvement of any central party.
While this technology has its limitations, it could have some interesting implications for the future of trustless token exchanges. When Ethereum 2.0 scalability solutions come online, Uniswap will likely be able to benefit from them as well.
