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 price impact 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.
Now, as of May 2020, Uniswap has officially been upgraded to Uniswap V2 – a new and improved version of the exchange featuring ERC20 <> ERC20 token pools, native price oracle, and Flash Swaps. For anyone who was previously providing liquidity to Uniswap V1, we recommend migrating your liquidity here.
Launched in November of 2018, Uniswap was founded by Hayden Adam, 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.
How Does It Work?
Uniswap removes the concept of order books in favor of an automated market maker. 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 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 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 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 provides can redeem their liquidity token(s) for the underlying collateral at any time.
In order to incentivize liquidity, Uniswap charges a 0.25% 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 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 cryptocurrencies 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 years, 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 the Editor of DeFi Rate and a contributor to leading DeFi outlets like the Defiant and Bankless. He is active in the DAO ecosystem through projects like MetaCartel and Raid Guild where he seeks to incubate governance models and grassroots community development. He is an ambassador of Set Protocol and the Director of Fitzner Blockchain Consulting where he authors a weekly publication called Token Tuesdays. To stay up with Cooper, follow him on Twitter.