Uniswap is a set of computer programs that run on the Ethereum blockchain and allow the exchange of tokens to be decentralized. Uniswap works with the help of unicorns (as the logo suggests).
On Uniswap, traders can exchange Ethereum tokens without trusting anyone with their funds. At the same time, anyone can provide their cryptocurrency to liquidity pools, which play the role of special reserves. Traders receive a commission for providing their funds to pools.
How do magical unicorns convert one token to another? Why use Uniswap at all? Let's figure it out.
Introduction
Centralized exchanges have remained the backbone of the cryptocurrency market for many years. Their main advantages are fast settlements, large trading volumes and constant growth in liquidity. But there is also a “parallel world” built in the form of protocols that do not require trust. Decentralized exchanges (DEXs) do not require intermediaries or participants responsible for custody of funds to conduct trading.
Due to the limitations of blockchain technology, creating decentralized exchanges that can compete with their centralized counterparts is not an easy task. Most decentralized exchanges are not ideal, both in terms of performance and user experience.
Many developers are scratching their heads to invent new ways to create a decentralized exchange. Among them, Uniswap is one of the pioneers. The way Uniswap works is a little more complicated than a traditional DEX. However, we will soon see that this model has a number of significant advantages.
As a result of its innovation, Uniswap has become one of the most successful projects in the field of decentralized finance (DeFi).
So, let's learn more about what the Uniswap protocol is, how it works, and how you can exchange tokens using an Ethereum wallet.
What is Uniswap?
Uniswap is a decentralized exchange protocol built on top of Ethereum, and more precisely, an automated liquidity protocol. There is no order book or any centralized party required to execute trades here. Uniswap allows users to trade without intermediaries while maintaining a high degree of decentralization and censorship resistance.
Uniswap is open source software. You can see for yourself on Uniswap GitHub.
Okay, but how can you trade without an order book? Uniswap operates on a model where liquidity providers create liquidity pools. This system provides a decentralized pricing mechanism that substantially smoothes out the depth of the order book. We'll cover this in more detail later, but for now let's just remember that users can easily exchange ERC-20 tokens without an order book.
Since the Uniswap protocol is decentralized, there is no listing. Essentially, if a pool of liquidity is available to traders, any ERC-20 token can be issued. As a result, there are simply no listing fees on Uniswap. In a sense, the Uniswap protocol exists as a “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 does not have an order book, which means a traditional digital exchange architecture is not possible. It uses a model called Constant Product Market Maker, which is a variant of the Automated Market Maker (AMM) model.
AMMs are smart contracts with liquidity reserves (or liquidity pools) that traders can trade. These reserves are financed by liquidity providers. A liquidity provider can be anyone who contributes the equivalent value of two tokens to the pool. Traders in turn pay a commission to the pool, which is then distributed among liquidity providers according to their share of the pool. Let's take a closer look at this.
Liquidity providers create a market by making a contribution equivalent to the value of two tokens. This could be ETH, an ERC-20 token, or two ERC-20 tokens. Pools typically consist of stablecoins such as DAI, USDC or USDT, but this is not a requirement. In return, liquidity providers receive “liquidity tokens,” which represent their share of the overall liquidity pool. Liquidity tokens can be exchanged for their share of the pool.
Let's consider the ETH/USDT liquidity pool. Let's call part of the ETH pool x, and part of the USDT pool y. Uniswap takes these two values and multiplies them to calculate the total liquidity in the pool, let's call it k. The main idea of Uniswap is that the value of k should remain constant. This means that the total liquidity in the pool will be constant. Thus, we get the following formula for the total liquidity in the pool:
x * y = kBut what happens when someone wants to make a trade?
Let's say Masha buys 1 ETH for 300 USDT using the ETH/USDT liquidity pool. Thus, it increases the share of the pool in USDT and reduces the share of the pool in ETH, which means the price of ETH increases. Why? After the transaction is completed, there is less ETH left in the pool and we know that the total liquidity (k) should remain constant. This mechanism determines the price. Ultimately, the price paid for that ETH depends on how much a given trade changes the relationship between x and y.
It should be noted that such a model does not scale linearly. The larger the order, the more the balance shifts between x and y. Thus, large orders become exponentially more expensive compared to small orders, resulting in more slippage. In turn, increasing the liquidity pool makes it easier to process large orders, as this reduces the difference between x and y.
Uniswap v3
The technology behind Uniswap has gone through several iterations. Chances are, if you used Uniswap, it was Uniswap v2. But technology is improving and does not stand still. Let's look at the most important innovations of Uniswap v3.
Capital efficiency
One of the most significant changes to Uniswap v3 concerns capital efficiency. Most AMMs are extremely capital inefficient: most of the funds they currently hold are unused. This is due to the features of the x*y=k model, which we discussed above. In simple words: 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 provide liquidity for a price curve (range) from 0 to infinity. All of this capital is reserved for a scenario where one of the assets in the pool grows 5x, 10x, 100x.
If this happens, the idle assets ensure that there is still liquidity left in that part of the curve. This means that only a small portion of the liquidity in the pool resides where most of the trading occurs.
For example, Uniswap currently has about $5 billion in locked liquidity, while only $1 billion of that is in use per day. Do you agree that it was possible to come up with something more perfect? It looks like the Uniswap team also thought about this and solved the problem with Uniswap v3.
Liquidity providers can now set custom price ranges for which they want to provide liquidity. This should increase the concentration of liquidity in the price range in which most trades occur.
In a sense, Uniswap v3 is a rudimentary way to create an on-chain order book on Ethereum, where market makers can make decisions to provide liquidity at price ranges they set. It should be noted that this innovation primarily benefits professional market makers, and not retail participants. The key benefit of AMM is that anyone can provide liquidity and put their funds to work.
However, due to this complication, lazy liquidity providers will earn much less in trading commissions than professional players who are constantly improving their strategy. It is not difficult to predict that some aggregators, such as yearn.finance, will offer retail liquidity providers the opportunity to remain at least somewhat competitive in this environment.
LP positions on Uniswap as NFT tokens
We now know that all LP positions on Uniswap are unique as each can set their own price range. This means that LP positions on Uniswap are not fungible. As a result, each LP position is represented by a non-fungible token (NFT).
One of the benefits of introducing the LP position on Uniswap as a fungible token would be the ability to use it in other parts of DeFi. LP tokens in Uniswap v2 can be deposited into Aave or MakerDAO as collateral. In Uniswap v3, this can no longer be done, since each position is unique. However, this gap in modularity may be compensated by new types of derivatives.
Uniswap at level 2
Ethereum transaction fees have risen sharply over the past year. This makes using Uniswap uneconomical for many users with small funds.
Uniswap v3 will also be deployed in a layer 2 scaling solution called Optimistic rollup. This is a reliable way to scale smart contracts on the secure Ethereum network. This deployment should result in significantly increased transaction throughput and much lower fees for users.
What are impermanent losses?
As we have already said, liquidity providers receive a commission for providing liquidity to traders who are able to exchange tokens. Is there anything else liquidity providers should know? Yes. For example, about an effect called impermanent losses.
Let's say Masha contributes 1 ETH and 100 USDT to the Uniswap pool. Since the 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 1000 USDT in the pool - the rest are funded by other liquidity providers, such as Masha. This means that Masha owns 10% of the pool. Total liquidity (k) in this case is 10,000.
What happens if the ETH price increases to 400 USDT? Remember: the overall liquidity of the pool must remain constant. If ETH is now worth $400, then the ratio between the amount of ETH and USDT in the pool changes. This means that there are now 5 ETH and 2000 USDT in the pool. 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 remember that k is a constant.
Masha decides to withdraw her funds and receives 10% of the pool in accordance with her share. As a result, she receives 0.5 ETH and 200 USDT for a total of 400 USDT. Looks like she made a nice profit. But what if she decided not to invest her funds in the pool? She would have 1 ETH and 100 USDT at her disposal for a total of 500 USDT.
As a result, Masha needed to use HODLing rather than invest in the Uniswap pool. In this case, the impermanent loss is the lost profit from adding a token to the pool that is becoming more expensive. Thus, by investing in Uniswap in hopes of earning a commission, Masha may miss out on other opportunities.
Please note: this effect occurs regardless of which direction the price changes from the moment of deposit. What does it mean? If the price of ETH declines relative to the price at the time of deposit, losses may also increase. If you want to explore this issue further, read Pintail's article.
But why are losses inconsistent? If the price of tokens in the pool is restored to the price level when they were added to the pool, then the effect is mitigated. And since liquidity providers earn a commission, losses can be recouped over time. However, liquidity providers should take this into account before adding their funds to the pool.
How does Uniswap make money?
No way. Uniswap is a decentralized protocol supported by Paradigm (a cryptocurrency hedge fund). All commissions go to liquidity providers, and none of the founders receive a percentage of trades made through the protocol.
Currently the transaction fee for liquidity providers is 0.3% per trade. By default, commissions earned 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 of the pool.
Part of the commissions may be used to develop Uniswap in the future. The Uniswap team has already launched an improved version of the protocol called Uniswap v2.
➟ Do you think where to start working with cryptocurrencies? Buy Bitcoin on Binance!
How to use Uniswap
Uniswap is an open source protocol, which means anyone can create their own application for it. However, most use https://app.uniswap.org or https://uniswap.exchange.
Open 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 receive.
Click Swap.
Check the transaction details in the window that appears.
Confirm the transaction in your wallet.
Wait for the transaction to be confirmed on the Ethereum blockchain. The transaction status can be tracked on the website https://etherscan.io/.
Token Uniswap (UNI)
UNI is the native token of the Uniswap protocol that gives its holders governance rights. This means that UNI owners can vote on changes to the protocol. We mentioned earlier that the protocol exists as a kind of public good. The UNI token confirms this idea.
At the creation of Uniswap, 1 billion UNI tokens were issued, 60% of which are distributed to existing members of the Uniswap community. The remaining 40% will be available to team members, investors and consultants over four years.
Some of the tokens are distributed to the community through liquidity mining. UNI tokens will be distributed to those who provide liquidity to the following Uniswap pools:
ETH/USDT
ETH/USDC
ETH/DAI
ETH/WBTC
Who is in the Uniswap community? Any Ethereum address that has interacted with Uniswap contracts. Next, let's look at how you can get UNI tokens.
How to get Uniswap tokens (UNI)
If you used Uniswap, you will most likely be able to get 400 UNI tokens for each address you used Uniswap with. How to get your tokens:
Go to https://app.uniswap.org/.
Connect the wallet you previously used Uniswap with.
Click Claim your UNI tokens.

Confirm the transaction in your wallet (you can check current gas prices on Ethscan Gas Tracker).
Congratulations! You now own UNI tokens.
Want to sell your UNI tokens? Use Binance for this.
➟Click to trade UNI tokens on Binance!
How to buy UNI on Binance
To buy UNI, you need to exchange either fiat currency or cryptocurrency on the Binance exchange. You cannot use a debit/credit card to purchase UNI directly. Below are possible pairs with BNB, BTC, BUSD, USDT or Euro.

If you want to purchase UNI with cryptocurrency, transfer the coins to your spot wallet or buy them. We recommend buying BUSD due to its stability. You can purchase BUSD using your credit/debit card under the [Buy Cryptocurrency] tab. Enter the desired BUSD amount and click [Continue] to enter your card details.

Once you have your cryptocurrency, go to the exchange and select the UNI pair you want to trade. You can select another pair by clicking the button with the current market pair in the upper left corner.

Enter the pair of your choice in the search bar. Our example uses UNI/BUSD.

You can now create an order to buy UNI. The fastest way is to create a market order that specifies the current spot price. You can also create a limit or stop-limit order if you want to buy at a certain price or better.
To create a market order, click [Spot] on the left side of the screen. On the [Buy] tab, be sure to select [Market] as your order type and enter the desired BUSD amount. After this, click [Buy UNI] and the order will be placed.

How to sell UNI on Binance
The process of selling UNI is similar to buying. First of all, UNI must be in your Binance spot wallet. If you haven't entered tokens yet, go to the [Fiat and Spot] page and find UNI. You can learn more about UNI transfer on the [Input] tab. For details, check out our guide on How to Deposit Cryptocurrency on Binance.

After successfully entering UNI, open the exchange tab and select the UNI pair you want to exchange. Let's take UNI/BTC as an example.

You can find the required pair using the search bar. In our case, click on the [UNI/BTC] pair.

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

Summary
Uniswap is an innovative exchange protocol built on top of Ethereum. It allows anyone with an Ethereum wallet to exchange tokens without the involvement of any centralized party.
Although this technology has its limitations, it can positively impact the trustless token exchange process. Once Ethereum 2.0 scaling solutions are implemented, Uniswap will likely see new benefits as well.



