Before popular automated market-makers (AMMs), decentralized exchanges were notorious for their poor UXs and thin order books. For those of us who remember the clunky UI of EtherDelta, it was very clear that there was a large window of opportunity for a simplistic yet effective DEX.
Thankfully, Uniswap created just that.
Uniswap became the first widely-used permissionless DEX that enabled users to trade any Ethereum-based token directly through a web 3.0 wallet – all without any deposits or withdrawals to a centralized order book. Today, it remains firmly in first place for the most popular DEX, despite the countless competitors and clones that have popped up.
Uniswap provides a one-stop-shop for exchanging any ERC20 token in a few clicks without having to worry about KYC, custody, or phishing. By leveraging smart contracts, Uniswap is able to offer autonomous on-chain transactions at marginal costs.
Due to its underlying mechnisms, Uniswap’s liquidity pools (described below) also have little to no price impact for the vast majority of transactions.
Uniswap is currently running on its May 2020 V2 upgrade, which includes ERC20 <> ERC20 token pools, a native price oracle, and Flash Swaps. Uniswap V3 goes live in May 2021, featuring improved flexibility for liquidity providers, multiple fee tiers and lower gas costs.
Following a high profile event with the launch of SushiSwap in 2020, Uniswap launched its own governance token, UNI – used to govern protocol changes. The best place to keep up with the growth of Uniswap and its ever-growing liquidity pools is on Uniswap Info.
Launched in November of 2018, Uniswap was founded by Hayden Adams, a young yet talented developer/designer who was relatively new to Solidity. With a $100k grant from the Ethereum Foundation, Hayden and his small team of less than 10 were able to build a compelling DEX which has garnered significant traction since launch.
Back in April of 2019, Uniswap closed a $1M seed round lead by Paradigm. With this, Uniswap went on to release Uniswap V2 in May of 2020.
The third and latest version of the protocol, Uniswap V3, launches in May 2021. V3 will also go live on the much-anticipated Layer-2 scaling solution, Optimism, which is designed to provide faster and lower-cost transactions.
How Does It Work?
Uniswap removes the concept of order books in favor of an automated market maker, or “AMM” for short. Rather than specifying price what price to buy or sell at, users merely select an input and output token while Uniswap provides the best possible market rate.
Simply connect a web 3.0 wallet like Metamask, select the asset you want to trade (in this case ETH), the asset you wish to receive (in this case DAI) and boom! Uniswap automatically processes the transaction and updates your wallet balance.
Uniswap leverages global liquidity pools to create unique markets for any two assets. By using an automated market maker (AMM), the exchange can quote prices to the end-user according to some predefined ruleset.
Uniswap uses a variant called the “Constant Product Market Maker Model”, particularly due to a feature that enables the exchange to always provide liquidity, no matter how large the order size nor how tiny the liquidity pool.
For this to work, the spot price of any given asset increases as the desired quantity increases. While this may result in larger orders suffering from increased price impact, the system never has to worry about running out of liquidity. Stated another way, Uniswap always maintains an aggregate supply in its smart contracts, meaning that the larger the liquidity pool gets, the lower the slippage across any trading pair is likely to be.
To mitigate front-running, Uniswap allows traders to specify a maximum price when placing an order. Therefore, if a miner front runs an order, the user cannot be forced into accepting the worse price. Although they might miss the trade, they won’t suffer from a costlier price. Combined with expiring orders – which prevent miners from withholding signed transactions and processing them at a more advantageous price – it’s clear that Uniswap has a very user-first mindset.
Liquidity providers can supply capital to any pool by submitting the collateral for both sides of a market. This means if you’re looking to supply capital to the DAI/USDC market, you must submit an equal amount of DAI and USDC to maintain the Constant Product AMM described above.
When liquidity is supplied, Uniswap grants users “liquidity tokens” which keep a record of how much of any given liquidity pool you are responsible for. Liquidity providers can redeem their liquidity token(s) for the underlying collateral at any time.
In order to incentivize liquidity, Uniswap charges a 0.3% fee on each transaction. These fees are automatically added back to the market at the time of transfer, resulting in deeper spreads across the board. As such, liquidity provider’s pro-rata stake(s) grants them ownership over a larger pool of capital. Put simply, the more transactions on a market, the more fees collected, and the more income a market maker earns when redeeming their liquidity token(s).
Uniswap V3 accounts for different levels of risk for liquidity providers, so instead has provided three separate fee tiers: 0.05%, 0.30%, and 1.00%. It is up to the liquidity provider to select which fee tier they provide liquidity for – keeping in mind that traders will likely opt for the lowest-fee pool available.
Read our tutorial on using range orders on Uniswap v3.
Uniswap has blown older decentralized exchanges out of the water in terms of ease-of-use and functionality. It also requires no listing fees, requires no native tokens and has some of the cheapest gas costs of any DEX on Ethereum.
Compared to its more recent competitors, it still maintains the largest market share, the best liquidity, and the widest range of tokens available for trading.
The project is open-source on GitHub and inherently permissionless, meaning that any individual can create any ERC20 market so long as they have an equal amount of ETH to back it. In essence, this allows new projects to create a base price for their token with added skin in the game.
Uniswap is has quickly become the de facto exchange for DeFi tokens to be traded.
In a world where hurdles and barriers to entry continue to limit adoption, Uniswap has succeeded in providing a much-needed DEX experience that traders had long been searching for. It has become the largest DEX as measured by several metrics, with developers continuing to innovate and improve the user experience.
With that being said, it should be emphasized that only Ethereum-based assets are currently supported in the current version. While it is possible to wrap cryptocurrencies like Bitcoin (WBTC) and trade it via Uniswap, at this point in time other protocols are not supported via Uniswap markets.
If one thing is for certain, the fact that Uniswap was able to build such an intuitive product with $100k seriously challenges the notions of how much funding is necessary to build a truly killer application.
Cooper is the Editor of DeFi Rate and an active contributor to leading DeFi media outlets like The Defiant, DeFi Pulse, and Bankless. He works with early-stage teams through Fire Eyes DAO to incubate governance models and grassroots community development. He is an ambassador to Set Protocol and an author of a weekly publication called Token Tuesdays. To stay up with Cooper, follow him on Twitter.