Diatomix is Revolutionizing DeFi

Diatomix
Diatomix Community
Published in
6 min readJun 2, 2023

Volatility Hedging to Counter Impermanent Loss

Understanding the Impact of Impermanent Loss

In the realm of Decentralized Finance, liquidity providers (LPs) are forced to confront the risks associated with Impermanent Loss (IL). IL represents the discrepancy in value that occurs when the price ratio of a liquidity pool’s assets diverges from the ratio at which LPs initially contributed.

Unfortunately, AMMs tend to leave liquidity providers in an unfavourable position, as the compensation they receive via trading fees often falls short of adequately covering potential impermanent loss. Consequently, LPs are left with a challenging decision when trying maximize their returns.

Let’s take a look at a simulation of impermanent loss for the ETH-USDC pair on a decentralized exchange, to truly capture the essence of this problem.

In the table above, regardless of whether or the value of ETH rises or falls against USDC, as its price changes, IL increases and a liquidity provider is always worse off than an investor who simply buys and holds.

In the chart above, we see a buy and hold position in orange compared with an LP position in blue (left side). As the price moves away from the original value of 1000 USD, in either direction, the difference between both positions increases. Again, the LP position is always lower than the buy and hold position. The right hand side illustrates the extent of impermanent loss as the prices between ETH and USDC diverge.

In 2022, the average liquidity provider on Uniswap V3 experienced an impermanent loss of $8,366 over a 6 month period. By contrast, the average fees they earned in the same period were just $4,997.When even a minor price divergence can lead to impermanent loss and reduce the value of an LP’s position, the risks of providing liquidity often outweigh the upside earned from fees and can disincentivize liquidity provision.

Conclusion: DeFi needs deep liquidity to guarantee efficient markets, but achieving this requires having a protective mechanism in place: this is where Diatomix comes in.

Enter Diatomix and a new Marketplace for Impermanent Loss

Diatomix is a game-changer for liquidity providers: it pioneers a market for impermanent loss by including volatility traders. These traders willingly pay a premium to acquire exposure to the volatility of the underlying assets within a liquidity pool. They do so using an innovative product that we can refer to as an “impermanent gain” (IG) token, which essentially allows them to hold an inverse position to the IL, thereby profiting from changes in assets prices. Similar to the VIX index in traditional finance, which measures market volatility, the IG token appreciates in value during market volatility, offering a unique risk management tool.

Liquidity providers can lend their LP tokens to diatomix, which are converted into IG tokens and sold to volatility traders so that they can place bets on IL. This new marketplace allows LPs to be more adequately compensated for IL risks. They are paid a premium by volatility traders, while they continue to earn their standard LP fees, thus creating a more balanced and lucrative system for all participants.

Besides additional APY , LPs can also decide to purchase an Impermanent Gain token equivalent to their liquidity position. This would offer an LP a true inverse position and allow them to be perfectly hedged against impermanent loss.

Volatility Trading: A new DeFi Primitive

Diatomix goes beyond repairing the existing flaws within liquidity provision on AMMs. It brings to the table a brand new DeFi primitive — tradeable volatility using perpetual fungible tokens. This revolutionary feature sets Diatomix apart from competitors, who rely on synthetic solutions, and instead offers a fully covered position.

But how does all this work in practice?

  1. The process begins with lending LP tokens. Users (liquidity providers) can access the Diatomix web application and lend their LP tokens to Diatomix, in return for additional APY.
  2. Next, Diatomix liquidates the borrowed LP token. The Diatomix pool now has a “long” position on the individual tokens that the LP provided liquidity for. But, it also a “short” position on the LP token itself (given that the pool is in debt to the user).
  3. Consequently, the Diatomix pool takes a position that is the inverse of impermanent loss.

This innovative structure allows for the issuance of the “Impermanent Gain” token, a unique mechanism that effectively counters the risk of impermanent loss. By placing an inverse bet on IL, the IG token offers a robust hedge against market volatility, thereby pioneering a fair opportunity for liquidity providers.

Conclusion: Taking a loan of an LP token and liquidating it into a buy & hold position creates a position that is the exact inverse of impermanent loss. This position can be represented by an “impermanent gain” token.

How does Diatomix make Volatility Fungible and Perpetual?

Diatomix is creating an ERC-20 token that derives its price from the impermanent loss (IL) of an asset pair for which liquidity has been provided. Two smart contracts are instrumental in creating fungible and perpetual volatility.

  1. Diatomix Volatility Contract: The base smart contract that liquidates the borrowed LP token to “long” the individual tokens and simultaneously “short” the LP token. It enables Volatility Trading using LP tokens.
  2. Diatomix ERC20 Vol Token Contract: Opens several volatility positions within the Diatomix Volatility Contract.

Illustration 1: Opening Positions Over 24 Hours

  • Example of the Diatomix ERC20 Vol Token contract opening a position hourly and holding each position for one day (24 hours).
  • A volatility trade position is opened at 00:00 at the current market price. This position is maintained for 24h, at which point it is closed and its PnL is realized.
  • This is done every hour throughout the day.
  • n.b. This illustration is true for different time scales. For example, if the positions were opened daily and held for one week.

Outcome:

  • We create a moving average of IL for an asset pair through a series of positions.
  • A single ERC20 token can represent these positions.
  • The ERC-20 is fully backed by real assets and can be redeemed at any time.
  • This token can be minted using our primary contract and redeemed at the same contract.

Implications on Business Model:

  • Diatomix’ business model does not change.
  • The fee will still be taken from the funding rate.
  • The fungible volatility token allows for unlimited growth, because users can trade Volatility and use Diatomix products without even knowing that Diatomix exists.
  • Arbitraging external markets by minting and redeeming the ERC-20 on the Diatomix platform is attractive activity for market makers.

Illustration 2: Accessing external markets using the ERC-20 token.

  • Each of the 24 open positions has their own collateral allocation.
  • To mint new ERC-20 volatility tokens collateral needs to be provided by the trader.
  • Collateral is distributed among all open positions and mints exactly the number of tokens to match the current underlying positions.
  • The funding rate is paid from this collateral and is the cause of devaluation of the volatility token during times of low volatility.
  • Volatility tokens can be redeemed at any time by sending them to the contract. Then the corresponding positions are reduced in size and the PnL of those tokens is realized, and the funds are sent to the user.

--

--