Summary
Uniswap is a series of computer programs running on the Ethereum blockchain that supports decentralized token exchange. It operates with the help of a "unicorn" (see logo).
Traders can perform trustless Ethereum token swaps on Uniswap. At the same time, everyone can lend their digital currency holdings to a special fund reserve, that is, a liquidity pool, and receive corresponding fees in return.
How do these magical "unicorns" complete token conversion? What preparations need to be made before using Uniswap? See this article for details.
Centralized trading platforms have been the backbone of the digital currency market for many years. Such platforms have fast settlement speeds, high transaction volumes, and continuous improvement in liquidity. However, now there is another parallel world built on trustless protocols-the decentralized exchange platform (DEX). The platform requires no middlemen or custodians to facilitate transactions.
Due to the inherent limitations of blockchain technology, it has been extremely difficult to build a decentralized trading platform that competes with centralized trading platforms. Challenging. Most decentralized exchange platforms can be improved in terms of performance and user experience.
Many developers have been thinking about new ways to build decentralized trading platforms, and Uniswap is one of the pioneers. How Uniswap works may be harder to understand than more traditional decentralized exchanges, but we will soon realize that this model brings attractive advantages.
Thanks to this innovation, Uniswap has become one of the most successful projects in decentralized finance (DeFi) activities.
Let’s understand what Uniswap is, how it works, and how to conduct token swaps using only an Ethereum wallet.
Uniswap is a decentralized trading platform protocol built on Ethereum. Rather, it is an automated liquidity protocol. There is no need to use any order book or any centralized party to participate in the transaction. Uniswap allows users to skip intermediaries and conduct direct transactions, bringing a high degree of decentralization and censorship resistance.
Uniswap is open source software, you can visit Uniswap GitHub to check it out for yourself.
How is trading carried out without using an order book? In the model used by Uniswap, liquidity providers are required to create liquidity pools. The system provides a decentralized pricing mechanism that essentially smoothes order book depth. We’ll dive into how this works later. For now, all you need to know is that users can seamlessly exchange various ERC-20 tokens without using any order books.
Uniswap is a decentralized protocol and does not require currency listing. Basically any ERC-20 token can be issued as long as a liquidity pool is available to traders. Therefore, Uniswap also does not charge any listing fees. In a sense, the Uniswap protocol is a public good.
The Uniswap protocol was created in 2018 by Hayden Adams. However, the underlying technology that drives its implementation was originally proposed by Ethereum co-founder Vitalik Buterin.
Uniswap abandons the traditional architecture of digital trading platforms and does not use order books. Instead, it uses a "constant product market maker model", which is an automated market maker (AMM). ) model.
An automatic market maker is a smart contract that sets the liquidity reserve (or liquidity) required for traders to trade. sexual capital pool). These reserves are injected by liquidity providers. Anyone who deposits two tokens of equal value into the pool is a liquidity provider. In turn, traders pay a fee to the liquidity pool. Thereafter, this fee will be distributed according to the liquidity provider’s share of the fund pool. Next, let’s take a closer look at how it works.
Liquidity providers create markets by depositing two tokens of equal value. Token combinations can consist of Ethereum and one ERC-20 token, or two ERC-20 tokens. The funds in these pools are usually stablecoins (such as DAI, USDC, or USDT), but this is not a requirement. In return, liquidity providers receive “liquidity tokens” representing their share of the entire liquidity pool. These liquidity tokens can be redeemed for their share of the pool.
Below, we take the ETH/USDT liquidity pool as an example to analyze. We set the Ethereum (ETH) portion of the pool to x and the Tether (USDT) portion to y. Uniswap multiplies these two quantities to calculate the total liquidity in funds, which we call k. The core idea of Uniswap is that k must be constant, that is, the total amount of liquidity in the capital pool remains unchanged. Therefore, the calculation formula for the total liquidity in the capital pool is:
x * y = k
So, what happens if someone wants to trade?
Suppose Alice purchased 1 ETH for 300 USDT in the ETH/USDT liquidity pool. After completing the transaction, she increased the proportion of USDT in the fund pool and decreased the proportion of ETH, causing the price of ETH to rise. Why do you say that? Because after the transaction, the amount of ETH in the fund pool decreases, but the total liquidity (k) must remain constant, and the price is determined by this mechanism. Ultimately, the purchase price of ETH depends on how much the ratio ofx toy changes in a given trade.
It is worth noting that the model does not change linearly. In fact, the larger the order amount, the greater the imbalance betweenxandy. That is, compared with small orders, the price of large orders increases exponentially, resulting in an increasing sliding spread. This also shows that the larger the liquidity pool, the easier it is to process large orders. Why? Because the deviation betweenxandywill become smaller at this time.
The technology behind Uniswap has gone through many iterations so far. If you have ever used Uniswap, you have probably also used Uniswap v2. However, there are always optimizations and improvements brewing in new versions. So let’s take a look at the most impactful updates made by Uniswap v3.
One of the most obvious changes in Uniswap v3 is related to fund usage efficiency. Most automated market makers (AMMs) use funds inefficiently, that is, most of the funds they hold are never effectively used. We discussed the x*y=k model before, and its inherent characteristics are what lead to the above situation. Simply put, the more liquidity there is in the pool, the system can support larger orders over a wider price range.
However, the price curve corresponding to the liquidity provided by the liquidity providers (LPs) in these capital pools actually goes from 0 to infinity. . All these funds are stored in it to deal with situations where one of the assets in the pool grows 5 times, 10 times, or 100 times.
If this happens, these idle assets will ensure that the corresponding part of the price curve remains liquid. This means that the pool provides only a small portion of the liquidity in the price range where most trades are made.
For example, Uniswap currently has approximately US$5 billion in liquidity locked, but its daily trading volume is only about US$1 billion. You may think this approach is inappropriate, and the Uniswap team feels the same way, so this problem has been solved in Uniswap v3.
Today, liquidity providers can set their own price ranges for the capital pools into which liquidity is injected. As a result, liquidity will be more concentrated into the price ranges where most trading activity corresponds.
In a sense, Uniswap v3 is a basic way to create an on-chain order book in Ethereum, doing Market makers can decide to only provide liquidity within a price range they set. It’s worth noting that this change favors professional market makers rather than retail participants. The advantage of an automated market maker (AMM) is that anyone can provide liquidity and get funds moving.
However, as complexity further increases, the transaction fee benefits of "sitting back" liquidity providers (LPs) will be far greater. Lower than professional players who are constantly optimizing their strategies. At the same time, it is not difficult to imagine the emergence of aggregators such as yearn.finance to provide support for retail liquidity providers and help them maintain a certain degree of competitiveness.
We now know that every Uniswap Liquidity provider positions are unique as each depositor sets their own price range. This indicates that Uniswap liquidity provider positions are no longer fungible, so each liquidity provider position can now be represented by a non-fungible token (NFT).
One of the advantages of using fungible tokens to represent Uniswap liquidity provider positions is that it can be applied to other areas of DeFi. Uniswap v2 liquidity provider tokens can be deposited as collateral into Aave or MakerDAO. This situation no longer exists in v3, as each position is unique. But this problem of broken composability can be solved by new types of derivatives.
Ethereum’s transaction fees have grown rapidly over the past year. Many small-scale users face huge economic pressure when using Uniswap.
Uniswap v3 will also be deployed in a Layer 2 scaling solution called "Optimistic Rollup". This approach is very clever and allows you to enjoy the security of the Ethereum network while extending smart contracts. The deployment should drive significant increases in transaction throughput and significantly lower transaction fees for users.
We just said that liquidity providers earn fees by providing liquidity to traders who perform token swaps. Beyond that, is there anything else that liquidity providers should be aware of? Yes, you also need to pay attention to an effect called Impermanent Loss.
Suppose Alice deposits 1 ETH and 100 USDT in the Uniswap fund pool. A token pair needs to be composed of two tokens of equal value, so the price of 1 ETH is equal to 100 USDT. Currently, there are 10 Ethereum and 1,000 USDT in the pool (the remaining funds are provided by the same liquidity provider as Alice), and Alice occupies 10% of the capital pool. At this time, the total liquidity (k) is 10,000.
What will happen if the price of ETH rises to 400 USDT? As I just said, the total liquidity of the capital pool must remain constant. If the price of Ethereum becomes 400 USDT, then the ratio of the two tokens in the capital pool will change. At this point, the pool consists of 5 ETH and 2,000 USDT, as arbitrage traders inject USDT into the pool, causing the amount of ETH in the pool to drop until the ratio reflects the exact price. Therefore, constantkis a crucial prerequisite.
If Alice decides to withdraw funds at this time, she will receive 10% of the fund pool according to her share, that is, 0.5 ETH and 200 USDT, the total value reaches 400 USDT, which seems to be a very considerable profit. Conversely, if she does not deposit funds into the pool, she will receive 1 Ethereum and 100 USDT, for a total value of 500 USDT.
In fact, it is more beneficial for Alice to hold funds than to deposit them into the Uniswap pool. In this case, impermanent loss refers to the opportunity cost of depositing value-added tokens into the pool. In other words, although Alice can earn fees by depositing funds into Uniswap, she will lose other profit opportunities.
Please note that this effect will occur regardless of whether the price rises or falls after depositing funds. This means that if the price of Ethereum has dropped compared to when it was deposited, losses may also be magnified. If you want to learn more about the above from a technical perspective, please read Pintail’s article.
However, why do we say this is an impermanent loss? Because if the price of the tokens in the pool returns to the level when it was entered into the pool, this loss will be mitigated. Additionally, because liquidity providers earn fees, losses may also be smoothed out over time. Even so, liquidity providers must understand this risk before injecting funds into the pool.
Uniswap does not profit from it. Uniswap is a decentralized protocol powered by Paradigm, a cryptocurrency hedge fund. All fees go to liquidity providers and the founders take no cut of any trades conducted through the protocol.
Currently, the transaction fee paid to the liquidity provider for each transaction is 0.3% of the total amount. By default, these fees will be injected into the liquidity pool, which can be redeemed at any time by the liquidity provider. Trading fees are distributed based on the liquidity provider’s share of the pool.
Part of the fees may be used exclusively for Uniswap development iterations in the future. The team at Uniswap has deployed an upgraded version of the protocol called “Uniswap v2”.
➟ Want to start a digital currency journey? Welcome to buy Bitcoin on Binance!
Uniswap is an open source protocol that allows anyone to create their own front-end applications. The most commonly used ones 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 to exchange.
Select the tokens you wish to exchange.
Click "Exchange".
Preview the transaction in a pop-up window.
Confirm the transaction request in your personal wallet.
Patiently wait for the transaction to be confirmed in the Ethereum blockchain. You can check the transaction status at any time through https://etherscan.io/.
UNI is the native token of the Uniswap protocol, giving holders governance rights. This simply means that UNI holders can vote on protocol changes. We have discussed before that this protocol can serve as a public good. The UNI token solidifies this concept.
The total initial minting amount of this token is 1 billion, 60% of which will be shared by existing Uniswap community members. The remaining 40% will be distributed to team members, investors and advisors over four years.
Part of the community distribution is achieved through liquidity mining. Therefore, UNI will be released to providers that provide liquidity to the following Uniswap pools:
ETH/ USDT
ETH/USDC
ETH/DAI
ETH /WBTC
Who are the members of the Uniswap community? Any Ethereum address that interacts with a Uniswap contract is a community member. Let’s learn how to claim UNI tokens.
If you have used Uniswap before, you can Claim 400 UNI tokens for every address using Uniswap. To claim tokens:
Please visit https://app.uniswap.org/.
Use the Uniswap wallet before connecting.
Click "Receive your UNI tokens".
Confirm the transaction in the wallet (visit the Ethscan gas tracking page to view the current gas price).
Congratulations, you have officially become a UNI holder!
Need to trade your UNI tokens? Binance can help you!
➟ Click here to trade UNI tokens on Binance!
To purchase UNI, you should exchange for fiat or cryptocurrency on the Binance exchange interface. UNI cannot be purchased directly via debit/credit card. Available trading pairs include: BNB, BTC, BUSD, USDT or EUR.
p>
To purchase UNI using cryptocurrency, you can transfer other tokens to a spot wallet or choose to buy. We recommend using BUSD, whose price is very stable. Visit the [Buy Cryptocurrency] page to purchase BUSD via bank card. Enter the target amount and click [Continue] to fill in the bank card details.
After the cryptocurrency arrives in your account, please go to the trading platform and select the target UNI trading pair. To change your selection, click on the current market pair in the upper left.
In the search bar, type the selected trading pair. In our example, UNI/BUSD needs to be selected here.
Now, you can create an order to purchase UNI. The fastest way is to trade at the current spot price via a market order. To buy at a specific price or better, you can also set up a limit or stop-limit order.
To create a market order, please go to the right side of the trading platform interface and click [Spot]. Under the [Buy] tab, you must select [Market Order] as the order type, and then enter the BUSD amount you wish to trade. Finally, click [Buy UNI] to place an order.
The selling process of UNI Similar to purchasing. First, your UNI must be deposited into your own Binance spot wallet. If you have not deposited tokens yet, please go to the [Fiat Currency and Spot] page and search for UNI. Click [Recharge] to learn the specific steps for transferring UNI. You can also read our How to Deposit on Binance guide for more help.
After successfully depositing UNI, open the trading platform page and select the required UNI trading pair. Let’s take UNI/BTC as an example.
Use the search bar to find the target trading pair. In this operation, click [UNI/BTC].
To press For UNI for sale at the current market price, please go to the right side of the screen. Click [Spot] and select [Market Order] as the order type under the [Sell] tab. Enter the quantity of UNI you wish to sell and click [Sell UNI].
Uniswap is an innovative platform built on Ethereum Trading Platform Agreement. It allows all Ethereum wallet holders to exchange tokens directly without the intervention of centralized parties.
Despite certain limitations, this technology could still have a very positive impact on the future development of trustless token exchanges Impact. Once Ethereum 2.0’s scalability solutions come online, Uniswap will also benefit from them.