This documentation helps in detecting incident response procedures, provides insights for security monitoring and security updates process
- Alerts for traffic patterns
- Look for inappropriate user behavior or requests
- Isolation od affected systems and revoke access tokens and secrets
- Disable accounts affected
- Detect for malicious code and patch the exploited vulnerability with clearing of logs
- Keep backup for recovery
- Only authorized admins may perform on-chain recovery actions; calls must be authenticated and auditable.
- Recovery actions MUST emit on-chain events containing: admin address, market_id, action, status, amount (when applicable), and timestamp.
- Prefer non-invasive heuristics: reconstruct totals, mark claims, or perform targeted partial refunds.
- Do not perform forced payouts or unilateral transfers unless approved and logged.
- After any recovery action: record a post-incident summary, include invariant checks performed, and list affected market IDs.
- Indexers and auditors should monitor
recovery_evtevents emitted by the contract. Each event includes the acting admin and structured details for integrators to consume. - Maintain an off-chain incident log correlated to on-chain event timestamps for forensic analysis.
- Documentation of incident and prevention
- Notification to regulatory bodies during a security breach
- Claiming window is enforced per resolved market.
- Default claim window: 90 days from recorded resolution time (legacy fallback uses
market.end_time). - Admin can set:
- Global claim window:
set_global_claim_period(admin, claim_period_seconds) - Market override:
set_market_claim_period(admin, market_id, claim_period_seconds)
- Global claim window:
- Claims attempted after deadline revert with
ResolutionTimeoutReached.
- Sweep entrypoint:
sweep_unclaimed_winnings(admin, market_id, burn). - Authorization: admin only.
- Preconditions:
- Market must be resolved.
- Claim window must be expired.
- Sweep scope:
- Only unclaimed winning payouts are swept.
- Already claimed payouts are excluded.
burn = false: transfer swept amount to configured treasury address.- Treasury must be configured first via
set_treasury(admin, treasury).
- Treasury must be configured first via
burn = true: burn mode (no treasury credit).
- Verify market is resolved and claim window has expired.
- Decide destination mode (
burnor treasury). - If treasury mode, verify treasury address is configured.
- Execute sweep.
- Verify emitted
UnclaimedWinningsSweptEventand resulting balances.
- Look for unauthorised access endpoints
- Increase in user requests
- Failure in Login continuously
- Regularly check for logs and monitor them
- Use tools like Datadog, Splunk, and ELK stack
- Look for admin activities
- Health of system and access to database and authentications details
- Patching of OS and Apps regularly
- Merge dependencies with low risks
- Monitor for anomalies everyday
- Validation of Configuration
- Notification of critical updates to security teams
With the integration of graceful degradation in the Predictify Hybrid contracts, operators must actively monitor on-chain events to detect oracle failures, as the system no longer fails silently.
Operators must configure their indexing services (e.g., Datadog, subgraph, or custom indexer) to listen for specific smart contract events emitted during oracle fallbacks or failures.
- Event Topic/Signature: Listen for the
OracleDegradationEvent(typically keyed by the symbolora_deg). - Payload Inspection: The event payload will contain:
oracle: TheOracleProviderthat failed.reason: A string indicating the failure context (e.g., "Primary oracle failed" or "Backup oracle failed").timestamp: The ledger timestamp of the failure.
In addition to passive event listening, monitoring targets should periodically poll the contract's health state.
- Query
monitor_oracle_health: Schedule regular calls to this function for all active oracle providers. - Alerting Thresholds: Set immediate alerts if the returned
OracleHealthMetricsdrops toMonitoringStatus::WarningorMonitoringStatus::Critical, or if theconfidence_scoredrops below acceptable integration thresholds.
- Level 1 (Primary Failure): If an event states "Primary oracle failed", the system has automatically routed to the fallback. Action: Log the incident, verify the fallback oracle's
confidence_score, and investigate the primary provider's API/node health. No immediate containment is required as the contract handles this gracefully. - Level 2 (Total Failure): If a subsequent event states "Backup oracle failed", the market resolution is blocked. Action: Immediate intervention is required. Operators may need to pause affected markets or trigger an emergency administrative resolution depending on the governance configuration.