[Proposal] Creating a FEI-ETH vault migrator

Summary :

Create a migration vault so FEI holders can migrate to yearn ETH vaults.

Abstract :

Should this proposal be implemented, a vault to deposit FEI & ETH will be created. Using it (yExitFei) users could deposit their FEI&ETH to the yearn vault & wait to receive better quotes than they could obtain on the market if they were to attempt to get FEI back to ETH at a low burn rate. This will be done through market buying ETH with FEI at a low burn rate, as soon as possible after protocol reweighing.

The ETH of each users will get deposited to the v2 vault where users can withdraw it from.

An extra third of the usual performance fees on this vault will be used to reward YFI staked in governance.

Motivation :

Some FEI users got caught up in an under peg stablecoin. They have their capital trapped at an average of 20% losses in a stablecoin which allows loss free redemption for only several seconds after a liquidity reweighing. Some users want to migrate & currently incur high costs.

Data context :slight_smile:

YFI would / could act as the intermediary to help users exit their FEI position to an ETH position in a new yearn vaults at lower costs than individually selling on the market. This vault could be an ETH vault so that users of the rescue tool redeem their ETH from the vault while it earns yield for YFI.

This is due to economies of scale in allowing more users to stack up their ETH & FEI (to a cap) to have a chance in the intense Gwei war which happens several seconds after a reweighing.
This packed up sale order method together with the migration would allow YFI to receive fees from the yield of ETH which rests in yearn vaults.

Specification :

Here is a high level of how this would work. (Detailed example below)

  1. User deposits ETH & FEI into a yearn smart contract. (ySC)
  2. ySC mints yExitFEI tokens (yEF) and gives it to user. (the amount minted is {[price of ETH * quantity of deposited ETH] / total amount of value in the pool} * number of yEF in circulation )
  3. ySC checks whether calling the function sellFei would result in a reverted transaction (maxPenalty, amountIn, amountOutMin, address to, uint256 deadline from https://etherscan.io/address/0x9271d303b57c204636c38df0ed339b18bf98f909#code#F1#L92) due to maxPenalty or amountOutMin
    3.a if the tx would get reverted, the tx is dropped & replaced at a higher price with ETH from the ySC until the quoted transaction price would be larger than the ETH deposited in the ySC
  4. ySC takes the FEI and buys ETH from the FeiRouter
  5. User redeems their yEF tokens. They would get back [number of yEF redeemed / total yEF outstanding] * pool NAV in ETH. They would also get back a % point of the quantity of ETH that they initially deposited to the contract. There should be some ETH available in the ySC to set up later transactions

The general process begins with user depositing ETH & FEI into the smart contract. Then the smart contract mints yExitFei(yEF) tokens and gives it to the user. The yEF token represent a percentage claim of the total value of the “fund” which we will call pool here along with the quantity of ETH that the user deposited for the gas pricing of the pool. So 1 yEF with 100 yEF outstanding would represent a 1% of the total value (NAV) of the pool. The pool holds ETH & FEI. It uses FEI only to buy ETH.

Since a large gas cost (several ETH) may be needed for the transaction to get confirmed at a good price & low burn rate, the vault requires some minimum ETH to effectively compete in the gas war after pegging. With less gas, then it cannot effectively compete in the bidding war for the amount deposited in the vault, thus needing to either avoid the transaction or take the quote of the higher burn & lower price rates.

The ySC requires a price feed to check whether the transaction could be executed

The internal price of yEF is only needed to be calculated when users deposit and withdraw ETH from ySC.

Lastly, after a sale of FEI to ETH is succesful, yEF tokens could be redeemed back for ETH proportional to the FEI & remainder of ETH deposited initially.

The time period in which the transaction could be conducted is low (40 seconds) for receiving small (>5%) burn rates

Below is an example from the first reweight:

In the example, within one minute (12:19:14-12:20:10) the burn rate gets up to 4% of the sold FEI, thus a sale of $1000 worth of FEI losing the buyer $40. The burn rate shoots up higher to more than 10% within minutes which is also a coincidental with price drops, thus a $1000 worth of FEI losing the buyer of ETH $150. Investors could crowd in their risk of selling at reweight times using this vault.

Instead, using yExitFei users could deposit their FEI&ETH to the yearn vault & wait to receive better quotes than they could obtain on the market if they were to attempt to get FEI back to ETH at a high burn rate, of up to 53% at the time of writing.

If this product is successful with a smaller test vault capped in FEI (1 million), it can help direct a share of capital which is currently kept from its users due to the unpredictability of the reweight times, gas costs & high burn penalties that happen less than minute into the reweight.

yExitFei migrator vault
  • For: Create a yExitFei product with the above strategy.
  • Against : No change.

0 voters


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.