Overview
ArbiterBase is the foundational contract in the Warp Router ecosystem that enables arbiters to unlock and manage funds on behalf of users. It provides dual protocol support for both TheCompact and Permit2 standards, enabling flexible settlement mechanisms.ArbiterBase combines CompactArbiter, Permit2Arbiter, and PreClaimExecution functionality into a unified base contract that all arbiters extend.
Key Responsibilities
- Executes pre-claim operations before settlement
- Computes mandate hashes for protocol validation
- Maintains Router-only access control for security
- Orchestrates the settlement flow for both Compact and Permit2 protocols
Security Model
The contract enforces strict access control through theonlyRouter modifier, which validates that msg.sender == ROUTER before allowing any settlement operations.
Constructor
address
required
The Router contract address that will have exclusive access to settlement functions.
address
required
TheCompact protocol contract address for Compact-based settlements.
address
required
The AddressBook contract for protocol configuration and address lookup.
Pre-Claim Operations
Compact Pre-Claim Operations
1
Compute EIP-712 hashes
Computes hashes for order components including target attributes, operations, and qualifier data.
2
Execute pre-claim operations
If pre-claim operations exist and are ERC7579 type, executes them with proper signature validation.
3
Return mandate hash
Returns the computed mandate hash needed for TheCompact claim operations.
Parameters
Types.Order
required
The order containing all settlement data including sponsor, operations, and tokens.
Types.Signatures
required
The signatures required for validation.
bytes32[]
required
Additional elements for cross-chain validation.
uint256
required
The offset for element processing in the order array.
uint256
required
The chain ID where the order was notarized.
Operation Types
Pre-claim operations support three execution modes:- ERC7579
- MultiCall
- Calldata
Executes operations following the ERC7579 smart account standard. Uses sponsor account, pre-claim operations, and signature validation through TheCompact protocol.
Permit2 Pre-Claim Operations
Unlike Compact integration, Permit2 uses a different stub structure and execution path but maintains the same core validation and mandate hash computation logic.
Parameters
Types.Order
required
The order containing all settlement data including sponsor, operations, and tokens.
Types.Signatures
required
The signatures required for validation, specifically uses
notarizedClaimSig for Permit2.Mandate Hash Computation
The mandate hash is computed using EIP-712 structured data hashing:Access Control
onlyRouter Modifier
This modifier is critical for maintaining the security model of the arbiter system. It ensures that only the Router can execute settlement operations, preventing:
- Unauthorized access to user funds
- Bypass of Router’s validation logic
- Direct manipulation of arbiter state
requireNoOps Modifier
Use this modifier when arbiters want to restrict claim functions to pure token transfers without any additional pre-claim or destination operations. This is useful for:
- Simple settlement flows that only require token movement
- Security-sensitive contexts where operation execution should be prohibited
- Gas-optimized paths that skip operation processing overhead
Gas Validation
minGas requirement.
Errors
OnlyRouter
NoOperationsAllowed
NO_OPS constant.
Interface Support
bytes4
required
The interface identifier to check.
IERC165.supportsInterfaceIArbiterinterface
Qualifier Hash
bytes
required
The qualifier data to hash.
Source Code Reference
Location:/src/base/arbiter/ArbiterBase.sol:33