Beyond the hype on Uniswap

More recently, a lot of metaphorical twitter ink has been spilled over Uniswap, a DEX built on Ethereum, that has no underlying token and has been thus far built on the accord of Hayden Adams, with a couple of small grants from the Ethereum Foundation and balance.io.

It's pretty easy to understand why all this hype around the DEX, as since its launch in November, Uniswap has been recording some impressive growth numbers. Today we'll try to uncover if there is more to the application, than bored ETH whales moving money around, playing with the newest community toy.

Screenshot 2019-03-04 at 10.18.48.png

Uniswap is an on-chain market maker allowing the swapping of ERC20 tokens, as well as ETH to an ERC20, and vice-versa. It also allows participants to contribute to liquidity pools for any ERC20 token, and gain commissions in the form of exchange fees for doing so. The model looks a lot like the Bancor network, with the main differences being that (i) Uniswap charges no listing fee - Bancor requires staking BNT tokens to create a market, (ii) costs significantly less gas, and (iii) is entirely decentralized and therefore censorship resistant - whereas on Bancor, markets can be frozen.

Screenshot+2019-03-04+at+10.19.04.jpg

The removal of all those friction points in the model - compared to Bancor, has lead to Uniswap quickly attracting a non-trivial amount of ETH & DAI liquidity (plot #1 below), while it is increasingly attracting a larger share of the total trades executed on DEXes (plot #2 below).

Screenshot+2019-03-04+at+10.19.13.jpg

Uniswap uses thin delegateproxy contracts (similar to eip-1167, but using a different bytecode) for creating new markets, so it's extremely cheap. Market pairs also only exist from ETH-token, which means a token-token pair doesn't need its own market, it just needs the 2 tokens to have an ETH pair.

Another interesting element of the model, is the fact that there is no order book. Instead the trades get settled at an exchange rate provided by a simple equation - x * y = k . k is a constant value that never changes, whereas x and y represent the quantity of ETH and ERC20 tokens available in a particular exchange that ultimately determines the exchange rate. The curve below represents the possible exchange rate outcomes, at a high level.

Screenshot 2019-03-04 at 10.19.20.png

I'll avoid getting into too much detail about how that works (refer here for more context), but a good takeaway here is that the simplicity of the model, provides a compelling way for *smaller* trades to get executed without any of the order book woes (e.g. liquidity gaps).  This post from Ross Bulat on Medium describes the nuances of the model well - including the liquidity pool requirements and the key role of arbitrageurs in keeping the pool balanced.

Now, you might wonder why that's useful at all?! Well, in fact, as Token Analyst uncovered in a recent post, *small* machine to machine transactions (or contract to contract) actually outweight human to machine transactions on the Ethereum blockchain!

Screenshot 2019-03-04 at 10.19.25.png

Moving forward, as scalability comes to the Web 3.0 stack and along with it meaningful Dapps, we can easily imagine the proportion swinging heavily towards the machine to machine side of the pendulum, with nexuses of smart contracts interacting with one another and millions of micro-transactions taking place daily. In that instance, DEX protocols like Uniswap are likely to unlock their full potential, allowing Dapps to access instant pooled liquidity, without the risk of slippage.

Of course the slippage story is different for larger transactions via Uniswap. According to Ameen Soleimani of Spankchain, with $50K of tokens in reserve for trading, it takes $350 to cause 1% slippage, $2600 for 5%, and $5500 for 10%. Thus the model is inherently limited by the static pricing mechanism, and its utility is limited to smaller transactions.  That said, it's not hard to imagine a future where you have a range of different DEX protocols, for varying transaction sizes, and pooled liquidity.

Screenshot 2019-03-04 at 10.19.32.png

Liquidity of course, will not come for novelty, but rather for profit. As it stands, the liquidity providers on Uniswap are entitled to a 0.3% fee off every swap, on a pro rata basis. This is not the only way one can make a return on liquidity provision. The liquidity provider receives tradable liquidity tokens as a unit of account of what has been committed to Uniswap. These tokens can be subsequently provided as collateral to Maker DAO (or another DeFi application or protocol that has a market for those) in exchange for DAI, which can then be swapped for a PoS token (e.g. ETH 2.0), on which the liquidity provider can earn further revenue. Here's how Uniswap envisions the model. 

Screenshot 2019-03-04 at 10.19.37.png

Pretty neat, huh? Be that as it may, there is a big caveat here and that is that said returns are expressed in ETH terms (or in terms of any other ERC-20 that is offered for liquidity). As such, any price change in the underlying asset (e.g ETH), would cause a reduction in the value of the stake, relative to holding the original assets, in a way that the resulting losses could be greater than the fees received. Effectively, there is no reason for a liquidity provider to participate, except for if they are long ETHPintail has demonstrated this very effectively in his study of the net position of account 0xf369af914dBed0aD7afdDdEbc631Ee0FDA1b4891, the very first liquidity provider to the Uniswap smart contract.

Screenshot 2019-03-04 at 10.19.43.png

Given ETH's price swings, the net position of the liquidity provider has been negative for most of the time since engaging in the contract. At the same time, however, the user has been collecting fees, which implies that were the price of ETH to return to the same level it stood at when the contract was initiated, the user would have collected close to 12% annualised return. The same author, explores how providing liquidity to Uniswap compares to HOLDing ETH for different levels of ETH appreciation.

Interesting; it appears that providing liquidity for Uniswap is more profitable than HODLing for between 100% and 150% appreciation range in the price of ETH, but less profitable beyond that range. For more info on how that result was reached you can refer to the equivalent post here.  

There are a few more caveats to consider when assessing Uniswap's value proposition. First, each trading pair requires its own smart contract, so creating new trading pairs and markets could be quite costly and storage intensive. Yes, it only takes an ETH pair to create a new pair out of two ERC-20's (if ETH/ZRX and ETH/DAI exist on the platform, then ZRX/DAI is also possible), but still in considering the whole universe of ERC-20s (>3000), that is a lot of redundant smart contracts to store on a blockchain, that at present, has serious scalability issues.

Another thing to consider is that Uniswap is built entirely on-chain, which means it is more prone to front-running, and thus makes it expensive for market makers who may need to rapidly change strategies. It also means that speed is not part of the value proposition. Finally, Uniswap is provisioned for ERC-20 tokens alone, and has no apparent plans to support ERC-721 or other standards - which of course could change fairly quickly - but as it stands, limits its utility somewhat (thought truth be told, there's Boxswap for 721's, that does a pretty good job at covering that base).

In all, overlooking its limitations, it becomes fairly evident why Uniswap has managed to attract so much interest recently and with it, a fair amount of traction; an interesting model, with a simple UI/UX (see below), that managed to get off the ground with nothing but talent and a couple of grants. No ICO, no venture investment, no native token, no fanfare and big promises. In absence of all this baggage, it has managed to get adoption on the fly and put a compelling use case to front and centre of the small, but dynamic DeFi universe.  But above all, it has driven home what is a valuable lesson that many have chosen to forget; underpromise & overdeliver.