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, an emerging project called Uniswap is doing just that. This permissionless DEX allows you to trade any Ethereum-based tokens directly through your web 3.0 wallet without any deposits or withdrawals to a centralized orderbook. Better yet, Uniswap’s liquidity pools (described below) have resulted in 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 product that is arguably better than DEXs like Bancor or Kyber which raised millions of dollars in comparison.
How Does It Work?
Unlike virtually all exchanges in the digital asset ecosystem, Uniswap removes the concept of order books entirely. Rather than market makers specifying price when providing liquidity (i.e. sell 10ETH @ $100), they merely supply the funds while Uniswap takes care of everything else.
Simply connect a web 3.0 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.
In practice, 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. In the case of Uniswap today, a variant called the “Constant Product Market Maker Model.” is used, 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.
Unlike the trading experience, supplying liquidity to Uniswap is slightly more complicated. In the most basic terms possible, supplying liquidity to Uniswap markets requires you to submit the collateral for both sides of a market. In practice, 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. As such, market makers can turn in their liquidity token(s) for the underlying collateral at any time.
In order to incentivize market marking, 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, market makers 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 has the cheapest gas cost of any DEX. Furthermore, 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.
At the time of writing, Uniswap currently holds nearly 50k ETH in its liquidity pool along with a total of nearly $17M worth of digital assets as a whole. The exchange is estimated to process an average $1M worth of volume on a daily basis.
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 12 months. 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.