Role Hierarchy & Permissions
Permission Matrix
| Role | Contract | Function Access | Purpose |
|---|---|---|---|
| Owner | IfaPriceFeed | setVerifier(), transferOwnership() | Administrative control |
| Owner | IfaPriceFeedVerifier | setRelayerNode(), transferOwnership() | Relayer management |
| Verifier Contract | IfaPriceFeed | setAssetInfo() | Price data updates |
| Relayer Node | IfaPriceFeedVerifier | submitPriceFeed() | Price submission |
| Public | IfaPriceFeed | getAssetInfo(), getPairById(), etc. | Read operations |
Security Features
Access Control Protection
- Two-level Authorization: Owner → Verifier → Relayer chain prevents single point of failure
- Role Separation: Clear separation between administrative, validation, and data submission roles
- Address Verification: Cryptographic verification of caller addresses at each level
Data Integrity Safeguards
- Input Validation: Multi-layer validation pipeline prevents malformed data injection
- Timestamp Verification: Protection against stale data and replay attacks
- Decimal Bounds Checking: Prevents overflow/underflow in precision calculations
- Existence Validation: Asset existence checks prevent undefined behavior
Operational Security
- Round ID Tracking: Prevents replay attacks and ensures data freshness
- Batch Atomicity: All-or-nothing batch operations prevent partial state corruption
- Zero Division Protection: Mathematical safeguards prevent calculation errors
- Gas Limit Considerations: Function design prevents DoS through gas exhaustion
Trust Model & Assumptions
Trust Requirements
- Relayer Node Integrity: Trusted to provide accurate, timely price data
- Owner Responsibility: Trusted to manage verifier and relayer assignments appropriately
- Network Security: Depends on underlying blockchain consensus and finality
Attack Vector Analysis
High Risk Mitigated:- ✅ Unauthorized Price Updates: Prevented by multi-layer access control
- ✅ Price Manipulation: Limited to authorized relayer with validation pipeline
- ✅ Replay Attacks: Prevented by round ID tracking and timestamp validation
- ✅ Data Corruption: Prevented by input validation and atomic operations
- ⚠️ Relayer Compromise: Single relayer failure impacts data freshness
- ⚠️ Oracle Front-running: Price updates visible before block confirmation
- ⚠️ Network Congestion: May delay price updates during high network load
- ℹ️ MEV Extraction: Read-only oracle data may enable MEV opportunities
- ℹ️ Gas Price Volatility: May affect update frequency economics