Spool Tech Docs

System Mechanics

In this section of the Technical Documentation insights will be provided into the core mechanics and functionality of the Spool Protocol. The Spool Protocol can be split up in five main parts:
The Master Spool Contract contains the necessary bookkeeping, and Strategy execution logic for the Spool Ecosystem to operate. The Master Spool maintains a book of pending actions which need to be performed for each Strategy and consecutively acted upon by a DoHardWorker.
The Spool (Vault) implementation contains a set of Strategies passed to the contract during its creation as well as an array of user-set variables regarding the functioning and parameters of that specific Spool (Vault). The allocations that comprise a Spool (Vault) are expected to be maintained by DoHardWorkers in corporation with the Risk Management Systems.
The Strategy represents the implementation of a protocol specific piece of code, meant to interface with said protocol and utilize it to increase the deposits of the Underlying Asset. A Strategy can be a complex set of instructions interfacing with multiple DeFi Protocols at the same time. In the first iterations of Spool Strategies just interface with one (1) underlying protocol.
DoHardWork is the system that compounds rewards, deals with User deposits and withdrawals, reallocates funds within Spools (Vaults) and optimizes overall gas efficiency for every Spool User.
Risk Management and diversification are core premises in the Spool Ecosystem. The Risk Management System ensures that Spools (Vaults) are diversified, "yield-over-risk" adjusted and actively maintained. This is done through a Risk Model, Risk Model Providers, and an Allocation Provider. The aforementioned terms are explained in detail under the Risk Management section.
Aside from the 5 core parts of the Spool Ecosystem, there are peripherals which contribute to the functioning of Spool. These peripherals include (but are not limited to): The SPOOL Token, the Fast Withdraw Contract, and External DeFi Protocols.