Type to search

Uniswap Deep Dive (Part 1)

The DeFi (Decentralized Finance) ecosystem is increasingly receiving attention from all camps in the crypto community, including some constituents who have been borderline crypto sceptics. DeFi provides a potential pathway to actualize some of the grand promises of crypto, such as financial inclusion, censorship-resistant access to credit, and risk management, for billions of unbanked individuals on this planet. While it is far too easy to underestimate the complexities of creating and scaling a parallel financial infrastructure built around crypto primitives, the early signs look very promising.

We have in the past briefly touched upon DeFi here and here. In this and the subsequent newsletter, we unpack the DeFi stack and embark upon a deep dive analysis on how the individual components of the stack work, synergies between them and how they are poised to grow in the next few years. Today, we look at the first of a two part series on one of the fastest growing DEXs – Uniswap.

 Uniswap has come up with a unique solution to address the liquidity problem most DEXs face right now. Every exchange, whether centralized or decentralized, or indeed every platform/marketplace, faces this issue; without supply there is no demand, and without demand there is no supply. With exchanges specifically, the market makers do not want to come on board unless there is liquidity and without market makers there is no liquidity. Up until now, the traditional way of solving the “chicken and egg” problem of liquidity on exchanges (both centralized and decentralized)  has been through incentivizing ‘designated’ professional market makers to provide liquidity in return for trading fees rebates, revenue sharing agreements or a combination of both. Market makers also earn additional income through arbitraging and placing orders to benefit from their bets on markets’ direction. Given the specialized trading nous and high capital investment required in the market making business, providers of liquidity usually are specialized entities that employ sophisticated traders. The bar is just way too high for retail investors to act as liquidity providers. Moreover, market makers prefer centralized exchanges to decentralized exchanges, partly because decentralized exchanges require a fair bit of technical acumen to trade on them (interfacing with Metamask) and at least in their v1 avatars, are perceived to be slower with limited feature sets (basic limit and market orders). This is where Uniswap is interesting. Their solution abstracts out the complexities of order books and price determination, and incentivizes retail users, including HOLDers to pool in liquidity for a share of the trading fees in return. With a single click of a button, retail users can create liquidity pools or add more to the existing ones. Liquidity providers get newly minted liquidity tokens that can be used to redeem contribution to the pool. As the price for every trade is determined algorithmically, retail investors pooling liquidity can forget about the price at which they want to buy/sell their assets. in some ways uniswap works very much like Bancor, but without a native token! And Uniswap works in such a way that no matter in which direction the market moves, the value of your share of the liquidity pool is worth less than what your initial contribution was. The loss in value of your share of liquidity pool is compensated for in the form of trading fees entitlements that is proportional to your share of the liquidity pool. This is essentially the only way to gain equity-like exposure to Uniswap. As trading volumes and therefore trading fees increase, you stand a chance of earning in excess of the loss incurred by your contribution to liquidity pool due to market movements. In essence, for the market-maker, it is a short-vol trade, with losses increasing if prices either increase or decrease significantly. Uniswap is emerging to be a key piece of the emerging DeFiecosystem. For a project that is less than 6 months old, the growth in trading volumes has been exponential. The total ETH staked has risen by more than 50% since the beginning of this month.   

ETH Locked in Uniswap. Source: https://mikemcdonald.github.io/eth-defi/

Token Liquidity on Uniswap

While Uniswap, in theory, allows users to swap any ERC20 token for another, a majority of liquidity available is concentrated in DAI/ETH and MKR/ETH markets. Below we show the liquidity share of the top 5 tokens traded on Uniswap.

Source: http://beta.uniswap.info/

Liquidity Provider’s Returns

The single biggest differentiating factor that sets Uniswap apart from other DEXs is the ease with which your ‘average-Joe’ ERC20 token owner can become a liquidity provider. All it takes is a few clicks on your Metamask wallet. As the price of a trade is algorithmically determined based on the size of the trade and the depth of the liquidity pool, liquidity providers will not have to do any follow up actions after adding their tokens to the liquidity pool. However, the mathematics of constant product market maker model that is used to price the trades on Uniswap ensures that the liquidity pool is never exhausted. For example, let’s say that the liquidity pool consists of 100 ETH and 10000 DAI tokens, trades are priced such that the product of tokens in the liquidity pool never changes. Here the liquidity pool product before the trade is 1000000 (100*10000). If the next order is a buy order for 10 ETH, it is priced such that the product of ETH and DAI tokens in the liquidity pool remaining after the trade does not change. So, after the trade the liquidity pool consists of 90 ETH and 11111.11 tokens (90*11111.11=1000000). As the trade size relative to the liquidity pool increases, the price of the trade increases exponentially. In the above example, if the trade size were 90 ETH instead of 10 ETH, the price would have been $1000 (10000/10). One of the other quirks of the maths behind the pricing is that a user’s value of the liquidity pool always decreases regardless of the direction in the price moves. The below figure shows the return difference between return on liquidity pooling on Uniswap and that of HODLing. So token holders are better off HODLing their tokens than being liquidity partners in a situation where there are significant price movements. To compensate for this, liquidity partners are entitled to receive their proportionate share of the 0.3% trading fees charged per trade.

As you can see from the table, the CPPM (Constant Product Market Maker model) will always algorithmically quote a price for any one of any x/y pair, with the price being algorithmically determined such that the product of the volumes of x and y will always be k.

In tomorrow’s edition, we will continue our exploration of Uniswap and also try and identify situations where the pricing mechanism could potentially go into a negative spiral.

For more on Uniswap, we also recommend Cyrus Younessi’s excellent post on Medium

Meanwhile in Crypto Wonderland….

“XRP Futures on Huobi” The Singapore-based crypto exchange Huobi says it will launch XRP futures contracts on its derivatives exchange this Friday. The exchange, called Huobi DM, already supports Bitcoin, Litecoin, Ethereum and EOS futures. Huobi is ramping up support for XRP across its ecosystem. The company added the digital asset to its over-the-counter (OTC) trading platform for institutional investors on March 6th, joining Bitcoin, Ethereum, Tether, EOS and Huobi Token.

“Tagomi Receives BitLicense” Tagomi Trading LLC, a cryptocurrency venture backed by Paradigm and Pantera Capital, has become the 18th firm to receive a coveted BitLicense. The crypto brokerage firm received approval for a virtual currency license and a money transmission license. As a result, Tagomi is now authorized to offer trading for “non-securities virtual currencies“, including Bitcoin, Bitcoin Cash, Ether, and Litecoin. The controversial BitLicense was first established in 2015 in a bid to regulate the rapidly expanding virtual currency market.

“Hershey to Adapt Blockchain” Blockchain-based consortium AdLedger has on-boarded The Hershey Company, a leading American chocolate production company, media outlet AdWeek reported on March 26. Hershey, along with French media group Publicis Media and The Global Audience Based Buying Conference & Consultancy (GABBCON), has reportedly joined AdLedger. AdLedger was founded by IBM, Tegna and blockchain company MadHive in 2018, and is a nonprofit consortium that develops shared ledger technologies for the digital advertising market. Apart from advertising, Hershey’s deployment of blockchain technology could be expanded to the operation of chocolate factories, facilitating tracing of cacao “from bean to bar.”

“8% Return on TUSD”TrustToken, the creator of TrueUSD, announced a strategic partnership with Cred, the leading platform of crypto-backed lending and borrowing services. Cred’s earning platform was chosen because of its significant experience with tokenized lending and borrowing, the team’s credibility and a track record, having amassed over $300 million in lending capital and Cred’s significant customer base, with Cred customers now enrolled in over 127 countries. Through CredEarn, TrueUSD holders can earn up to 8% annualized interest on TrueUSD fully collateralized 1 to 1 with the US dollar. TrueUSD is now available on CredEarn worldwide including 29 US states, with no minimum investment amount and zero fees to participate.

Crypto Twitter Pick

What We’re Reading / Listening To

How does crypto OTC actually work? By Connor Dempsey
What Grinds My Gears – You’ve Been Liquidated

Tags::

Satoshi&Co Daily Crypto Newsletter

By Ramani Ramachandran and Rohit Alluri

ZPX - Daily Crypto Update