4.1 Vaultinator

Smart Contract Functionality and Features

The Vaultinator smart contract serves as the foundation of the entire ecosystem, providing a secure and flexible vault system for digital asset management. Built on Solidity with OpenZeppelin's battle-tested libraries, Vaultinator implements several key features:

Key Features

  1. Multiple Vault Pools: Vaultinator supports multiple vault pools with different risk profiles and lock periods, allowing users to choose the strategy that best fits their investment goals.

  2. Token Whitelisting: A robust token whitelisting system ensures that only vetted assets can be deposited into the vaults, protecting users from potential scams and vulnerabilities.

  3. Flexible Deposit and Withdrawal: Users can deposit and withdraw assets with customizable parameters based on the specific vault pool's configuration.

  4. Role-Based Access Control: A comprehensive RBAC system ensures that only authorized addresses can perform sensitive operations.

  5. Emergency Safeguards: Built-in emergency mechanisms, including pause functionality and emergency withdrawals, protect user assets in case of unexpected events.

  6. Extensibility: The contract is designed to interact seamlessly with extension protocols (Liquinator, Lendinator, and Collatinator) through standardized interfaces.

Vault Pools

Vaultinator offers four default vault pools, each designed for different user needs:

Short-Term Flexible Pool

  • Lock Period: None

  • Max Withdrawal: 50% per withdrawal

  • Withdrawal Time Limit: 1 day

  • Performance Fee: 10%

  • Max Capacity: 100,000 tokens

  • Ideal For: Users who prioritize liquidity and flexibility

Long-Term 1 Month Pool

  • Lock Period: 30 days

  • Max Withdrawal: 20% per withdrawal

  • Withdrawal Time Limit: 7 days

  • Performance Fee: 8%

  • Max Capacity: 250,000 tokens

  • Ideal For: Medium-term investors seeking higher yields

Long-Term 1 Year Pool

  • Lock Period: 365 days

  • Max Withdrawal: 10% per withdrawal

  • Withdrawal Time Limit: 14 days

  • Performance Fee: 6%

  • Max Capacity: 500,000 tokens

  • Ideal For: Long-term investors comfortable with reduced liquidity

Long-Term 3 Year Pool

  • Lock Period: 3 years

  • Max Withdrawal: 5% per withdrawal

  • Withdrawal Time Limit: 30 days

  • Performance Fee: 4%

  • Max Capacity: 1,000,000 tokens

  • Ideal For: Strategic investors seeking maximum yield

Additional custom vault pools can be created by governance decisions to accommodate specific strategies or user segments.

Deposit and Withdrawal Mechanisms

Deposit Process

  1. Token Validation: The contract verifies that the token is whitelisted and that the deposit amount is within the allowed range.

  2. Vault Capacity Check: The contract ensures that the deposit doesn't exceed the vault's maximum capacity.

  3. Balance Update: Upon successful validation, the contract updates the user's balance and the vault's total balance.

  4. Deposit Timestamp: The contract records the deposit timestamp, which is used for calculating lock periods.

Withdrawal Process

Vaultinator implements a sophisticated withdrawal mechanism with multiple safety checks:

  1. Lock Period Validation: The contract verifies that the lock period has expired before allowing withdrawals.

  2. Withdrawal Limit Check: The contract ensures that the withdrawal amount doesn't exceed the maximum allowed percentage.

  3. Time Limit Enforcement: Users must wait for the specified time limit between withdrawals.

  4. Balance Verification: The contract confirms that the user has sufficient balance for the requested withdrawal.

  5. Asset Availability: If necessary, the contract recalls assets from extension protocols to fulfill the withdrawal request.

Fee Structure and Token Economics

Vaultinator implements a performance-based fee structure that aligns incentives between users and the protocol:

Fee Types

  1. Performance Fees: Charged on the yield generated by the vault, with lower rates for longer lock periods.

  2. Withdrawal Fees: Applied to early withdrawals (before lock period expiration) to discourage short-term speculation.

  3. Extension Service Fees: Charged for specialized services provided by extension protocols.

Fee Distribution

Collected fees are distributed according to the following allocation:

  • 60% to VLT token stakers

  • 20% to the protocol treasury for development and operations

  • 10% to the insurance fund for risk mitigation

  • 10% to the ecosystem growth fund for partnerships and integrations

Role-Based Access Control System

Vaultinator implements a comprehensive RBAC system with the following key roles:

DEFAULT_ADMIN_ROLE

  • Can grant and revoke all other roles

  • Controls critical protocol parameters

  • Managed through a multi-signature wallet

VAULT_MANAGER_ROLE

  • Can create and configure vault pools

  • Can update vault parameters

  • Can activate or deactivate vaults

TOKEN_WHITELISTER_ROLE

  • Can add or remove tokens from the whitelist

  • Sets minimum and maximum deposit amounts for each token

LIQUINATOR_ROLE / LENDINATOR_ROLE / COLLATINATOR_ROLE

  • Special roles for extension protocols

  • Limited access to specific functions required for their operation

This role-based system ensures that sensitive operations can only be performed by authorized addresses, enhancing the security and reliability of the protocol.