Approach
The checks below describe intended constraints, not demonstrated prevention. The linked fork is a moving source reference, not a tested release. Each assertion checks a condition identified by the failure mode analysis. For example, state-consistency checks can constrain withdrawals when AnchorStateRegistry reports incorrect state.Assertion Collections Overview
FMA ETH Lockbox Assertions
This collection targets the ETHLockbox contract’s security properties, corresponding to the ETH Lockbox FMA document:Key Checks:
- FM1: Unauthorized Access Protection - Checks whether only authorized portals call
lockETHandunlockETHfunctions - FM2: Drain Bound - Proposes preventing the lockbox from being drained to zero balance in a single transaction
- FM3: Proxy Upgrade Protection - Monitors for unexpected proxy implementation address changes that could indicate buggy upgrades
Risk Context:
The FMA rates these failures as critical: high impact and low likelihood. Unauthorized access or bugs could drain the lockbox.FMA Interop Portal Assertions
This collection targets the OptimismPortal2 and AnchorStateRegistry integration, corresponding to the Interop Portal FMA document:Key Checks:
- FM1: AnchorStateRegistry Integrity - Validates retirement timestamp updates, respected game type changes, anchor state transitions, and blacklist operations
- FM2: Migration Logic Safety - Checks migration conditions intended to preserve fund safety and state consistency
- FM4: SuperRoots Toggle Validation - Validates that
superRootsActiveflag changes follow proper authorization and state requirements
Risk Context:
The FMA rates these failures as low likelihood with high or critical impact. Incorrect state or migrations could compromise withdrawal safety or availability.FMA L2 Message Passing Assertions
This collection targets cross-chain message passing contracts, corresponding to the Message Passing FMA document:Key Checks:
- FM1: Destination Chain Validation - Checks for invalid message destinations (same chain, zero chain ID, etc.)
- FM2: Message Validation Integrity - Validates message identifiers and parameters for cross-chain message validation
- FM3: Message Relay Completeness - Checks recording and relay conditions for sent messages
- FM4: Replay Protection - Checks duplicate message execution using
successfulMessagestracking - FM5: Reentrancy Protection - Checks relay atomicity and reentrancy conditions
- FM6: Repeated Identifier Validation - Checks for duplicate identifier usage within the same transaction

