TL;DR
Uniswap is a set of computer programs running on the Ethereum blockchain, enabling decentralized token swaps. This platform works with the help of unicorns (as seen from its logo).
Traders can exchange Ethereum tokens on Uniswap without having to entrust funds to any party. Meanwhile, anyone can lend crypto to special storage places called liquidity pools. In return for providing money into this pool, you earn income from fees.
How does this magical unicorn convert one token to another? What do you need to use Uniswap? Please continue reading.
Introduction
Many centralized exchanges have been the backbone of the cryptocurrency market for years. They offer fast settlement times, high trading volumes, and continuously improving liquidity. However, there is a parallel world created in the form of trustless protocols. Decentralized exchanges (DEX) do not require a middleman or custodian to facilitate trading.
The inherent limitations of blockchain technology pose a challenge in building DEXs that are able to compete with their centralized counterparts. Most DEXs can improve performance and user experience.
Many developers are constantly thinking of new ways to build DEXs. One of the pioneers is Uniswap. How Uniswap works may be a little more difficult to understand than more traditional DEXs. However, we will soon see that this model offers some interesting benefits.
As a result of this innovation, Uniswap has become one of the most successful projects that are part of the Decentralized Finance (DeFi) movement.
Let's take a look at what Uniswap is, how it works, and how you can swap tokens on the protocol with just an Ethereum wallet.
What is Uniswap?
Uniswap is a decentralized exchange protocol built on Ethereum. More precisely, Uniswap is an automated liquidity protocol. There is no order book or centralized party required to execute trades. Uniswap allows users to trade without intermediaries with a high degree of decentralization and censorship resistance.
Uniswap is open-source software. You can check it out for yourself on Uniswap GitHub.
However, how can trading occur without an order book? Uniswap functions with a model that requires liquidity providers to create liquidity pools. This system provides a decentralized pricing mechanism that essentially streamlines the depth of the order book. Let's see how it works in more detail. For now, what needs to be noted is that users can swap ERC-20 tokens seamlessly without requiring an order book.
Because the Uniswap protocol is decentralized, there is no listing process. In essence, ERC-20 tokens can be launched as long as there is a liquidity pool available to traders. As a result, Uniswap does not charge listing fees. In another sense, the Uniswap protocol acts as a kind of public good.
The Uniswap protocol was created by Hayden Adams in 2018. However, the underlying technology that inspired its implementation was first introduced by Ethereum co-founder Vitalik Buterin.
How does Uniswap work?
Because it has no order book, Uniswap abandons the traditional architecture of digital exchanges. This protocol works with a design called Constant Product Market Maker, which is a variant of the model known as Automated Market Maker (AMM).
Automated market makers are smart contracts that have liquidity reserves (or liquidity pools) that traders can use as trading partners. These reserves are funded by liquidity providers. Anyone can become a liquidity provider who deposits the equivalent value of two tokens in the pool. In exchange, traders pay a fee to the pool which is then distributed to liquidity providers according to their share of the pool. Let's explore how it works in more detail.
Liquidity providers create a market by depositing the equivalent value of two tokens. This deposit can be ETH and an ERC-20 token or two ERC-20 tokens. These pools generally consist of stablecoins, such as DAI, USDC, or USDT, but this is not a requirement. In exchange, liquidity providers get “liquidity tokens” that represent their share of the entire liquidity pool. These liquidity tokens can be redeemed for the share they represent in the pool.
Let's consider the ETH/USDT liquidity pool. We call the ETH portion of the pool x and the USDT portion y. Uniswap takes these two amounts and multiplies them to calculate the total liquidity in the pool. Let's call this value k. The core idea of Uniswap is that k should remain constant, which means the total liquidity in the pool is constant. So, the formula for total liquidity in the pool is:
x * y = kSo, what happens if someone wants to make a trade?
For example, Alice buys 1 ETH worth 300 USDT using the ETH/USDT liquidity pool. By doing this, he increased the USDT portion of the pool and reduced the ETH portion of the pool. Effectively, this means that the price of ETH is increasing. Why? There is less ETH in the pool after the transaction and we know that the total liquidity (k) must remain constant. This mechanism is what determines pricing. Ultimately, the price paid for ETH is based on the magnitude of the shift in the ratio between x and y that a trade produces.
It should be noted that this model does not apply to multiples linearly. In fact, the larger the order, the greater the shift between x and y that occurs. This means that larger orders become exponentially more expensive than smaller orders, resulting in greater amounts of slippage. This also means that the larger the liquidity pool, the easier it is to process larger orders. Why? In that case, the shift between x and y becomes smaller.
Uniswap v3
The technology behind Uniswap has gone through several iterations so far. If you have used Uniswap, you are most likely using Uniswap v2. However, there are always new improvements being implemented. Let's take a look at some of the most impactful updates brought by Uniswap v3.
Capital efficiency
One of the most significant changes coming with Uniswap v3 has to do with capital efficiency. Most AMMs are very capital inefficient. Most of the funds accumulated in it are not used at any given time. This is due to the inherent characteristics of the x*y=k model that we discussed at the beginning. Simply put, the greater the liquidity in the pool, the larger orders the system can support over a larger price range.
However, the liquidity providers (LPs) in these pools essentially provide liquidity with a price curve (range) between 0 and infinity. All capital accumulated in it will be reserved for scenarios when one of the assets in the pool is 5x-s, 10x-s, 100x-s.
If that happens, the idle assets ensure there is still liquidity remaining in that part of the price curve. This means only a small portion of the liquidity in the pool is idle where most of the trading occurs.
For example, Uniswap currently has around 5 billion dollars of liquidity locked while the volume processed per day is only around 1 billion. You might think that this is not the optimal way and it seems that the Uniswap team agrees. Uniswap v3 addresses this issue.
Liquidity providers can now set custom price ranges they desire to provide liquidity. This should result in liquidity being more concentrated in the price ranges with the most trading activity.
It could be said that Uniswap v3 is a rudimentary way to create an on-chain order book on Ethereum where market makers can decide to provide liquidity within a price range they set. It should be noted that this change benefits professional market makers more than retail participants. The advantage of AMM is that anyone can provide liquidity and put their funds to work.
However, with this added layer of complexity, “lazy” LPs will earn far less from trading fees than professional players who continuously optimize their strategies. On the other hand, it is quite possible for aggregators like yearn.finance to offer solutions for retail LPs to remain competitive in this environment.
Uniswap LP Token as NFT
We now understand that each Uniswap LP position is unique, as each depositor can set their own price range. This means that the Uniswap LP position is no longer fungible. As a result, each LP position is now represented by a non-fungible token (NFT).
One of the advantages of representing Uniswap LP positions with fungible tokens is their ability to be used in other parts of DeFi. Uniswap v2 LP tokens can be deposited into Aave or MakerDAO as collateral. This is no longer possible with v3 because each position is unique. However, this fragmented composability can be addressed with new types of derivative products.
Uniswap on layer 2
Transaction fees on Ethereum have skyrocketed in the past year. This makes Uniswap economically unviable for most small users.
Uniswap v3 will also run on a layer 2 scaling solution called Optimistic rollup. This is a great way to scale smart contracts while still getting the security of the Ethereum network. This implementation should result in significantly increased transaction yields and significantly lower fees for users.
What is impermanent loss?
As we already discussed, liquidity providers earn income from fees for providing liquidity to traders who can swap between tokens. Is there anything else that liquidity providers should be aware of? Yes. There is an effect called impermanent loss.
For example, Alice deposits 1 ETH and 100 USDT into a Uniswap pool. Because the token pair must have equal value, this means the price of ETH is 100 USDT. At the same time, there is a total of 10 ETH and 1,000 USDT in the pool – the rest is funded by other liquidity providers such as Alice. This means that Alice has a share of 10% of the pool. In this case, our total liquidity (k) is 10,000.
What happens if the price of ETH increases to 400 USDT? Remember, the total liquidity in the pool must remain constant. If the current price of ETH is 400 USDT, this means that the ratio between the amount of ETH and the amount of USDT in the pool has changed. Apparently, there are 5 ETH and 2,000 USDT in the pool at the moment. Why? Arbitrage traders will add USDT to the pool and take ETH from it until the ratio reflects an accurate price. This is why it is important to understand that k is constant.
So, Alice decides to withdraw her funds and get 10% of the pool according to her share. As a result, he got 0.5 ETH and 200 USDT, for a total of 400 USDT. Looks like Alice made a big profit. But wait, what happens if he doesn't put funds into the pool? He will have 1 ETH and 100 USDT, for a total of 500 USDT.
It turns out, Alice would benefit more from HODLing than depositing into the Uniswap pool. In such cases, impermanent loss is essentially the opportunity cost of pooling tokens valued at a price. This means that by depositing funds into Uniswap in the hope of earning income from fees, Alice may miss out on other opportunities.
Note that this effect works without considering the direction of price change since the time of deposit. What does it mean? If the price of ETH decreases compared to the time of deposit, the losses may also become greater. If you want a more technical explanation of this, read Pintail's article covering it.
However, why is the loss not permanent? If the price of tokens entering the pool returns to the price when they were added to the pool, the effect will be mitigated. Additionally, because liquidity providers earn income from fees, losses can be offset over time. However, liquidity providers should be aware of this before adding funds to a pool.
How does Uniswap make money?
It is not like that. Uniswap is a decentralized protocol backed by Paradigm (a crypto hedging fund). All fees go to the liquidity providers and none of the founders get a share of the trading that will occur through the protocol.
Currently, transaction fees paid to liquidity providers are 0.3% per trade. By default, this money is immediately added to the liquidity pool, but the liquidity provider can redeem it at any time. These fees are distributed according to each pool section.
A portion of the fees may be dedicated to future development of Uniswap. The Uniswap team has used an improved version of the protocol, called Uniswap v2.
➟ Want to get started with cryptocurrency? Buy Bitcoin on Binance!
How to use Uniswap
Uniswap is an open-source protocol. This means that anyone can create their own front-end application for it. However, the most frequently used applications are https://app.uniswap.org or https://uniswap.exchange.
Enter the Uniswap interface.
Connect your wallet. You can use MetaMask, Trust Wallet, or any other supported Ethereum wallet.
Select the token you want to exchange.
Select the token you want to get.
Click Swap.
View transactions in a pop-up window.
Confirm the transaction request in your wallet.
Wait until the transaction is confirmed on the Ethereum blockchain. You can monitor the status at https://etherscan.io/.
Token Uniswap (UNI)
UNI is the native token of the Uniswap protocol that grants governance rights to its owner. This means that UNI owners can vote on changes to the protocol. We discussed at the beginning that protocols function like a kind of public good. The UNI token reinforces this idea.
1 billion UNI tokens have been minted initially. 60% of it is distributed to existing Uniswap community members, while 40% will be available to team members, investors, and advisors over four years.
Part of the distribution to the community occurs through liquidity mining. This means that UNI will be distributed to people who provide liquidity to the following Uniswap pools:
ETH/USDT
ETH/USDC
ETH/DAI
ETH/WBTC
However, who are the members of the Uniswap community? Any Ethereum address that has interacted with the Uniswap contract. Let's see how to claim UNI tokens.
How to claim Uniswap tokens (UNI)
If you already use Uniswap, you can likely claim 400 UNI tokens per address used with Uniswap. To claim a token:
Go to https://app.uniswap.org/.
Connect previously used wallet with Uniswap.
Click “Claim your UNI tokens”.

Confirm the transaction in the wallet (you can check the current gas price on Ethscan Gas Tracker).
Congratulations, you are now a UNI owner!
Want to trade your UNI tokens? Binance is the solution.
➟ Click here to trade UNI tokens on Binance!
How to buy UNI on Binance
To buy UNI, you need to swap fiat or crypto using the Binance exchange display. You cannot use a debit/credit card to purchase UNI directly. Below are possible pairs with a choice of BNB, BTC, BUSD, USDT, or EUR.

If you want to buy UNI using crypto, you can transfer the coins into a Spot Wallet or purchase them. BUSD is one of the recommended choices due to its price stability. You can buy BUSD using your card by going to the [Buy Crypto] page. Enter the amount you want to purchase then click [Continue] to fill in your card details.

Once you have your crypto, visit an exchange and select the UNI pair you want to trade. You can change the pair by clicking on the current market pair at the top left.

In the search bar, type your preferred pair. For example, we need UNI/BUSD.

You can now place an order to buy UNI. The fastest way is with a market order that provides the current spot price. You can also set a limit order or stop-limit order if you want to buy at a certain price or better.
To create a market order, navigate to the right side of the exchange display then click [Spot]. Make sure you select [Market] as the order type under the [Buy] tab, then type in the amount of BUSD you want to trade. Finally, click [Buy UNI] to place an order.

How to sell UNI on Binance
Selling UNI is a similar process to buying. First, make sure that UNI is in your Binance Spot Wallet. If you haven't deposited tokens yet, visit the [Fiat and Spot] page and search for UNI. Click [Deposit] for detailed instructions on how to transfer UNI. You can also read our How to Deposit on Binance guide for more help.

When successfully depositing UNI, open the exchange view and select the UNI pair you want to trade. Let's look at UNI/BTC.

Use the search bar to find the desired pair. In this case, click [UNI/BTC].

To sell UNI at the current market price, navigate to the right side of the screen. Click [Spot] then select [Market] as the order type under the [Sell] tab. Enter the number of UNI you want to sell then click [Sell UNI].

Closing
Uniswap is an innovative exchange protocol built on Ethereum. This protocol allows anyone with an Ethereum wallet to exchange tokens without involving any central party.
Despite its limitations, this technology has some interesting implications for the future of trustless token swaps. Once the Ethereum 2.0 scalability solution is released on the network, it is likely that Uniswap could benefit as well.
