Spool (Vault) Mechanics
A "Spool (Vault)" is referred to in the codebase as a "Vault" and its respective implementation is in the Vault.sol contract.
The Spool (Vault) implementation contains a set of Strategies that are passed to it during its creation as well as a configurable set of allocations for each Strategy, a Risk Model, a Risk Appetite and User-given Fee inputs. A Spool its allocations to different Strategies are expected to be maintained by the Allocation Provider who adjusts these allocations depending on changing underlying dynamics. The Spool (Vault) implementation essentially is a custom "vault" designated to be used as an overarching portfolio management tool.
- Allowing end-users to create tailor made vaults
- Storing the following User Inputs:
- Included Strategies
- Selected Risk Appetite
- Selected Risk Model
- Storing and executing Fee payouts
The Spool Creator must supply:
- A whitelisted deposit currency of choice: USDC, USDT or DAI
- A selected Risk Model
- A Risk Appetite (Number between 0 and 10)
- Internally the number gets converted to an integer between (-10 and 10)
- A selection of Strategies that this Spool will use, up till 18
All these settings are constants after the Spool its creation and cannot be modified. Any user can be a Spool Creator.
- Adhering to the User-given parameters upon creation
- Allowing for active fund management and asset deployment
Inherits contracts sequentially: Vault, VaultRestricted, VaultIndexActions, RewardDrip, VaultBase, VaultImmutable
- Spools (Vaults) are proxy contracts
- Can be upgraded
- Point to Spool implementation
- This is done to achieve lower gas costs during Spool (Vault) creation
- And in order to achieve upgradability
- Withdrawing from a Spool is not possible prior to the first DoHardWork after a deposit
- Example: Deposit > DoHardWork > Withdraw
- Deposits and Withdrawals are asynchronously realized
- Between an allocation adjustment and its realization:
- Withdrawals are prohibited
- Deposits are allowed
- During early iterations of Spool an allocation adjustment and realization happens within the same block
- Performance Fees are deducted during the claim of a withdrawal
- Withdrawal is a two-step process
- Exception is a fast withdrawal
The Master Spool Owner (The Spool DAO) can change the Spool its owner, the Spool owner themselves can also transfer ownership.
The Master Spool owner is the Spool DAO, by design it can transfer Spool ownership to another address. There are multiple reasons for this. Most importantly to remove a bad actor as a Spool owner (e.g. a Spool owner could add vault incentive rewards that reverted, effectively adding additional costs to using that particular Spool (Vault)).