protection_engine is the central coordinator of the CoverFi ecosystem. It interfaces with users and manages the lifecycle of stablecoin loss protection positions.
Core Responsibilities
- Position Lifecycle: Opens, claims, revokes, and expires positions.
- Math & Calculations: Computes protection fees and max payout capacities based on configured parameters.
- Cross-Contract Coordination: Triggers transfers across the
protected_balance_vault,premium_vault, andreserve_vault. - Oracle Verification: Reads from the
oracle_adapterduring a claim to determine if the trigger threshold has been breached.