Vaultinator Facet Overview

The Vaultinator Facet serves as the core component of the Vaultinator Protocol, providing fundamental vault management functionality and coordinating interactions between specialized facets.

Architecture

The Vaultinator Facet follows a modular architecture that enables seamless integration with other facets while maintaining a clear separation of concerns:

┌─────────────────────────────────────────────────────────────┐
│                     Diamond Contract                        │
└───────────────────────────┬─────────────────────────────────┘

                ┌───────────┴───────────┐
                │                       │
┌───────────────▼───────────┐   ┌───────▼───────────────┐
│    Vaultinator Facet      │   │  Specialized Facets   │
│  (Core Functionality)     │   │                       │
│                           │   │  ┌─────────────────┐  │
│  - Vault Management       │◄──┼──┤  Yieldinator    │  │
│  - Asset Management       │   │  └─────────────────┘  │
│  - Access Control         │   │  ┌─────────────────┐  │
│  - Cross-Facet Coordination◄──┼──┤  Collatinator   │  │
│  - Protocol Administration│   │  └─────────────────┘  │
│                           │   │  ┌─────────────────┐  │
└───────────────────────────┘   │  │  Stakinator     │  │
                                │  └─────────────────┘  │
                                └───────────────────────┘

Core Components

1. Vault System

The vault system is the foundation of the Vaultinator Protocol, providing secure storage and management of digital assets:

  • Vault Types:

    • Personal Vaults: Single-user vaults for individual asset management

    • Shared Vaults: Multi-user vaults with configurable access control

    • Institutional Vaults: Enterprise-grade vaults with advanced features

  • Vault Configuration:

    • Customizable vault parameters

    • Strategy assignment for automated asset management

    • Fee settings and distribution rules

2. Asset Management System

The asset management system handles all operations related to assets within vaults:

  • Supported Asset Types:

    • ERC-20 tokens (fungible tokens)

    • ERC-721 tokens (non-fungible tokens)

    • ERC-1155 tokens (semi-fungible tokens)

    • Native ETH (with automatic wrapping/unwrapping)

  • Asset Operations:

    • Secure deposit mechanisms

    • Controlled withdrawal processes

    • Inter-vault transfers

    • Asset swaps and exchanges

3. Access Control System

The access control system ensures that only authorized users can perform specific actions:

  • Role-Based Access Control:

    • Predefined roles (OWNER, MANAGER, DEPOSITOR, WITHDRAWER)

    • Custom role creation and assignment

    • Role hierarchy and inheritance

  • Multi-Signature Authorization:

    • Configurable signature thresholds

    • Time-locked execution for critical operations

    • Signature verification and validation

4. Cross-Facet Coordination

The cross-facet coordination system enables seamless interaction between different facets:

  • Facet Registry:

    • Central registry of active facets

    • Facet capability discovery

    • Version tracking and compatibility checking

  • Inter-Facet Communication:

    • Standardized message passing

    • Event-based notifications

    • Callback mechanisms for complex operations

5. Protocol Administration

The protocol administration system provides tools for managing the protocol:

  • Fee Management:

    • Configurable fee structures

    • Automated fee collection

    • Fee distribution to stakeholders

  • Protocol Parameters:

    • Global configuration settings

    • Facet-specific parameters

    • Upgrade controls and versioning

Implementation Details

Storage Layout

The Vaultinator Facet uses a structured storage layout following the Diamond pattern:

Function Selectors

The Vaultinator Facet provides the following function selectors for Diamond registration:

Integration with Other Facets

Yieldinator Integration

The Vaultinator Facet integrates with the Yieldinator Facet to enable yield generation on vault assets:

Collatinator Integration

The Vaultinator Facet integrates with the Collatinator Facet to enable collateralized positions:

Stakinator Integration

The Vaultinator Facet integrates with the Stakinator Facet to enable staking:

Security Considerations

The Vaultinator Facet implements several security measures:

Access Control

All vault operations are protected by a role-based access control system:

Reentrancy Protection

All functions that interact with external contracts use reentrancy guards:

Pausability

The protocol can be paused in emergency situations:

Event System

The Vaultinator Facet emits events for all significant actions to enable off-chain monitoring and indexing:

Future Enhancements

The Vaultinator Facet roadmap includes several planned enhancements:

  1. Advanced Vault Strategies: Implementation of automated vault strategies for optimal asset allocation

  2. Cross-Chain Vault Support: Extension of vault functionality to multiple blockchains

  3. Vault Analytics: Enhanced reporting and analytics for vault performance

  4. Vault Templates: Predefined vault configurations for common use cases

  5. Social Recovery: Implementation of social recovery mechanisms for vault access