[ad_1]
TL;DR
Uniswap is a set of computer programs that run on the Ethereum blockchain and allow for decentralized token swaps. It works with the help of unicorns (as illustrated by their logo).
Traders can exchange Ethereum tokens on Uniswap without having to trust anyone with their funds. Meanwhile, anyone can lend their crypto to special reserves called liquidity pools. In exchange for providing money to these pools, they earn fees.
How do these magical unicorns convert one token to the other? What do you need to use Uniswap? Let’s read on.
Many developers have been thinking about new ways to build a decentralized exchange. One of the pioneers of this is Uniswap. The way Uniswap works may be a bit more difficult to understand than a more traditional DEX. However, we’ll soon see that this model brings some attractive benefits.
Since the Uniswap protocol is decentralized, there is no listing process. Essentially any ERC-20 token can be launched as long as there is a liquidity pool available for traders. As a result, Uniswap doesn’t charge any listing fees, either. 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 underlying technology that inspired its implementation was first described by Ethereum co-founder, Vitalik Buterin.
Uniswap leaves behind the traditional architecture of digital exchange in that it has no order book. It works with a design called Constant Product Market Maker, which is a variant of a model called Automated Market Maker (AMM).
So, let’s consider the ETH/USDT liquidity pool. We’ll call the ETH portion of the pool x and the USDT portion y. Uniswap takes these two quantities and multiplies them to calculate the total liquidity in the pool. Let’s call this k. The core idea behind Uniswap is that k must remain constant, meaning the total liquidity in the pool is constant. So, the formula for total liquidity in the pool is:
x * y = k
So, what happens when someone wants to make a trade?
Let’s say Alice buys 1 ETH for 300 USDT using the ETH/USDT liquidity pool. By doing that, she increases the USDT portion of the pool and decreases the ETH portion of the pool. This effectively means that the price of ETH goes up. 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 the pricing. Ultimately, the price paid for this ETH is based on how much a given trade shifts the ratio between x and y.
The technology behind Uniswap has seen several iterations so far. Chances are, if you’ve used Uniswap, you used Uniswap v2. However, there are always new improvements in the pipeline. Let’s go through the most impactful updates brought forth by Uniswap v3.
Capital efficiency
One of the most significant changes coming with Uniswap v3 relates to capital efficiency. You see, most AMMs are very capital inefficient – that is, most of the funds sitting in them at any given moment are not being used. This is due to an inherent characteristic of this x*y=k model discussed earlier. In a simplified way, the more liquidity there is in the pool, the bigger 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) between 0 and infinity. All that capital is sitting there reserved for the scenario when one of the assets in the pool 5x-s, 10x-s, 100x-s.
If that happens, those idle assets ensure that there’s still liquidity left on that part of the price curve. This means that only a small portion of the liquidity in the pool is sitting where most of the trading happens.
As an example, Uniswap currently has about 5B dollars of liquidity locked, while it does only about 1B of volume per day. You might think this isn’t a particularly elegant way of doing things, and it appears that the Uniswap team agrees. Uniswap v3 addresses this issue.
Liquidity providers can now set custom price ranges for which they want to provide liquidity for. This should lead to more concentrated liquidity in the price range that most trading activity happens in.
In some sense, Uniswap v3 is a rudimentary way of creating an on-chain order book on Ethereum, where market makers can decide to provide liquidity in the price ranges they set. It’s worth noting that this change favors professional market makers over retail participants. The beauty of AMMs is that anyone can provide liquidity and put their funds to work.
Uniswap LP tokens as NFTs
Uniswap on layer 2
Transaction fees on Ethereum have skyrocketed in the last year. This makes using Uniswap economically nonviable for many of the smaller users.
Let’s say that Alice deposits 1 ETH and 100 USDT in a Uniswap pool. Since the token pair needs to be of equivalent value, this means that the price of ETH is 100 USDT. At the same time, there’s a total of 10 ETH and 1,000 USDT in the pool – the rest funded by other liquidity providers just like Alice. This means that Alice has a 10% share of the pool. Our total liquidity (k), in this case, is 10,000.
What happens if the price of ETH increases to 400 USDT? Remember, the total liquidity in the pool has to remain constant. If ETH is now 400 USDT, that means that the ratio between how much ETH and how much USDT is in the pool has changed. As a matter of fact, there is 5 ETH and 2,000 USDT in the pool now. Why? Arbitrage traders will add USDT to the pool and remove ETH from it until the ratio reflects the accurate price. This is why it’s crucial to understand that k is constant.
So, Alice decides to withdraw her funds and gets 10% of the pool according to her share. As a result, she gets 0.5 ETH and 200 USDT, totaling 400 USDT. It seems like she made a nice profit. But hang on, what would have happened if she didn’t put her funds in the pool? She’d have 1 ETH and 100 USDT, totaling 500 USDT.
But why is the loss impermanent? 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 earn fees, the loss may get balanced out over time. Even so, liquidity providers need to be aware of this before adding funds to a pool.
It doesn’t. Uniswap is a decentralized protocol backed by Paradigm (a crypto hedge fund). All fees go to liquidity providers, and none of the founders get a cut from the trades that happen through the protocol.
Currently, the transaction fee paid out to liquidity providers is 0.3% per trade. By default, these are added to the liquidity pool, but liquidity providers can redeem them at any time. The fees are distributed according to each liquidity provider’s share of the pool.
A portion of fees may be dedicated to Uniswap development in the future. The Uniswap team has already deployed an improved version of the protocol called Uniswap v2.
- Go to the Uniswap interface.
- Connect your wallet. You can use MetaMask, Trust Wallet, or any other supported Ethereum wallet.
- Select the token you’d like to exchange from.
- Select the token you’d like to exchange to.
- Click on 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 monitor its status on https://etherscan.io/.
UNI is the native token of the Uniswap protocol, and it entitles its holders to governance rights. This just means that UNI holders can vote on changes to the protocol. We’ve discussed earlier how the protocol has already been acting as a sort of public good. The UNI token solidifies this idea.
1 billion UNI tokens have been minted at genesis. 60% of those are distributed to existing Uniswap community members, while 40% will be made available to team members, investors and advisors over the course of four years.
Part of the community distribution happens through liquidity mining. This means that UNI will be distributed to those who provide liquidity to the following Uniswap pools:
-
ETH/USDT
-
ETH/USDC
-
ETH/DAI
-
ETH/WBTC
But who are Uniswap community members? Well, any Ethereum address that has interacted with the Uniswap contracts. Let’s see how you can claim UNI tokens.
If you’ve used Uniswap, you can likely claim 400 UNI tokens per address that you used Uniswap with. To claim your tokens:
-
Connect the wallet that you previously used Uniswap with.
-
Click on “Claim your UNI tokens”.
-
Confirm the transaction in your wallet (you can check the current gas prices at the Ethscan Gas Tracker).
-
Congratulations, you’re now a UNI holder!
Want to trade your UNI tokens? Binance has you covered.
In the search bar, type in your chosen pair. For our example, we need UNI/BUSD.
To create your market order, head to the right-hand side of the exchange view and click [Spot]. Make sure you’ve chosen [Market] as your order type underneath the [Buy] tab and type in the amount of BUSD you would like to trade. Finally, click [Buy UNI] to place your order.
Use the search bar to find the pair you’d like. In our case, click [UNI/BTC].
To sell your UNI at the current market price, head to the right-hand side of the screen. Click [Spot] and select [Market] as the order type under the [Sell] tab. Enter the amount of UNI you want to sell and click [Sell UNI].
[ad_2]
Source link