When it comes to decentralized exchanges, the first things we think about are 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 is doing just that. The permissionless DEX allows you to trade any Ethereum-based tokens directly through a web 3 wallet without any deposits or withdrawals to a centralized order book. Better yet, Uniswap’s liquidity pools (described below) have little to no slippage for the vast majority of transactions.
As an average user, Uniswap provides a one-stop-shop for exchanging any ERC 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.
Launched in November of 2018, Uniswap was founded by Hayden Adam, a young yet immensely 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 in the past year.
How Does It Work?
Uniswap removes the concept of order books entirely. Rather than specifying price what price to buy or sell at, users merely select an input and output token while Uniswap provides a market rate.
Simply connect a web 3 wallet like Metamask, select the asset you want to trade (ETH), the asset you wish to receive (DAI) and boom! Uniswap automatically processes the transaction and updates your wallet balance.
Uniswap leverage liquidity pools to make unique markets for supported assets according to a deterministic algorithm. 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 does result in larger orders suffering from increased spot prices, 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 frontrunning, 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 to 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 DAI, you must submit an equal amount of DAI and ETH 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 provides 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. Stated another way, the more transactions on a market, the more fees collected, and the more income a market maker earns when redeeming their liquidity token(s).
Compared to other DEX competitors, Uniswap has a number of advantages for small-traders. Specifically, Uniswap has no listing fees, requires no native tokens and some of the cheapest gas cost of any DEX.
The project is open-source on GitHub and inherently permissionless, meaning that any individual can create any ERC 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.
In a world where hurdles and barriers to entry continue to limit adoption, Uniswap provides a much needed DEX experience that digital asset traders have long been searching for. 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 any digital asset like Bitcoin (WBTC) and trade it via Uniswap, at this point in time other native protocol tokens such as Tezos or Binance Coin are currently not supported via Uniswap markets.
Over the coming year, it will be interesting to see if Uniswap can continue to gain as much traction as it has in the past year. 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 focused on building compelling blockchain products. He currently works as the managing director at Fitzner Blockchain Consulting and is a contributor to DAOs like MetaCartel and Moloch. He is an active member of the Ethereum community and has a strong interest in for-profit businesses such as The Block Crypto and Messari.