Allocate
In MORE Vaults, the concepts of allocation, rebalancing, and migration all revolve around the same fundamental actions: depositing and withdrawing.
The protocol itself does not implement or facilitate the implementation of any on-chain strategy logic; all decisions such as what assets to hold, when to rebalance, or how to exit a leveraged position are handled individually by Curators. Curators call the relevant functions in each Vault Facet to execute a strategy.
Basic Facet Mechanics
deploy()
The diamond is instructed to deploy tokens into a facet, receiving share tokens (ERC-4626) that represent their proportional claim on the facet's underlying assets. Allocation is determined off chain; the facet simply receives deposits, issues shares in exchange and records how many shares each depositor holds.withdraw()
The diamond redeems share tokens to retrieve the underlying assets in a facet.
Rebalancing is a matter of withdrawing from one facet, possibly swapping assets and subsequently, depositing those assets into the new strategy.
Exiting Leveraged Positions
If a user has an open leveraged position, it must be unwound before assets can be withdrawn. In order to avoid this complexity, users can use flash loans in a single transaction as well as the multicall to exit such a position:
Obtain a Flash Loan: Borrow enough to cover the outstanding debt.
Repay Leveraged Debt: Settle the debt so collateral is released.
Return the Flash Loan: Immediately pay back the borrowed amount.
Withdraw: With no debt, the user can now withdraw collateral from the vault (or the underlying protocol).
Re-Deposit: Optionally deposit the released assets into a new vault or strategy using another
deploy()
call.
Because all steps are bundled atomically, if any step fails, the transaction reverts and no state change occurs.
Last updated