Abstract and 1. Introduction

  1. Bitcoin and the Blockchain

    2.1 The Origins

    2.2 Bitcoin in a nutshell

    2.3 Basic Concepts

  2. Crypto Exchanges

  3. Source of Value of crypto assets and Bootstrapping

  4. Initial Coin Offerings

  5. Airdrops

  6. Ethereum

    7.1 Proof-of-Stake based consensus in Ethereum

    7.2 Smart Contracts

    7.3 Tokens

    7.4 Non-Fungible Tokens

  7. Decentralized Finance and 8.1 MakerDAO

    8.2 Uniswap

    8.3 Taxable events in DeFi ecosystem

    8.4 Maximal Extractable Value (MEV) on Ethereum

  8. Decentralized Autonomous Organizations - DAOs

    9.1 Legal Entity Status of DAOs

    9.2 Taxation issues of DAOs

  9. International Cooperation and Exchange of Information

    10.1 FATF Standards on VAs and VASPs

    10.2 Crypto-Asset Reporting Framework

    10.3 Need for Global Public Digital Infrastructure

    10.4 The Challenge of Anonymity Enhancing Crypto Assets

  10. Conclusion and References

8.2 Uniswap

Uniswap is one of the most popular Decentralized Finance projects and one of the biggest decentralized exchanges built on the Ethereum Blockchain which is censorship resistant, non-custodial and trustless. It enables users to swap one ERC-20 token for another for a fee, without presence of market makers[116] who are individuals or entities. Unlike the traditional order-book based exchanges there is no single authority like WazirX and Binance which matches buy and sell orders on Uniswap. The trades are executed against on-chain liquidity pools which pool the crypto assets provided by all the liquidity providers, unlike individual orders by individual market makers in a traditional centralized exchange.

In Uniswap, unlike a traditional centralized crypto or securities exchange, a counter-party is not required to execute a trade. Instead, an automated market maker facilitates every trade according to the supply and demand of the ERC-20 tokens. This can be considered to be analogous to barter trading in crypto tokens. There are two possible models in crypto exchanges, the first one is a centralized model which enables users to buy and sell their crypto assets for fiat currency and vice versa after undergoing a KYC process. The second model is that of an entirely decentralized exchange which can deal only in crypto assets and facilitates the exchange of one crypto asset for another purely on the basis of barter, without the involvement of any fiat currency or KYC procedures.

Analogous to the first case if an individual who has only Rubies wants to have some Emeralds which he/she does not possess, he/she would either have to find someone who is willing to exchange his/her Rubies for Emerald(s) which would be extremely difficult. It would also be difficult to find out how many Rubies are a fair deal for one Emerald and vice versa. The individual would instead try to find an exchange where he/she can exchange Rubiesfor a common medium of exchange like the Indian Rupee or the US Dollar and then exchange it for Emeralds, as depicted in Fig. 42(a). However, exchanging the Ruby for money would require the individual to have a bank account and identification proofs for KYC before the individual can undertake the transaction. Also, the exchange would charge the individual a fee for providing this intermediation and liquidity facility both when converting Rubies to fiat currency and subsequently using the fiat currency for buying Emeralds. This is analogous to the mechanism of trading in centralized exchanges with the added disadvantage of crypto assets being in the custody of the exchange rather than the users.

Analogous to the second case, there can be an automated store like Amazon Go named Unistore which does not deal in fiat currency at all and carries out purely automated barter trades of precious stone pairs like Ruby/Emerald, Emerald/Sapphire, Sapphire/Diamond etc. as depicted in Fig. 42(b). If we consider the Ruby/Emerald pair in the store, the store has a pool of individuals who own Rubies and Emeralds and wish to earn passive income on their assets. The owners of the Rubies and Emeralds are given an offer by Unistore to deposit equal values of Rubies and Emeralds into the baskets in the store in order to earn a fixed fee on every Ruby/Emerald swap executed in Unistore. The owners of the Rubies and Emeralds can withdraw their precious stones at their will along with the accumulated fee. The liquidity providers are required to deposit Rubies and Emeralds of equal value (not equal number) in order to maintain the stability of the protocol which is based on an automated market maker (AMM).

Unistore facilitates its users to anonymously exchange Rubies for Emeralds and vice versa without converting them to fiat currency, in lieu of a small fee which is used to pay the owners of Rubies and Emeralds who decide to pool them into Unistore to provide the liquidity. This enables a user to anonymously walk into the store and exchange Rubies for Emeralds and vice versa through an Automated Market Maker, without any human intervention and questions about identity and jurisdiction. This is achieved through smart contracts which run an Automated Market Maker that decides the price for each Emerald exchanged in lieu of a Ruby and vice versa.

Uniswap uses a constant product market maker which can be mathematically represented as (1) where 𝑄𝑅𝑒𝑏𝑦 is the quantity of Rubies in the pool and π‘„πΈπ‘šπ‘’π‘Ÿπ‘Žπ‘™π‘‘ is the quantity of Emeralds in the pool and K is a constant.

𝑄𝑅𝑒𝑏𝑦 Γ— π‘„πΈπ‘šπ‘’π‘Ÿπ‘Žπ‘™π‘‘ = 𝐾 (1)

When K=1600 this would result in a curve shown in Fig. 43

For example, if a user swaps their Ruby for an Emerald when there are 40 Rubies and 40 Emeralds in the pool already, the supply of Ruby would increase and that of Emerald would decrease, thus the price of Ruby would go down and the user would get a smaller number of Emeralds for every subsequent Ruby swapped for an Emerald. Such fluctuations give rise to arbitrage opportunities which are used by rational actors in the DeFi ecosystem to carry out trades which move the exchange rate towards equilibrium levels. This also gives rise to opportunities for validators to earn income over and above the transaction fee and issuance and is known as Maximal Extractible Value (MEV).

The operation of the Automated Market Maker is purely algorithmic without the need for any counterparty’s presence to facilitate individual transactions. Theoretically it can provide infinite liquidity with exchange rates of tokens rising asymptotically. A transaction would be available even for the last available Emerald for an infinite number of Rubies. Uniswap is identical to a Unistore trading in ERC20 token pairs instead of precious stone pairs.

However, in Uniswap V3 the liquidity providers can choose the range on the curve for which they wish to provide liquidity, resulting in much greater market depth. This results in each liquidity provider providing a unique position on the liquidity curve. Therefore, these positions cannot be represented by ERC-20 LP tokens and are instead minted in the form of LP NFTs which specify the ownership of the corresponding liquidity position on the bonding curve of the Automated Market Maker as shown in Fig. 44.

It can also be seen from the curve in Fig. 43 that every trade would result in a change in price for every unit of the ERC-20 token bought, this is known as slippage. Hence, large trades executed in pools with low liquidity can result in significant price fluctuations when the trade is actually executed on chain. This is one of the main reasons why validators who have visibility of such transactions might reorder such transactions to benefit from such variations. The value derived by such reordering is called Maximal Extractible Value (MEV) and provides additional revenue to the validators. The taxable events triggered in the MEV ecosystem are discussed in the subsequent sections.

In order to maintain and incentivize liquidity and pooling of tokens, Uniswap provides the users who pool their tokens (known as liquidity providers) with LP tokens which can be used by them to earn passive income in the form of share of the transaction fee of charge by Uniswap. Uniswap V2 charged a flat fee of 0.3% for all the swap transactions[117]. However, Uniswap V3 has a fee structure of 0.05%, 0.3% and 1% depending on the token being exchanged[118]. The users pooling their assets are given a percentage of LP tokens or LP NFTsthat represent the liquidity reserve which accumulates the liquidity fee, when the users decide to stop providing their assets for liquidity, they redeem the LP tokens or LP NFTs to get their share of the liquidity reserve. The LP tokens or NFTs are burnt consequently. This mechanism is the main source of liquidity for decentralized exchanges like Uniswap. However, the conversion of the crypto asset pair into LP tokens/LP NFTs and vice versa might be considered a β€˜disposal’ in many tax jurisdictions.

In this process, the project itself does not receive any income, as all the fee is given to the liquidity providers. It is noteworthy that LP tokens are also ERC-20 tokens which can also be used by liquidity providers to earn passive income on other DeFi platforms. However, providing liquidity has its own risks with a possibility of divergence loss which is caused due to the change in price of assets locked in the Liquidity Pool smart contract. A divergence loss is also known as an impermanent loss, it is said to have occurred when the current price of the tokens pooled into the liquidity pool changes relative to the price when the tokens were deposited. A detailed explanation can be found here119. Both upward and downward movement of relative price of assets causes divergence loss. Mathematically deriving from (1) it can be expressed in terms of the price ratio 𝑝 as given below and the plot of (2) is shown in Fig. 45.

Where 𝑝 is the ratio of the price of assets currently to the price at the time of depositing. However, despite the possibility of a divergence loss users pool their assets in liquidity pools as fees from liquidity mining offsets the divergence losses.

The users can list any ERC-20 token pair for swapping on the exchange, As on March 2024 there were 2056 token pairs listed on Uniswap[120]. The percentage of transaction fee to be charged is determined using the governance mechanism of Uniswap wherein each holder of the governance token UNI can initiate proposals for change and cast their votes on proposed changes. This makes Uniswap a Decentralized Autonomous Organization like the MakerDAO where no single β€˜person’ owns the entity and it exists in a truly decentralized manner. Although, Uniswap has recently established an NPO – the Uniswap Foundation[121], a real-world legal entity which supports decentralized growth and long-term sustainability of Uniswap. Such Decentralized Autonomous Organizations pose various unique tax and legal challenges which are discussed in the subsequent sections.

The market β€˜depth’ in decentralized exchanges like Uniswap is obtained by having large pools of asset pairs which are liquidity pools and this facilitation of swap transactions in lieu of fee is known as liquidity mining. In Uniswap V 2.0 the liquidity providers had to deposit equal value of both the ERC20 tokens in the liquidity pool, a condition which has been relaxed in Uniswap V3. For example, if the value of 3 BAT is same as 1 DAI then the liquidity miner would have to deposit 300 BAT and 100 DAI in the BAT/DAI liquidity pool. It is worth noting that the crypto assets being swapped in Uniswap are also available for open market trading on other platforms. Just as it would be possible for users of Unistore to utilize an arbitrage opportunity where the swapping ratio of the Ruby/Emerald pair is higher or lower than their open market price ratio, the crypto asset pairs like DAI/BAT or ETH/DAI having different price ratios than those prevailing in other exchanges would give arbitrageurs an opportunity to earn profit. This facilitates the maintenance of liquidity and price ratios close to the market price ratios in Uniswap liquidity pools.

Author:

(1) Arindam Misra.


This paper is available on arxiv under CC BY 4.0 DEED license.

  1. https://en.wikipedia.org/wiki/Market_maker

  2. https://docs.uniswap.org/contracts/v2/concepts/advanced-topics/fees

  3. https://docs.uniswap.org/concepts/protocol/fees

  4. https://pintail.medium.com/uniswap-a-good-deal-for-liquidity-providers-104c0b6816f2

  5. https://www.coingecko.com/en/exchanges/uniswap#:\~:text=Uniswap (v3) is a decentralized,pairs available on the exchange.

  6. https://www.uniswapfoundation.org/