Connect with us

Academy

What is Uniswap and how does it work?

Published

on

Uniswap is often touted as the leader of Ethereum DeFi’s ecosystem. But before diving deeper into the workings of the platform, first, let’s understand a little about decentralized protocols for automated liquidity provision.

There is no stopping of decentralized finance or as more popularly known as the DeFi industry. It just keeps on growing and will continue to do so in the future. But for that to happen, the growth will need a lot more efficiency and innovation with respect to the incentives.

Liquidity is a major factor when it comes to the decentralized finance realm. While there are several means to bring liquidity to the market, one of the most popular ways is the automated market-making model.

Also known as AMM, this model leverages a preset curve to reach price discovery. This is different from other models which are more “manual” in nature.

Let’s dive into the world of Uniswap which happens to be a fully decentralized protocol for automated liquidity provision based on Ethereum.

What is Uniswap?

Uniswap is a leading decentralized exchange [DEX] protocol. Unlike traditional systems, Uniswap does not require an order book or any centralized entity to conduct trades.

The platform enables its users to trade without the need for any intermediaries. It is an open-source software licensed under the GPL and provides a maximum degree of decentralization and censorship-resistance.

It all started when developer Hayden Adams was massively inspired by an article from Vitalik Buterin, Ethereum-creator after being laid off from his junior engineering position at Siemen.

Adams started developing Uniswap in 2017. A year later, he rolled out the DEX’s mainnet. In 2020, Uniswap V2 was launched along with the network’s native governance token, UNI, launching in September of the same year.

UNISWAP DAI TO USD SWAP

How does Uniswap work?

Uniswap is a decentralized exchange protocol that needs no trusted middleman, unlike its centralized counterparts.

To be more specific, it is an automated liquidity protocol and is based on a constant product formula and deployed in a system of non-upgradeable smart contracts on the Ethereum blockchain. Hence, it does not need to have an order book.

Automated market makers make order books redundant. AMMs are smart contracts that essentially maintain liquidity reserves, also known as liquidity pools. Traders on the platform can trade against these reserves.

Here comes the role of “Liquidity Providers”, also known as “LPs” which fund the liquidity pools. More precisely, LPs may be defined as investors who are willing to pool their assets on the decentralized exchange and earn a financial incentive. This is because liquidity providers get a share of transaction fees. In fact, the DEX charges 0.3% on every trade that directly goes to the LPs.

Anyone can be an LP. All they need to do is contribute an equivalent value of two tokens to the reserve. That can be Eth [ETH] or stablecoins such as USDT, DAI, or USDC.

Meanwhile, the traders are required to pay a fee to the liquidity pool to receive “liquidity tokens” which are then distributed to the LPs on the basis of their share of the pool. These pool tokens can then be used on other platforms such as decentralized applications [DApps].

Uniswap pools depend on the following equation:

 x * y = k

In the above formula, x may be considered as ETH, y may represent USDT. k, on the other hand, reflects the outcome of the product of the two quantities that gives us the total liquidity of the pool. As such, the value of k remains unchanged at all times.

If we consider that a trader uses a liquidity pool to purchase Ether on Uniswap in return for Tether. With this transaction, the portion of ETH on the pool declines. Due to this scarcity, the price of the cryptocurrency goes up. This entire process, in turn, effectively raises the USDT in the liquidity pool.

Since k remains constant, hence a larger order would prompt a more pronounced shift in terms of the balance between x and y. Therefore, the slippage tends to be less prominent in larger liquidity pools where it is easier to conduct large orders.

Is Uniswap safe?

Uniswap happens to be one of the most user-friendly decentralized exchanges where it is not up to the buyers and sellers to create liquidity. It is non-custodial in nature, meaning users are in full control of their assets, thereby eliminating risks associated with exchange hacks.

Having said that, self-custodying tokens does not completely mean a riskless activity. Users must adopt best practices to keep their funds safe at all times.

Unlike traditional exchanges, Uniswap is completely permissionless. While this helps in maintaining privacy, scammers could potentially try to create scam projects or worthless tokens and lure novice market participants into investing in them.

What is the “impermanent loss”?

Impermanent loss occurs when a user provides liquidity to a liquidity reserve. But there is a twist. The price of the asset that has been deposited by the user shifts compared to when the user deposited them.

Ultimately, a bigger change would imply that the user is more prone to impermanent loss. In this scenario, the loss incurred happens in terms of a fall in the dollar value of the asset at the time of withdrawal than at the time of deposit.

In contrast, liquidity pools with smaller price range assets, such as stablecoins or wrapped versions of tokens, are at a lesser risk of impermanent loss.

Impermanent losses can be neutralized by trading fees which makes pools on decentralized exchanges such as Uniswap to be quite profitable.

UNISWAP-UNI

UNI – The token of Uniswap

UNI essentially serves as a governance token on the Uniswap platform. It was introduced in September 2020. There was no ICO, instead, a total of 1 billion UNI were minted at genesis. Besides, 15% of the total was distributed to former and current users. On the other hand, 40% has been distributed among employees, investors, and advisors of Uniswap.

UNI owners can essentially influence and vote on the development decisions of the protocol. The token can also be used for the purpose of funding grants, forging collaboration, liquidity mining pools, etc. In short, the holders of the native token will have a say in the future of the protocol.

How do I buy UNI?

UNI is one of the most popular tokens. It can be bought from several different exchanges, such as Gemini, Binance, Bitfinex, Huobi, Coinbase Pro, Kucoin, and Uniswap itself.

Conclusion

Uniswap is often regarded as a groundbreaking success story of Ethereum. It has become one of the most important platforms in the world of decentralized finance [DeFi] and has also managed to give tough stiff competition to its centralized alternatives.