The Mirage of Liquidity Pools

Computer with market chart

The most common assumptions of or is that asset swaps and liquidity pools are risk-neutral, due to the balancing nature of markets.

The constant product equation does not hold under thee conditions a) selloffs b) reduction in value of asset n and c) when transaction fees for liquidity utilization increases beyond a percentage of the network’s value.

The constant product nature of automated liquidity makers make these products amenable to a V  = mxn formulation wherein V is the total value held in a pool in USD and m is the value of asset 1 and n is the value of asset 2. However, when shorts of m happen or massive selloffs of n happen. i.e., when the ration of m/n change and/or the ratio of m to the dollar or n to the dollar changes, this constant product need not necessarily be valid, amidst massive selloffs. the value of m and n would continuously decrease as will the product mXn as liquidity reduction happens in the market. Similarly, despite increasing liquidity in markets if the exchange rate of m or of n decreases then V decreases significantly. 

Farming Liquidity 

Liquidity farming, another trend in today’s marketplace wherein in addition to pool fees, users can stake their liquidity tokens into centralized pools to earn interest on the liquidity token. Such staking activity can earn the investor interests in the liquidity token through either proof of stake or through a guaranteed value mechanism. That however, could again be subjected to both entry (staking) and exit( unstaking) fees that are large. 

When ethereum is still maturing the crypto ecosystem is fraught with inconsistencies that are market dependent. To name a few, recent increases in transaction fees from about 1$ to about 30$ for smart contract transactions have made liquidity pool investing siginficantly difficult for small investors. 

Aave another protocol, similar to uniswap but different in terms of risk monitoring provides an interesting set of guidelines for analyzing risks with respect to liquidity pools and tokens available. With uniswap the philosophy has consistently been – that as a protocol, it is upto the users or services that are built atop uniswap to disclose or discover risks through disclosure of their mechanisms. Aave built atop uniswap and other decentralzied exchanges provide some amount of visibility into various risks faced by staked tokens. Aave has created this risk matrix that summarizes the overall risks a market faces.

Decentralized Liquidity Pools and Automated Market Making with Uniswap

How Uniswap Work is a decentralized constant product liquidity protocol, which is secure and creates liquidlity pools of ERC-20 token. given the recencey of uniswap, the protocol almost has 2 billion dollars worth of ERC-20 tokens locked up and faciliates close to 400 million dollars of decentralized trade every day (sometimes even more).

How does it work? – The basics.

Automated market making is defined as a smart contract mechanism by which liquidity pools such as the one we will describe below, automatically execute trades on the ethereum blockchain. What this means is that both the ETH and DAI would have an equal $ worth of tokens in the system. As a example, consider 1 ETH = 346$. Consider an ERC token DAI which trades at 1 DAI = 1$.  In a liquidlity pool, one would ideally invest both tokens in the ratio of 1:1 to keep the product constant. This means that for every 500$ of ETH invested, the total DAI value should be 500$ worth. Now consider a system where a user would invest 1 ETH and 346 DAI since 1 ETH = 346 DAI.

A constant product curve would look like the following where we would have 1000 ETH and 34600000 DAI.

Curve x * y = K

Whom does facilitate help to:

  1. Arbitraguers: Due to the decentralized nature of these exchanges, a liquidity pool facilitates mass arbitrage opportunities. For example, on coinbase or on hitbtc if 1 ETH is trading for 380 DAI. An arbitrageur can quickly come to uniswap and purchase say 10 ETH paying 3460 DAI from his wallet.  This would incur a 0.3% fee to uniswap, which is distributed to all liquidity providers of the pool, and is accumulated over a period of time. Then, the arbitrageur can simultaneously trade these 10 ETH for 380 DAI on for a total of $3800 making a cool 340$ profit – 0.3% commission of about 0.3X3460 = 10.38$.  This kind of simultaneous no risk swapping of ETH to DAI on public markets is an extremely robust mechanism.
  2. ERC-20 token purchases and ERC-20 listings: One the largest challenges with centralized exchanges is their lack of visibility into new token listings, ICOs or IEOs. It becomes almost impossible to purchase  these types of tokens especially when legal controls are in place.  uniswap pretty much allows anyone in the world to list their tokens and to set their own private pools using their User Interface.
  3. HODLErs : This community is responsible for adding and creating the Liquidity pools on the uniswap network. What is interesting here is that HODLers do not really need to identify themselves on the network or to create an account or to register with a bank or anyone here. They can directly login to the uniswap by authenticating or connecting to one of their wallets e.g., metamask or coinbase, and can participate in the economy.
  4. Pool creators: Individuals can also create pools for all kinds of tokens on uniswap. for example, WBTC is the wrapped version of BITCOIN. One can actually purchase or list any cryptocurrencies that they create onto these pools themselves.
  5. Ordinary traders: Globally the trader pool of users cannot access the cryptocurrency token if it were not for centralized exchanges or other secondary peer to peer markets. Uniswap facilitates ordinary traders access to cryptotokens.

In a future article I shall write about minting, and yeild farming in the context of uniswap.  I shall also write about some of the risks of investing in Liquidity providers.


  1. uniswap whitepaper –

The Coinbase Effect on Cryptocurrencies

Coinbase effect on cryptocurrency

The listing of cryptocurrencies on private currency exchanges has traditionally been a were-withal arrangement, wherein the exchanges determine unilaterally (almost) as to which ones get listed in a decentralized world, that is a rather one-sided agreement.  However, with or without centralized exchanges we have seen a significant growth of cryptocurrency adoption for many traditional cryptocurrencies.

That being said – there is a significant correlation between Coinbase listing cryptocurrencies on its site (as available) for trade, and the increase in prices of the cryptocurrencies. This is because the listing on Coinbase spurs demand, and gives legitimacy to a cryptocurrency token that is otherwise only traded on peer to peer markets or on bridges such as As an event study we can observe that the event of listing Algorand increases the price.  As an example, one can see the price  increase  significantly  on  July 21st 2020.

These changes can lead one to analyze how the returns pare up in a typical event study – as can be analyzed. One can determine the cumulative abnormal returns for algorand upon listing by comparing how much the price changes compared to a standard cryptocurrency index or compared to the price of Bitcoin which has been fluctuating typically. One can also calculate the cumulative abnormal returns by totaling the abnormal returns for the next few days.

Blockchain based Decentralized Machine learning protocols and marketplaces that reward users

Blockchain based Decentralized image

Numerai is a platform, that rewards data scientists and assembles all models into a meta-model which is then applied to a centralized hedge fund. Based on the applicability of the submitted ML algorithm, users are rewarded. Also, users who submit their ML algorithms have to stake their corresponding cryptocurrencies in NMR onto the platform. More recently, the team behind Numerai released a protocol called Erasure, which creates a decentralized marketplace for submission and solicitation of machine learning or other forms of data. These data and algorithms marketplaces are completely decentralized having their own governance structure and rewards structure enabling peer-to-peer trade.

These decentralized machine learning (ML) marketplaces combine private machine learning and open blockchain algorithms, and enable crowdsourcing of models, without need for disclosing data  (by using homo-morphic encryption). Such an arrangement is a powerful harbinger to the Artificial intelligence revolution being enabled by web 3.0 – similar to the open-source revolution that drove most of the infrastructure used in the internet industry – e.g., Linux, Apache, WordPress, etc…

The value deriving mechanism in such a decentralized machine learning marketplace moves from data to the algorithms and the efficacy of the models,  which can now be crowd-sourced without having to reveal data. An added bonus is the ability to reward algorithm creators based on the resulting efficiency of the model in the real world operation. For example, on the Numerai platform, many individuals would have submitted algorithms with corresponding stakes, however, only those algorithms which perform (or return the highest) the best are rewarded with a percentage of the profits proportional to their model’s contribution. The bad algorithms are not rewarded, and very often the submitter loses their stakes through a process of burning on the blockchain. In the web 2.0 era, firms (large and small) possessed extremely sensitive and often private non-replicable data that was used to increase their competitive advantage. As a result, these firms focused on hiring the best of the talent from the markets to work for them.

With the evolving technology trends of Numerai, homo-morphic encryption, and the erasure protocol now – in addition to data – algorithms, models, and all kinds of services can be monetized directly in a peer-to-peer fashion. One of the early marketplaces using the NMR token from Numerai and rewarding both data scientists and algorithm creators, in addition to all kinds of data and algorithmic work is this website called

Decentralized Insurance for Decentralized Finance

In the previous post, I discussed why decentralized insurance options for smart contracts could be a feasible mechanism to guard against unforeseen vulnerabilities. however, the decentralized finance world – highly lucrative in terms of decentralized products; most of which operate on top of the ethereum blockchain has no such protections against loss. Due to the decentralized nature of investments products such as FDIC does not play a role in securing customer interests against fraud, hacks or even a plain economic collapse.

Insurance products for Decentralized finance have started seeing a huge resurgence with firms offering everything from wallet insurance to an options based insruance to hedge for or against market determined prices. Wallet insurance providers such as etherisc enable users to insure their wallets against theft, hacks or other forms of violations. However, wallet based insurance in itself might not be sufficient to assure users of protection when investing in decentralized insurance products. One would need protection of user investments. . That being said, there are products such as opyn which provide liquid insurance that hedges against extreme volatility

What this enables end users do is to set up a put option for ethereum at a certain price, on a certain day, which will guarantee the user a payout equal to the said price. the user also gets the option to either exercise the trade or not. These markets, though relatively new provide cryptocurrency and decentralized finance traders mechanisms to lock-in interest rates for cryptocurrency assets that would otherwise not have been possilbe.

Decentralized Insurance for Smart contracts

Computer keyboard with post title

One of the largest events that has impacted the smart contracts ecosystem is the lack of security and an ever increasing number of vulnerabilities in the decentralized space. A very detailed account of vulnerabilities in this smart contract ecosystem has given analysts, security firms such as trail of bits a lead in detecting and to some extent recommending best practices. That being said, there are too many of these issues to be tracked by teams building Dapps across the world. Very often these teams are understaffed and automation with tools such as Slither – which does static code analysis, and Echidna – a fuzzer for smart contract code accomplishes only so much. According to this detailed report by Trail of Bits, there are more than 246 different types of vulnerabilities that they discovered.

This is virtually impossible to detect and test using any type of automation, across all the millions of smart contracts that exist out there. As a result, Firms such as Nexus mutual have introduced a pooled insurance policy for smart contracts.

Their workflow is documented here :

Whenever, a smart contract deals with finances of individuals or contracting parties, nexus mutual’s funds provide a significant fallback to users. Nexus Mutual allows individual users to provide guarantees for use cases that are not tested and that tend to loose funds or operate unexpectedly. Insuring smart contracts is also a community activity in which all those users who have participated in a particular smart contract system, can pool in resources to an insurance pool and be compensated in times of a crisis.

On the overall, what we see is an insurance plan that can protect people against the downside. however adoption questions remain

a. Will decentralized finance users who have no insurance subscribe to nexus mutual?

b. Will non decentralized finance users take up insurance using nexus mutual?

c. What about insurance products that are not dependent on code per-se and can protect investments or locked up funds in contracts against market fluctuations?

Decentralized Finance Service categories.

The decentralized finance industry is a revolution happening in the banking industry slowly but surely.

There are three main categories of Defi providers in the crypto-sector, most of whom operate via the Ethereum blockchain and its supported protocols. I label them as a) Centralized Defi service providers b) Decentralized Defi service providers and c) Auxilliary Defi Service providers.

Centralized Defi Service Providers

On one end of the decentralized finance, product spectrum are centralized entities such as and that have found innovative ways to return positive returns on cryptocurrency investments, by lending with collateral. Let’s call these centralized Defi Providers. They operate similarly to banks, often acceding to large customer service support, providing and maintaining KYC records for all customers, negotiating with legal teams across the world to ensure that local laws are not violated by investments with them.

Decentralized Defi Service Providers

On the other end of the decentralized finance spectrum are stable coins that provide no interest, and just provide the utility of moving money from one location to another quickly. In the middle of this spectrum is open source software managed is a decentralized fashion by teams as Ethereum contracts. These contracts provide both the lenders and borrowers access to loans directly from each other through smart contracts. This arrangement dis-intermediates financial institutions that use leverage to lend more from depositors. Often the lenders while subscribing to the lenders do not provide appropriate support and allow Defi-contract rules to execute as per design. Organizations such as, dy.dx, maker etc. operate as decentralized Defi service providers. I have written extensively about the maker protocol and the DAI/MCDAI tokens supported by the blockchain.

Auxilliary Defi Service Provider

There are many auxilliary defi service providers. These service providers range from decentralized anonymous exchanges such as balancer, uniswap, etc. to the creators of stablecoins such as Tether, or USDC. While on one hand balancer, uniswap, etc. operate more as a token exchange system at the protocol layer using Ethereum smart contracts, they are not necessarily interest earning. Often the exchanges that facilitate this function of coin-swap use external oracles to convert the USD equivalent values among the coins to enable an exchange. Stablecoins off late has become a very large investment system in itself – with tether crossing 10Billion dollars in investment and USDC with a market capitalization of 1 Billion Dollars. These stable coins are etherum contracts that ties the issuance of new coins backed by assets whose value are equated to 1 USD. With USDC it is 1 US Dollar in the bank. While stable coins in themselves do not provide interest, a passive investment of stable coin in centralized Defi services provides interest income. The decentralized Defi providers also accept stable coins to facilitate certain functionality.

On the overall, the Defi space is an exceedingly interesting and positive development in the field of finance. However, the excessive interest rates in a market that has shrunk by 30% since its peak is always concerning to users. For example, many centralized Defi services return up to 9% APR which – given the times of COVID-19 seems too high. Another issue here is that of the local lending on the platform. The platforms lend at between 1% APR and 4% APR, but they return 9% APR to their users on stable coins. How is this possible? are they doing something else with our money to get such huge returns? Or are they just turning around new investor money to existing investors? – Only time will tell how this operates. As of now, things seem hunky-dory and people are seeing unheard off returns in this space giving it the necessary thrust needed to survive and excel against all other odds.

Smart Contract Vulnerabilities

Given the importance of smart contracts on major block-chain platforms such as Ethereum, EoS, Tezos, Monero, etc. there has been a renewed understanding and focus on security vulnerabilities in smart contract space. Given the recency of this domain, firms such as trail of bits have created a niche in detecting, analyzing, and preventing vulnerability exploitation. The problems with smart contract vulnerabilities are multi-fold and specific to the blockchain’s design itself.

Since smart contracts – once launched onto the main-network have no mechanism to be reverted back, except to be stopped or killed, they are unlike any other software that is amenable to be changed once bugs are found. Another issue with smart contracts is its dependence on data or programming interfaces outside its own binary executable. With this kind of external dependence, it is not entirely within the control of the smart control developer that the program being written in itself is self-contained and all conditions that could ever occur with the data are tested before releasing the smart contract onto the blockchain’s main-net. Very often this data or programming interfaces themselves are not reliable thereby causing problems wherein the smart contract logic, though executing appropriately are themselves subject to a lot of flaws.

Several of these issues have recently been analyzed by firms such as trail of bits as given above and have been disclosed in the form of academic research. A detailed catalog backed by academic research supported by Trail of bits demonstrates about 246 different types of findings therein.

Why Emerging Economies need to invest in, legalize and regulate Blockchain and Major Cryptocurrencies?

Brics flag image

In this article I shall focus about the BRICS nations as they are the largest emerging economic bloc.

There have been talks of banning, opening up and re-banning the crypto-sector in India. Similarly there have been ambiguous laws about cryptocurrencies in china – which for the most part controls the entire mining network of Bitcoin, and possibly many other networks with the largest mining companies and hardware producers, exchanges operating from China or by Chinese nationals. In fact the largest crypto-exchanges both by daily trade volume and by market capitalization are operated by Chinese nationals (or former Chinese nationals). Some of the largest cryptocurrencies are operated by Chinese nationals as well. Another case is that of Russia, that has invested a lot of time in legalizing and to some extent regulating cryptocurrencies. Similarly Brazil hosts some of the most innovative blockchain experiments including legalizing land records on blockchains. With all such innovations happening,

Why should BRICS economies care about this technology?

  • Firstly, Cryptocurrencies are slowly becoming an alternative financial asset, similar to gold, diamonds, platinum – only that its properties make it more difficult to detect, control and ban. Even if countries were to legally void out cryptocurrencies, the ease of owning these assets for any individual or citizen would make it difficult to detect or control. In India during the 1980’s and 1990’s the government had imposed tremendous amount of taxes on importing gold, which led to an increase in gold prices, while giving birth to a whole range of gold-ornament firms – some behemoths worth more than several billion dollars just because they were able to “bring in” or “arbitrage” gold prices from international markets. Such legal requirements often – at the cost of preventing – normal retail customers from acquiring an asset will create an elite set of individuals who will possibly monopolize this market. Banning any economic asset for ever – has never been a possibility historically….
  • Secondly, stifling innovation in sectors that are heavily corruption ridden or asymmetric information driven, with virtually no legal oversight creates a bane to society. For example, the real estate sector and property registration issues in the emerging economies have long been an eyesore to the efficient functioning of markets due to heavy policy dependence. Decentralizing and plugging in blockchains has demonstrated significant efficiency into this sector.
  • Thirdly, being home to the largest technically capable information technology specialists in the form of programmers, designers and creators of software, these economies can rapidly scale to true products as has been demonstrated by many large exchanges and DeFI innovations that are shaping today’s world. If governments were to ban this technology or its associated crypto-currencies, they would be denying this huge population of technology professionals a true first chance at the leap. For long, hugely regulated telephone networks, service delivery systems such as utility had bought India and Brazil to a bottleneck. By the time liberalization happened – overnight after realizing the benefits of these technologies, it led to rampant “renting” by few vested parties denying ordinary citizens of the true right to access.
  • Fourthly, proper regulation and appropriate enforcement of financial instruments in this sector will lead to a huge tax collection for the government. An outright ban would leave huge amounts of money on the table. Not only that, properly regulating exchanges and using intelligent platforms such as chainanalytics and other financial tracking systems, money flows can easily be tracked back to owners much more easily than physical assets that are often hidden behind layers of owners. Thus proper financial regulation will bring in the necessary control and enhance government tax collections.

Securitization of Physical Assets through smart contracts

The true power of the crypto-ecosystem and blockchains lies partly in the fact of creating legally viable “mechanisms” of trade that is overseen by the network, and is truely location agnostic. For example, if one were to own the rights for an asset (say a music streaming service or rights to a particular song), then one would have to negotiate with the musician or his/her representative directly to purchase the rights and then create a physical contract. This mechanism is true for any asset, physical or digital. In the research paper published in Managerial Finance on security tokens, I provide an architecture for converting physical and digital assets can be made tradeable – using ethereum based smart contracts. Deloitte consultancy recently released a whitepaper that outlines many advantages of securitization here.

Advantages of Securitization

Some of these advantages include – a reduction in trade friction i.e., in the example above, the buyer does not need to negotiate with the seller (i.e., musician or his agent each time), since the terms of trade are already existing on the network, or have been templatized and are accessible on the smart contract platform. Secondly, the buyers and sellers can engage in a partial trade i.e., instead of selling the whole right or property, the seller could part-sell his asset similar to equity. Thirdly, innovative financial instruments similar to options or reinsurance could be offered against these tokens- as smart contracts. Fourthly, while the physical world guarantees a value for an asset through a known mechanisms of “valuation”. E.g., home owners could find the values of their homes based on valuation metrics, etc. While these “valuation” metrics are usually based off – of past valuations, they often do not incorporate current price discovery based on market capacity.

A securitization exercise could often lead to a “price” discovered that is often different than existing “valuation” metrics, often providing a bigger advantage to both the seller and smart buyer. Finally, an advantage that is increasingly becoming important is that of providing an “extended unfettered” access to physical assets irrespective of location or country of origin or even source. For example, a buyer from Russia could own an asset in Zambia that has been securitized..

Each of these advantages, that were identified are now becoming a reality, slowly. For example the DAI platform recently voted to bring in physical assets. While the technical implementation of such a system that converts physical assets (or other virtual assets) into trade able securities is easily accomplished using smart contracts on a host of platforms, the socio-legal challenges for such an approach persist. For example, what would happen if a buyer purchases equity in a property at an inflated price e.g., a collection of songs from a musician. What happens if the owner decides to liquidate the property or decides to sell the rights to another buyer. How would jurisdictional prudence – play a role in enforcing the smart contract, suppose one of the parties to the contract. What jurisdictions would bind such an agreement? Are reputation systems sufficient to attract and maintain such a marketplace where real physical assets are bought and sold and valuations can quickly sky rocket?


Subramanian, H., 2019. Security tokens: architecture, smart contract applications and illustrations using SAFE. Managerial Finance.