Skip to main content

Vaults as asset

In this section, we outline security considerations and recommendations for listing 4626 vaults as an asset, collateral, or loan asset.

Vault as collateral

Liquid & flashloanable 4626 assets with share price decrease

ERC4626 vaults with the following properties can incur a loss of funds.

  • Most of the shares of the vault can be flash loaned.
  • Most of the vault is liquid.
  • The vault's share price can decrease notably and instantly.

This is not specific to Morpho but a general statement for all ERC4626 vaults. Since assets deposited on Morpho can always be flash loaned, it is important to keep in mind.

The loss is bounded by:

totalLossδ11min(AWA,SLS)totalLoss \le \delta\frac{1}{1-\min(\frac{A_W}{A}, \frac{S_L}{S})}

where:

  • δ\delta is the loss on the vault (that creates the share price decrease)
  • AWA\frac{A_W}{A} is the "liquid portion of the vault"
  • SLS\frac{S_L}{S} is the "loanable portion of the vault"

Recommendations for Morpho Vaults used as collateral

For Morpho Vaults with bad debt realization (created with the MetaMorpho Factory v1.0), the share price can decrease in the event of a bad debt realization in one of the listed markets. If the vault is highly liquid, the supply queue has a specific order, and most of the shares can be flashloaned, then the liquidator of the market could amplify bad debt realized by the vault. Since using vaults as collateral increases the proportion of the vault that can be flashloaned, it could favor this amplification. Although very unlikely, it is thus not recommended using those vaults as collateral.

For Morpho vaults without bad debt realization (created with the MetaMorpho Factory v1.1), the share price of the vault can't decrease, and the above-described scenario can't happen. That said, the vault users won't have bad debt realized in their vault.

Credit to 100proof on helping the Morpho team providing those security guidelines to vault curators.

Vault as loan asset

Pricing method

One of the main consideration when onboarding an asset is what price it should have. A natural way to price vault shares is by using the exchange rate (supported by the Morpho Oracle V2). We summarise here the risks associated with using this pricing method and recommendations when doing so.

Manipulations & share price changes

General manipulations of an ERC4626 are detailed in an Euler article. Additionally, we should take into account the other possible ways that the share price of a vault can change.

We have in the general case:

  1. donations in general to ERC4626 vaults can cause a sudden price increase. Vaults can have mitigations to this, but most are vulnerable. Morpho Vaults can be affected because of supply on behalf.

  2. rounding errors (including stealth donations) can change the share price. They are not expected to be significant, including for Morpho Vaults when the vault has a large enough total assets.

And the ones specific to each vaults. For example in Morpho vaults:

  1. “economic”, known scenarios could decrease the share price on Morpho Vaults. They should be accepted by the user for what they are, so they are not considered as blocking. It includes bad debt realization for Morpho Vaults v1.0 (note that public reallocation can be an aggravating factor in this scenario) and forced market removal.

Conclusions

The price change by donation causes a price increase, so it naturally is an issue for listing a vault as a loan asset. In particular, it leads to:

  • the possibility of a future attack like the Cream hack, as soon as the position of those shares is priced
  • liquidations having an extra incentive that is extremely difficult to mitigate, resulting in borrowers taking unpredictable risks (or not joining at all).

Because of those risks, it is not recommended to list any ERC4626 vault as a loan asset in a Morpho market at the moment.