Security Considerations
Settlement Layer Security Priorities
Critical Invariants:
- Zero-Sum Settlements: Batch transfers never create/destroy value
- Liquidity Protection: Can't invest reserved settlement funds
- Withdrawal Safety: Permit system prevents unauthorized exits
- Atomic Settlements: All transfers succeed or all revert
Attack Vectors to Consider:
- Manipulating batch netting for profit
- Withdrawing during settlement to cause failure
- Double-spending settlement obligations
- rBalance manipulation to fake profits
Investment Layer Security Priorities
Critical Invariants:
- Reserved Asset Protection: Investment can't touch pending/claimable funds
- Share Accounting: IUSD supply matches underlying WUSD position
- Fulfillment Accuracy: Pending → claimable conversions correct
- Investment Safety: Can't over-invest beyond available balance
Attack Vectors to Consider:
- Manipulating reserved asset calculation to over-invest
- Exploiting async flow for double-claims
- Front-running fulfillment operations
- Storage corruption during upgrades