const vaultConfig: VaultConfig = { maxCap: new BN("18446744073709551615"), // Uncapped (u64 max) — see warning below startAtTs: new BN(0), // Activation timestamp (0 = immediate) lockedProfitDegradationDuration: new BN(86400), // 24 hours in seconds managerPerformanceFee: 1000, // 10% in basis points adminPerformanceFee: 500, // 5% in basis points managerManagementFee: 50, // 0.5% in basis points adminManagementFee: 25, // 0.25% in basis points redemptionFee: 10, // 0.1% in basis points issuanceFee: 10, // 0.1% in basis points withdrawalWaitingPeriod: new BN(0), // Waiting period in seconds (0 = immediate)};const vaultParams: VaultParams = { config: vaultConfig, name: "My Voltr Vault", // Max 32 characters description: "Short vault strategy description", // Max 64 characters};
Critical: maxCap of 0 means ZERO capacity, not unlimited. Setting maxCap: new BN(0) will prevent all deposits. For an uncapped vault, use new BN("18446744073709551615") (u64 max value).
Description limit: The description field is limited to 64 characters. Exceeding this limit will cause the vault creation transaction to fail.
Key Management: Keep admin and manager keys separate. Use different keypairs for different environments. Never commit private keys to version control.
Fee Configuration: Management fees typically 0.25% - 2% (25-200 basis points). Performance fees typically 5% - 20% (500-2000 basis points). Consider the impact on user returns.
Asset Handling: Validate token decimals match between asset and LP tokens. Set appropriate maxCap to manage risk. Account for minimum deposit requirements.
Error Handling
Initialization Failures: Verify account rent exemption. Check authority permissions. Ensure description is within 64 characters.