Spool Tech Docs
Search
K

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.

Overview

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.

Purpose

  • 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

Functional Requirements

The Spool Creator must supply:
All these settings are constants after the Spool its creation and cannot be modified. Any user can be a Spool Creator.

Expected Output

  • A Spool (Vault) on-chain Smart Contract
  • Adhering to the User-given parameters upon creation
  • Allowing for active fund management and asset deployment

Relevant Entities

Relevant Implementations

Implementation: Vault.sol
Inherits contracts sequentially: Vault, VaultRestricted, VaultIndexActions, RewardDrip, VaultBase, VaultImmutable

Fact Sheet

  • 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
      • This is achieved through Flash Bots (external link)
      • The information here is for future reference
  • Performance Fees are deducted during the claim of a withdrawal
  • Withdrawal is a two-step process
    • Exception is a fast withdrawal

Spool Ownership

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)).