Skip to main content

Posts

Showing posts from November, 2022

Uniswap: How to calculate Impermanent Loss?

Impermanent Loss is a popular concept when it comes to automated market makers and decentralized exchanges like Uniswap. This term is often defined as the percentage loss a liquidity provider would experience for a given price movement. This means that, as an LP, your position may fall in value due to volatility, causing a loss compared to holding these assets outside of the pool.  This article will spell out the concept in mathematical logic and explain all the assumptions involved.  We consider a market with liquidity L and amounts x and y of assets X and Y respectively. We also have P as the price of X in terms of Y, and a price movement P1 = P.d where d >0 According to the definition of IL touched upon, we establish a generic formula for IL: where: V1 is the value of your position in the pool at the price P1 (x,y move with price) Vh is the value of your assets at the price P1 if you keep them outside of the pool  We also consider V0 as the initial value of your hol...

Uniswap V3: Understanding the Real Reserves Curve

Uniswap is currently the leading decentralized exchange in the blockchain world. In this article, I am going to explain the Curve of Real Reserve on Uniswap V3 in mathematical logic. This paper assumes you are familiar with automated market makers between two assets X and Y defined as a trading function, meaning a relationship between its reserves x and y. First, we consider a market with liquidity L and amounts x and y of assets X and Y respectively. And, we also have P as the price of X in terms of Y. It follows immediately that: In the earlier version, Uniswap V2, liquidity was distributed across the entire price range (0,∞), leading to inefficient liquidity utilization since much of the assets in the pool are never touched. The graph looks like this: Now, on version V3, liquidity providers are capable of providing liquidity in a fixed price range, saying [Pa, Pb] for example. This feature is called concentrated liquidity.  If the price does not fall outside of the range, you ca...

Weekly Report: 14th November 2022

 Fund Flows Investors see the FTX collapse as an opportunity with inflows totaling $42m Digital asset investment products saw the largest inflows for 14 weeks totaling US$42m. The inflows began later in the week on the back of extreme price weakness prompted by the FTX collapse. It suggests that investors see this price weakness as an opportunity, differentiating between "trusted" third parties and an inherently trustless system. Inflows were seen across all regions, most notably the US, Brazil, and Canada which saw inflows of US$29m, US$8m, and US$4.3m respectively. Switzerland was the outlier, seeing minor outflows totaling US$4.6m, although it remains the country with by far the most inflows year-to-date.  Bitcoin was the primary focus with inflows totaling US$19m, the largest since early August this year. However, short-bitcoin investment products also saw inflows totaling US$12.6m highlighting that while sentiment is predominantly positive, it has spooked some investors....

The FTX Collapse

This situation is a mess. Some of the information here might be outdated by the time you read this, and we might have missed today's breaking news, but this is our attempt to give you some sort of overview of the situation. So: FTX reportedly used customers' funds to prop up Alameda Research and has now filed for Chapter 11 bankruptcy.  Yes, one of the largest crypto companies in the industry was playing with customers' money An embarrassment for the industry, but it also reminds us of what an unregulated wild west this still is. The beloved CEO of FTX, Sam Bankman-Fried, a self-proclaimed supporter of effective altruism, a friend of politicians in Washington, and the world's richest 30-year-old just a week ago, went from hero to zero. We still don't know all the details, but the most plausible explanation for the collapse of FTX is the connection to its own trading desk, Alameda Research. FTX reportedly covered up losses for Alameda with customer funds, which resul...

DeFi Summary Q3 2022

DeFi protocols have begun to shift in their business life cycle, with some dApps even showing periods of profitability  Regulatory Actions Q3 has been an active period for regulators. The US SEC claimed that it has jurisdiction over Ethereum transactions because nodes are clustered more densely in the US than in any other country. According to Ehernode's data, roughly 45% of Ethereum validator nodes operate from the US, with Germany in a distant second at 12% and Singapore at 4%. Below it shows the estimated geographic distribution of Ethereum nodes worldwide.  In August, the US Treasury sanctioned the cryptocurrency mixer, Tornado Cash. This is seemingly the first time the Treasury sanctioned a piece of code (as opposed to an individual or entity) but likely not the last. The CFTC has also been active, issuing a settlement order finding that Ooki DAO and its founders violated the Commodity Exchange Act and applying a $250k fine. The Commission defines the Ooki DAO unincorpora...

Weekly Report: 7th November 2022

Fund Flows  Mixed sentiment following the FOMC announcement last week  TD; LR: 1. Digital asset investment products saw minor outflows totaling US$15.6m last week and a bad start to the month with outflows totaling US$19m. 2. Bitcoin saw outflows totaling US$13m for the week. This follows a 7-week run of inflows and comes after FOMC raised interest rates by a further 75 basis points. 3. Short-Bitcoin investment products also saw outflows for the 3rd consecutive week totaling US$7.1m, bringing total outflows to US$28m. 4. XRP saw inflows for the 3rd week totaling US$1.1m implying improving investor confidence as the SEC case against Ripple looks increasingly fragile.  Digital asset investment products saw minor outflows totaling US$15.6m last week and a bad start to the month with outflows totaling US$19m. However, the flow activity remains very low relative to history, with this doldrum period lasting 8 weeks now. Regionally, the negative activity focussed on the Americas...

What is modular blockchain?

Currently, most functioning and public blockchains are monolithic entities. By monolithic, I mean a chain that handles data availability, settlement, and execution on its own. Now, there are some variations of monolithic chains, especially in regard to rollups on Ethereum and subnets on Avalanche that have modular components. However, those aren't modular blockchains in the most genuine sense of the word. Let's define what I mean when I say "modular" so that there are no misinterpretations. When I say modular I refer to the fact that the usually combined layers are decoupled. So what does this mean? It means that one of the three components of the chain is decoupled, so either execution, consensus, or data availability. This means that you can put the term modular on rollups since they only handle execution. While Ethereum handles everything else as a monolithic entity.  In the case of Celestia, we can put the term modular on it since it only handles data availability...