What is Uniswap? Here are the basics of the most popular decentralised exchange (DEX)
Traders can swap Ethereum tokens and Ethereum-based tokens on Uniswap, and also lend crypto tokens to Uniswap’s liquidity pools and earn fees in exchange. As per CoinGecko data, Uniswap has the highest 24-trading volume among all DEXs (over $1.38 billion) and the highest market share (24.2 percent).
Like centralised crypto exchanges, decentralised exchanges (DEXs) allow users to trade crypto, but they work in a fundamentally different way.
On many DEXs, transactions are executed on-chain. This means transactions occur on a single blockchain, like Ethereum, Binance Smart Chain, etc.
As blockchains are open source and public, DEX transactions are transparent. There is no way to hide or modify transactions for nefarious purposes.
On a DEX, as transactions occur on-chain, there is no centralised entity making edits to the account balances on its database. Instead, users transact anonymously with each other through their crypto wallets.
Consequently, there is self-custody of funds on a DEX. As users transact using their own wallets, they retain custody of their assets.
Following this framework, a DEX named Uniswap was built by Hayden Adams (a former mechanical engineer at Siemens) in 2018.
Uniswap is a blockchain network running on the Ethereum blockchain, allowing users to swap cryptocurrency tokens in a decentralised manner. Traders can swap Ethereum tokens and Ethereum-based tokens on Uniswap without trusting any party with their funds. Users can also lend their tokens to Uniswap’s liquidity pools and earn fees in exchange.
With this innovative model, Uniswap has emerged as one of the leading players in the Decentralised Finance (DeFi) movement.
As per CoinGecko data, Uniswap has the highest 24-trading volume among all DEXs (over $1.38 billion) and the highest market share (24.2 percent).
How Uniswap works
On Uniswap, there is no central party making trades. It does not use centralised market makers, nor an order book (which are a feature of centralised crypto exchanges).
Instead, it features automated liquidity. The Uniswap model revolves around liquidity providers lending their crypto tokens to create liquidity pools.
The liquidity providers provide liquidity by adding crypto tokens in pairs to smart contracts which can be bought and sold by others. In return, liquidity providers receive a percentage of the trading fees.
For every such trade, a certain number of tokens (in the pair) are removed from the liquidity pool. This affects prices.
Market on Uniswap
Uniswap has risen in popularity as it does not charge fees to list tokens. This allows several Ethereum-based tokens such as Shiba Inu (SHIB), Decentraland (MANA), Enjin (ENJ), etc to be easily accessible for traders.
It does not support non-ERC-20 tokens such as Bitcoin (BTC), Dogecoin (DOGE), Cardano (ADA), etc.
Uniswap’s design is referred to as a Constant Product Market Maker, which is a variant of the Automated Market Maker (AMM) concept.
AMMs are smart contracts tied to liquidity reserves that can be traded against. In some way, these liquidity reserves can be considered the building blocks of the market.
Liquidity providers can create reserves by depositing an equal value of two tokens (ETH and an ERC-20 token, or two ERC-20 tokens). The pools are usually made of stablecoins such as USDC, USDT, etc. but this is not mandatory.
After making the deposit, the liquidity providers get liquidity tokens, or in simple terms, a token representing their share of the larger liquidity pool for that particular token pair. These liquidity tokens can later be redeemed for the share they represent in that pool.
The exact functioning and details of the liquidity pools in the Uniswap protocol are beyond the scope of this article, but it is worth noting that Uniswap’s tech has seen several iterations.
These updates have sought to address some of the major inefficiencies in Uniswap’s original decentralised market maker design.
Uniswap v3
Uniswap v3 - the most recent version - has brought in more capital efficiency, allowed liquidity provider tokens to be considered NFTs, made it possible for Uniswap to be deployed on Layer 2 solutions, and more.
Liquidity providers for specific token pairs are now allowed to set custom price ranges for which they want to provide liquidity. This allows Uniswap v3 to work as a pseudo-order book on Ethereum, where market makers and liquidity providers can choose at which price point they want to provide liquidity.
While this brings more capital efficiency to the network, some see it as favourable to wealthier and professional market makers over smaller, retail participants.
Users can use the Uniswap interface, connect their Ethereum-supported crypto wallets, select the token they wish to swap, select the token they wish to receive in exchange, and click on Swap.
After confirming the preview of the proposed transaction, the users need to wait for it to be confirmed on the Ethereum blockchain.
As Uniswap is an open-source project, anyone can also leverage it to build their own frontend apps.
The Uniswap token (UNI) is the native token on the protocol, and allows holders to receive governance rights and vote for changes to the network.
Edited by Teja Lele