UPDATED: Details of the Defrost Finance Refund Plan

Defrost
7 min readJan 1, 2023

--

Important notice

All users are kindly asked to carefully read the following refund plan and check the refund amount corresponding to their affected address here.

This document will be public for 7 days, from January 1, 2022, to January 7, 2022, for users to check the data ahead of the final confirmation.

UPDATE: addressing the issue of Platypus liquidity providers

Following a careful examination of the data, the Defrost team has decided to slightly modify the original refund plan to address issues with LPs on Platypus.

In brief:

  1. Refunds to vault depositors will stay unchanged.
  2. The following are adjustments to H2O liquidity providers on Platypus:
  3. Both USDC and H2O contributors in the Platypus H2O Pool will get refunded, proportionate to the LP-USDC-H2O and LP-H2O shares in the pool.
  4. The refund weight for USDC contributors is calculated according to the loss of 27,614 USDC during the attack. To be more specific, 20,711 USDC remained after the attack, down from 48,325 USDC before the hack.
  5. Platypus mining contracts have been identified. These contracts have no weight and will get zero refunds. The users are tracked to the address if they were mining.

Introduction

As announced, after recovering the funds of Defrost V1 from the hacker(s), the team converted this ETH into DAI and cross-chained it to the Avalanche mainnet. The total balance to be refunded to V1 users is 12,850,277 DAI.e.

Refunding rules

After carefully examining the smart contracts and interoperated protocols before the attack, the team has come to the conclusion that it is not possible to rebuild the on-chain records or resume the protocol as it was just before the hack. Therefore, we plan to refund all Defrost V1 vault holders and H2O holders (here and below including H2O liquidity contributors) in stablecoins (DAI.e), according to their positions just before the exploit happened, similar to liquidating the whole protocol.

Two types of users and their corresponding rewards

The Defrost V1 is a protocol that allows users to utilize liquidity pool (LP) tokens and other pool tokens from Avalanche protocols as collateral for generating H2O. It has two vital parts, the vaults collecting collateral for generating H2O and the H2O token itself, which circulates on the market. Therefore, in order to be fair to all users affected, the refund will cover both vault participants and H2O holders.

  1. Vault participants deposit LP assets in Defrost V1 vaults as collateral for generating H2O. In other words, as far as contributors in the vault are concerned, the LP deposited are assets while the H2O generated is debts. Net value = Assets — Debts. The net value of the vault participants will be fully refunded in stablecoins (DAI.e).
  2. Over time, H2O holders acquired the soft-pegged token for a variety of purposes, including leveraging their positions, participating in H2O mining, getting transaction fees by providing liquidity to dexes, or speculating on the price of H2O itself when de-pegging occurred. In doing so, H2O holders have taken on the risk of a potential H2O price fluctuation and the uncertainty related to the token’s liquidity depth. After refunding V1 vault participants by their net value (see above), all remaining funds will be refunded to H2O holders proportionately.

Determining the ‘fair value’ of H2O in the vaults’ debt

Due to the dynamic nature of the Defrost V1, the H2O market price is determined by several market dynamics, including the depth of the liquidity pool, collateral adequacy in the vaults, looping activities chasing leveraged mining returns, market arbitrageurs, price speculators, and more.

Before the attack, the total size of the H2O liquidity pool was merely 1.4 million USD (roughly), with the majority sitting in the Curve pool. Due to Curve’s peculiar algorithm, the USD assets in the pool, other than H2O, were only around 100K. Under such circumstances, it was impossible to provide enough liquidity for the whole H2O market, which had over 10 million in total supply.

For instance, if a user wanted to sell H2O for another stablecoin, the price would drop dramatically. The same would happen if a user were to buy, therefore increasing the price significantly.

Some would argue the shallow depth of H2O liquidity could undermine the market price, making it seemingly unfavorable to themselves. But please bear in mind that the negative effect of liquidity affects both sellers and buyers in the market.

Therefore, it would not be right to use the ‘market price’ of H2O as the fair price at the time of the hack, as this would be biased due to the shallow liquidity.

However, it would also be unfair to use 1 USD per H2O as the debt value for the vault participants. H2O is backed by the assets in the vaults and by the time the attack struck, H2O had been trading under 1 USD for a long time on the market.

It must here be considered that there were collateral losses to the vaults during the Terra/UST crash earlier this year, which lead to 923,081.08 units of H2O backed by the UST/USDC — Pangolin (SV_II) vault actually being backed by almost zero value. This became bad debt in the system and should be considered as a factor putting downward pressure on the fair price. In other words, the theoretical fair value of H2O should also take into account collateral adequacy.

The total H2O debt in the V1 vaults was 13,012,640.80, of which, 923,081.08 units were bad debt. Therefore, the theoretical fair value of H2O will be (13,012,640.80–923,081.08)/13,012,640.80 = 0.929 USD.

We intend to use 0.929 USD/H2O as the unit value of adjusted H2O debt in the refund calculation. (For more details, please feel free to check the G column, named ‘Adjusted H2O Debt considering H2O fair value’ in the ‘Vault Refund’ sheet in the shared excel file.)

Information concerning the on-chain record scanning

Avalanche Block Height: 24058932

Scanning Scope: all V1 vault users, H2O holders, and H2O liquidity contributors

Records: [https://docs.google.com/spreadsheets/d/15F9exZqXk-Ok4F1rBtIqgTGhB6QNX8oUv0Wx-IRt78I/edit?usp=sharing]

Notes concerning the refunding of vault participants

  • The value of all vaults is calculated in USD no matter what the underlying assets are.
  • The refund is calculated according to the net value of each address.
  • Net value per address = Collateral Value in USD — the amount of H2O minted as debt adjusted by the fair price. (0.929, see above.)
  • If a vault did not mint any H2O, or the H2O minted as debt is zero, this means the vault could not have been liquidated during the attack, as there was no outstanding debt. In this case, the vault did not suffer any losses, needs not to be refunded and therefore has been deleted from the excel file records.
  • UST/USDC — Pangolin (SV_II) vaults have been deleted, as they are not liquidatable and need not be refunded due to the previous Terra / UST collapse.
  • Vaults marked as withholding in the ‘Vault Refund’ sheet are vaults established in V1 but with no liquidation records on-chain during the exploit event. It is uncertain whether these vault owners are suffering any loss. Therefore, the net vault of these vaults was withheld and should be analyzed, evaluated and communicated one by one. The withholding amount is only 0.1% of the total refund.

Notes concerning the refund of H2O holders

  • H2O holders interacted with four contracts in Dexes, including Curve, Platypus, Trader Joe, and ELK. We have calculated users’ H2O weight from the related contracts. Please notice that if you had H2O on a dex, you should check your address under the relevant dex name in the excel form as opposed to looking for it among H2O holder refunds.
  • H2O liquidity contributors will be able to claim their refund directly, just like H2O holders.
  • LPs in Curve, Platypus, Trader Joe, and ELK will have different weights when refunding. The weight of LPs in Trader Joe and ELK is doubled since another paired asset was needed when providing liquidity on those platforms. The weight of LPs in Curve is applied to the number of LP tokens in Curve as the unit value of the LP tokens is close to 1 USD.
  • Both H2O and USDC contributors on Platypus are affected by the attack. H2O contributors’ weight is the same as their LP-H2O liquidity pool tokens. The weight for refund is allocated proportionately to the LP-USDC-H2O liquidity pool tokens in the pool. The total loss for the USDC contributors in the H2O pool is 27,614 USDC, considering 20,711 USDC remained after the attack, down from 48,325 USDC before the hack.
  • The Defrost mining contracts in Curve and Platypus mining contracts in the Platypus pools have no weight and get zero refund in the calculation as they were already accounted for among the normal LPs.
  • Small H2O holders, with a balance of less than 1 USD, will be deleted.
  • The H2O savings pool is also regarded similarly in the spreadsheet.
  • 0x82a4ffabae9ed1401ac8e53d9c4dd4cd88c9b08c is the Defrost protocol fee account, which is now controlled by the hacker(s). This address is manually changed to 0x8457ad2f99766ee5837f198191b5967cd6a3d474.

How to check your refund & examples

Users should check their address on the excel spreadsheet under the corresponding section depending on their type of refund. There are three categories — “Vault Refund”, “H2O Holder Refund”, and “H2O in DEXes”. Some may have to look at multiple sections, depending on where their assets were located.

  • For example, let us suppose Lucy deposited assets in the USDT vault and minted H2O, then sold all of it for other assets before the hack. She will need to find her address and check her refund in the “Vault Refund” section of the spreadsheet.
  • Tom, instead, bought H2O on the open market and held it in his wallet. He will look for his address and corresponding refund in the “H2O Holder Refund” section of the sheet.
  • If Andy bought H2O directly on the market and deposited it into a DEX as liquidity, or was in the savings pool, he will need to look under the “H2O in DEXes” section of the document. (Please notice that users who directly added liquidity in Curve or in the previous Defrost mining pool, should also check their refund in the DEXes section.)
  • Finally, assuming Helen deposited assets in the Defrost vault to mint H2O and then kept part of her H2O in her wallet but deposited part of it on a DEX, she will need to check her address under all three sections — “Vault Refund”, “H2O Holder Refund”, and “H2O in DEXes”.

--

--

Defrost

Decentralized leveraged trading on #Avalanche. Use a unique yield-aggregating supervaults to maximize the returns on liquidity and trade with ease. Coming soon.