Structured Vaults
Last updated
Last updated
The main problem with making lending markets for RWAs is the lack of secondary market liquidity. This prevents looping and, worst of all in the case of RWAs, prevents liquidations.
To solve for this, Mystic has come up with a novel lending primitive: structured vaults. These vaults, built atop of Morpho's infrastructure, essentially mimic a real-life credit product by splitting supply into Senior and Junior Tranches to better process RWA liquidations.
At their most granular, they are isolated pools or otherwise Morpho markets on Mystic. However, something has been added to them: each market is tied to one or multiple vaults called safety vaults. Built on the ERC-4626 standard, these vaults accept only one token each and act as first-loss capital for the market: in case of liquidation/bad debt, safety vaults take the loss first to protect the market.
Curators tie a number of safety vaults at their discretion to each market, creating effectively a composable Safety Module (sets of safety vaults) for each market. Since each safety vault can protect more than one market, this enables an interesting dynamic - shared safety. Curators can now protect each other's markets or multiple of their own markets with the same safety vault. Let's look at an example:
In this example, lenders can supply WETH to the market (Senior position) and then stake their receipt token in each safety vault to protect the respective markets (Junior position). They can also supply USDS in Safety to have a Junior-only USDS position. In this case, the pxETH/WETH market has two safety vaults and each vault in the example protects only one market. Let's look at another example:
In this second example, two markets share a USDT safety vault. Depositors of that shared safety vault get cumulative yield for both markets that the vault secures. In case of liquidation, both markets get to tap into the vault for first-loss capital, and the order in which they may do so is defined below in realization mechanisms.
Curators can choose to incentivize the safety vaults with rewards or assign a percentage of the market's supply yield that goes only to safety vault participants. To note, rewards are cumulative - a safety vault protecting two markets will earn rewards for both of them, as it is taking on extra risk.
In the event that a safety vault has the same asset as the borrow asset of a market it is covering, the vault manager can call for a liquidity extension - moving funds from the safety vault to the market, so they may be borrowed. This enables the safety vault to effectively act as a Junior Tranche, as its participants may also become lenders. Liquidity extensions need to be enabled per safety vault and the vault's asset must be the same as the market's borrow asset (e.g. a USDC vault covering a USDe/USDC market).
In case of defaults, first liquidation bots active on each market will participate to liquidate the market. Only in case they do not participate or the asset is illiquid will the Mystic liquidation process trigger. In this case, two things happen sequentially:
First, Mystic Dutch auctions the collateral with whitelisted parties up to the asset's liquidation threshold. If all the debt is solved this way, the liquidation is thereby settled. If not, liquidation then falls to the market's safety vaults.
If bad debt reaches a market's safety module, debt is then realized according to the market's realization mechanism. Upon realization, the respective receipt tokens are burned / withdrawn for their respective assets to cover the necessary debt. Mystic itself handles this process.
If only one safety vault is associated with a single market, then it is immediate that it takes any loss that happens. However, it may happen that one vault is covering multiple markets or that one market is being covered by multiple vaults. In these scenarios, two realization formats are possible:
Automatic realization: all vaults covering a market equally share the loss.
Tiered realization: vaults cover a percentage of the debt proportional to the yield they receive per market, meaning highest-paid vaults get liquidated first. Let's look at two examples:
Let's say a single market is covered by two vaults, one of $5M earning 10% APY and one of $10M earning 15% APY (because the vault manager incentivized them differently). In this case, the vault earning 15% gets liquidated first in proportion to its yield difference. The $5M vault is still responsible to cover the debt, only a smaller percentage of it.
Let's say a single vault is covering two markets, and both get liquidated simultaneously. In this case, the market paying more to the vault gets prioritized and is covered first. If both vaults pay the same, then the vault equally covers both markets.
Vault managers decide which realization mechanism they want to apply to their markets.
Market lenders unlock additional utility on their receipt tokens while maintaining total transparency and control.
RWA liquidations are now possible, and with them, the introduction of RWAs in DeFi.
Markets unlock new customizable security systems that combine different assets across vaults.
Curators earn by taking a performance fee on yield generated by their curated vaults.
This whole architecture was built to be extremely flexible and scalable - new vaults can be added permissionlessly according to curator need. In addition, the whole system is extremely capital-efficient and modular, as the same asset can protect more than one market at the same time and risks can be closely managed according to curator and market preferences.