Designing a Vault

Vault designers should think through the following set of questions.

Formulation

What is the yield strategy that the vault will pursue?

Example: Cross Currency fCash, allows accounts to arbitrage Notional fCash stablecoin interest rates by borrowing in either USDC or DAI when it is cheap and lending it back on Notional at the same maturity. Accounts will capture a return based on the difference between the borrowed and lent interest rates multiplied by the leverage ratio allowed in the vault.

Is there sufficient yield and capacity in the particular strategy to necessitate building a vault?

Building and maintaining a leveraged vault is an expensive process, it requires ongoing liquidation bots and risk analysis. Governance will only list strategies that will be able to generate sufficient yield for users and revenue for the protocol.

Will borrowing multiple currencies inside a single strategy reduce risk and/or yield higher returns? (i.e. borrowing both sides of a two token LP pool)

Vaults allow borrowing in up to two secondary currencies, however, these require additional handling when it comes to building the vault.

Will the same yield strategy be re-usable across various currencies? (i.e. will there be multiple instances of the vault that borrow different currencies to pursue the same strategy?)

Example: a yield strategy that provides liquidity on Uniswap V2 which has two instances for both USDC/ETH and DAI/ETH pairs. If so, this will not be a problem but governance would need to whitelist multiple vaults.

Liquidity

Are there any lock ups or other mechanics that would prevent funds from being withdrawn from a yield strategy?

This is not necessarily a showstopper, however, consideration must be given to whether or not there would be a liquidator that would have sufficient capital to purchase under-water positions while they are illiquid.

Is the yield strategy position able to be tokenized as an ERC20 fungible token?

If no, analysis needs to be done to see whether or not the strategy can fit into the leveraged vault framework.

Is there trading between the borrowed currency and a different currency required?

If trading is required (most strategies will require trading to some extent), is there sufficient liquidity in the required trading pairs? Are there any conditions where liquidity would dry up for the required pairs and thus the vault would not be able to safely exit its position back to the borrowed currency?

Will the yield strategy require harvested tokens to be sold at regular intervals?

If yes, ideally the harvesting could be done without requiring whitelisted admin access.

Mechanics

What will happen when an account enters and exits this yield strategy?

Describe the steps required to convert an amount of borrowed tokens into the desired yield strategy token and the steps required to unwind that yield strategy token back to the borrowed token.

Can accounts “roll” their position forward to a longer term maturity prior to settlement?

If the underlying yield strategy is perpetual (i.e. non-maturing) this is generally considered a desirable feature.

Are yield strategy tokenized positions fungible between borrowed maturities?

If the yield strategy is perpetual, the answer is likely yes. If the yield strategy has maturities, further analysis would be required. This is a requirement for allowing accounts to roll their position forward.

Valuation

How will the vault calculate the oracle spot price of a single yield strategy position denominated in the borrowed currency?

It is important to ensure all variable inputs into the spot price calculation cannot be easily manipulated. Manipulate resistant sources include:

  • Variable money market exchange rates (i.e. Compound exchange rate and aToken reserve normalized income)

  • Chainlink Price Oracles

  • TWAP oracles where there is sufficient liquidity

  • Notional fCash oracle interest rates

  • Spot claims on LP tokens when calculated using internal accounting

Sources that are NOT manipulation resistant include:

  • Variable money market supply rates (can be manipulated via flash loans).

  • TWAP oracles with insufficient liquidity.

  • Spot claims based on balanceOf and totalSupply information (i.e. relying on accounting external to the yield generating protocol). This includes protocols that do not maintain their own accounting systems and rely on these as well.

Is the spot price of a single yield strategy position the same between all accounts? (i.e, are there any factors that would cause the same yield strategy position held by two accounts to be valued differently?)

Ideally this would be the case. If it is not the case, it would have to be ensured that liquidators would be able to profitably liquidate the position given the changing valuation and the tokens change hands.

Risk

Have all protocols involved undergone sufficient security review?

Smart contract risk is an existential risk to vaults. Vaults can only integrate with protocols that have undergone extensive security review and have been in operation without incident for a sufficient length of time.

Can the yield strategy position decrease in value relative to the borrowed currency?

The answer is likely yes for any strategy that generates sufficient yield. It will be important for risk analysts to understand the various conditions that would cause a position to decrease in value.

During liquidation, can a yield strategy position be freely exited to the borrowed currency by any liquidator? (i.e. can a liquidation be fully completed in a single transaction using a flash swap?)

Ideally the answer is yes such that there will be a robust liquidation ecosystem. If the answer is no, please describe how the yield strategy may be encumbered and how accounts would be liquidated.

Are there any emergency conditions that would require the vault to exit the yield strategies rapidly (beyond liquidation of individual accounts) in order to maintain solvency?

Some example conditions would be deteriorating liquidity for a given token trading pair required to exit the strategy. This may occur without causing any accounts to become under collateralized (i.e. liquidity could evaporate without necessarily changing oracle prices on chain). If this condition exists, the vault may not be able to fully exit its position prior to settlement without incurring excessive slippage and would need to emergency exit its position before liquidity disappears.

What conditions would render the vault insolvent?

Are there any other conditions that pose existential risk to vault funds

Settlement

Upon maturity, all vaults must be settled in order to repay outstanding debt within 24 hours of maturity.

Can yield strategy positions be freely converted to the borrowed currency (minus slippage) prior to maturity for settlement?

This is a requirement for every vault. Ideally, this settlement process can be run without any whitelisted admin accounts.

Is the yield strategy perpetual or does it have defined maturity dates?

If it has defined maturity dates, can they be aligned to mature with Notional fCash maturities? If not, that will be a problem when it comes to vault settlement if the vault is unable to convert strategy tokens back to borrowed tokens at the Notional fCash maturity.

Last updated