Strategies
Strategy Contracts define the economic parameters and risk management rules for Flux vaults. They determine interest rates, collateralization requirements, allowed assets, and liquidation behavior.
What is a Strategy?
A Strategy is a smart contract that implements the IStrategy interface and provides:
Interest Rates: How much managers pay to borrow capital
Risk Parameters: Minimum bond ratios, liquidation thresholds
Asset Allowlist: Which wrappers managers can use
Fee Structure: Protocol fees, curator fees
Liquidation Behavior: Profit margins for liquidators
Think of strategies as "economic policy modules" that vault creators can plug into their vaults.
Why Strategies?
Strategies separate economic policy from vault logic:
Modularity
Vaults handle position tracking and accounting
Strategies handle economic rules and risk management
Clean separation of concerns
Flexibility
Different vaults can use different strategies
Vault creators choose risk/return profiles
Permissionless strategy deployment
Immutability Options
Immutable strategies: Parameters locked forever (no governance risk)
Mutable strategies: Parameters updatable with timelock (flexibility)
The IStrategy Interface
All strategies implement:
Strategy Extensibility: Beyond Oracle Prices
The evaluateLiquidation() and evaluateADL() functions provide powerful extensibility beyond simple oracle-based health checks. Custom strategies can implement holistic risk assessment by incorporating:
On-Chain Data:
Oracle prices (Chainlink, etc.)
On-chain liquidity depth and slippage analysis
Historical volatility calculations
Cross-protocol position correlations
Off-Chain Data Feeds:
Chainlink Functions for custom computations
API3 first-party oracles
UMA's optimistic oracle for complex assertions
Custom data via decentralized oracle networks
Advanced Risk Logic:
Time-based conditions (e.g., no liquidations during high volatility periods)
Multi-factor risk scoring (liquidity + volatility + concentration)
Strategy-specific risk models (e.g., impermanent loss for LP positions)
Circuit breakers based on market conditions
Example: Advanced Liquidation Logic
This extensibility allows strategies to implement sophisticated risk management that goes far beyond simple collateral ratio checks.
Built-In Strategy Types
1. ImmutableFixedRateStrategy
Parameters are set at deployment and cannot be changed.
Use Case: Maximum security for depositors - no governance risk.
Deployment:
Key Features:
Parameters immutable forever
Assets cannot be removed (only added via mutable variant)
No governance risk for depositors
Ideal for conservative vaults
2. MutableFixedRateStrategy
Parameters can be updated with 7-day timelock.
Use Case: Flexibility to adapt to market conditions while giving depositors time to exit.
Deployment:
Updatable Parameters:
Annual rate (interest rate)
Curator fee rate
Allowed assets (can add, cannot remove)
Timelock Protection:
3. MutableFlexibleMarginStrategy
Advanced strategy with flexible margin requirements.
Features:
Dynamic bond ratios based on position composition
Advanced ADL (Auto-Deleveraging) logic
Configurable risk buckets
Use Case: Sophisticated vaults with complex risk management needs.
Key Strategy Parameters
1. Minimum Bond Ratio
Definition: Minimum collateral a manager must post to borrow capital.
Example:
Manager wants to borrow 100K USDC
Required bond:
100K × 20% = 20K USDCEffective leverage:
5x(100K / 20K)
How It's Used:
2. Liquidation Buffer
Definition: Safety margin before position becomes liquidatable.
Liquidation Threshold Calculation:
Position Health:
Example:
Manager's total position value: 55K USDC
True debt (principal + interest): 50K USDC
Health ratio:
55K / 50K = 1.1(110%) ✓ Just healthyIf value drops to 54.9K:
54.9K / 50K = 1.098(109.8%) ✗ Liquidatable!
3. Annual Rate
Definition: Interest rate managers pay on borrowed capital.
Conversion to Per-Second Rate:
Interest Calculation:
Example:
Manager borrows 100K USDC
Annual rate: 10%
After 1 year:
100K × 1.10 = 110K USDC(assuming no compounding)Interest owed: 10K USDC
4. Curator Fee Rate
Definition: Percentage of interest paid that goes to vault creator.
Fee Distribution:
Calculation:
5. Liquidation Profit Margin
Definition: Profit liquidators earn when liquidating underwater positions.
Liquidation Payment Calculation:
Case 1: Healthy Position (collateral ≥ debt)
Case 2: Underwater Position (collateral < debt)
Example:
Manager's collateral: 45K USDC (underwater!)
True debt: 50K USDC
Liquidation profit margin: 1%
Liquidator pays:
45K × (1 - 0.01) = 44.55K USDCLiquidator receives: 45K USDC collateral
Liquidator profit:
45K - 44.55K = 450 USDC(1%)
6. ADL Parameters
Auto-Deleveraging (ADL) forces position closure when vault utilization is too high.
ADL Threshold
Position can be ADL'd when:
ADL Utilization Threshold
Example:
Vault utilization: 96% (above 95% threshold)
Manager's health ratio: 1.15 (115%, below 120% threshold)
Result: Position can be ADL'd to reduce vault utilization
Why ADL?
Protects LPs when vault is nearly fully utilized
Ensures liquidity for withdrawals
Prevents vault from becoming "stuck"
Asset Allowlist
Strategies define which asset wrappers managers can use.
Immutable Strategy Allowlist
Check During Unlock:
Mutable Strategy Allowlist
Why Can't Assets Be Removed? Removing an asset would break existing manager positions using that asset.
Strategy Evaluation Functions
evaluateLiquidation
Called by vault at end of unlock() callback to check position health.
evaluateADL
Checks if position can be auto-deleveraged due to high vault utilization.
Deploying Strategies
Using StrategyFactory
The StrategyFactory enables permissionless strategy deployment:
Parameter Validation
Factory validates parameters on deployment:
Strategy Selection Guide
For Conservative Vaults
Recommended: Immutable strategy with:
High bond ratio: 25-30% (3-4x leverage)
Large liquidation buffer: 15-20%
Moderate interest rate: 5-8% APR
Low curator fee: 0-5%
Conservative liquidation margin: 1-2%
Example:
For Aggressive Vaults
Recommended: Mutable strategy with:
Low bond ratio: 15-20% (5-6.67x leverage)
Small liquidation buffer: 5-10%
High interest rate: 10-15% APR
High curator fee: 10-20%
Generous liquidation margin: 5-10%
Example:
For Altruistic/Public Goods Vaults
Recommended: Immutable strategy with:
Moderate bond ratio: 20-25%
Moderate buffer: 10-15%
Low interest rate: 3-5% APR
Zero curator fee: 0%
Zero liquidation margin: 0% (break-even)
Example:
Strategy Lifecycle
1. Deployment
2. Vault Creation
3. Position Management
4. Parameter Updates (Mutable Only)
Best Practices
For Strategy Deployers
Choose immutable when possible: No governance risk for depositors
Conservative parameters: Start conservative, can always deploy new strategy
Test thoroughly: Deploy on testnet first
Document clearly: Explain parameter choices to vault creators
Consider edge cases: What happens at extremes (100% utilization, etc.)?
For Vault Creators
Understand parameters: Know how they affect LPs and managers
Match risk tolerance: Choose strategy matching your LP base
Vet allowed assets: Ensure oracle support and liquidity
Monitor performance: Track interest rates, liquidations, utilization
Communicate clearly: Tell LPs what strategy you're using and why
For Managers
Know the rules: Understand bond ratio, liquidation threshold
Monitor health: Track your health ratio constantly
Maintain buffer: Don't get too close to liquidation threshold
Calculate costs: Factor in interest when planning trades
Respect allowlist: Only use whitelisted asset wrappers
Advanced Features
Custom Strategy Development
You can develop custom strategies implementing IStrategy:
Requirements:
Implement all
IStrategyfunctionsEnsure gas efficiency (called frequently)
Handle edge cases gracefully
Document behavior clearly
Multi-Strategy Vaults (Not Supported)
Each vault has one strategy set at deployment. Cannot be changed.
Why? Prevents rug pulls and ensures predictable behavior for depositors.
Alternative: Deploy multiple vaults with different strategies.
Last updated