Overview
TheOrchestratorRegistry is an owner-managed allowlist that controls which orchestrator contracts are authorized to call EscrowV2 functions. It provides a security layer ensuring only vetted and approved orchestrators can manage escrow deposits and intents.
Contract Location: contracts/registries/OrchestratorRegistry.sol
Purpose
The OrchestratorRegistry serves as a critical security control:- Access Control: Restricts which contracts can interact with escrow funds
- Orchestrator Allowlist: Maintains a list of authorized orchestrator implementations
- Security Layer: Prevents unauthorized contracts from managing deposits
- Upgrade Management: Controls rollout of new orchestrator versions
State Variables
isOrchestrator: Maps orchestrator addresses to their authorization status
Core Functions
Adding Orchestrators
_orchestrator: Address of the orchestrator contract to authorize
- Orchestrator address cannot be zero
- Orchestrator must not already be added
- Only callable by owner
OrchestratorAdded(address indexed orchestrator)
Reverts:
ZeroAddress(): If_orchestratoris the zero addressOrchestratorAlreadyAdded(address orchestrator): If orchestrator is already authorized
contracts/registries/OrchestratorRegistry.sol:35
Removing Orchestrators
_orchestrator: Address of the orchestrator contract to de-authorize
- Orchestrator address cannot be zero
- Orchestrator must currently be authorized
- Only callable by owner
OrchestratorRemoved(address indexed orchestrator)
Reverts:
ZeroAddress(): If_orchestratoris the zero addressOrchestratorNotFound(address orchestrator): If orchestrator is not currently authorized
contracts/registries/OrchestratorRegistry.sol:48
View Functions
Check Orchestrator Authorization
Integration with Core Contracts
EscrowV2
EscrowV2 is the primary consumer of the OrchestratorRegistry. It uses the registry to validate that callers are authorized orchestrators:- Deposit creation on behalf of users
- Intent signaling and locking
- Payment releases
- Deposit withdrawals
contracts/EscrowV2.sol:127
Payment Verifiers
Payment verifiers (likeUnifiedPaymentVerifier) check the OrchestratorRegistry to ensure they’re being called by authorized orchestrators:
contracts/unifiedVerifier/BaseUnifiedPaymentVerifier.sol:36
Hooks
Intent hooks validate orchestrator authorization:- WhitelistPreIntentHook: Checks orchestrator authorization before allowing whitelisted operations
- SignatureGatingPreIntentHook: Validates orchestrator before processing gated intents
- AcrossBridgeHookV2: Ensures only authorized orchestrators can trigger bridge operations
contracts/hooks/WhitelistPreIntentHook.sol:33
Access Control
Custom Errors
contracts/registries/OrchestratorRegistry.sol:15
Owner Functions
Only the contract owner can manage orchestrator authorization:addOrchestrator(): Authorize new orchestratorsremoveOrchestrator(): Revoke orchestrator authorization
Ownable with onlyOwner modifier
Public View
TheisOrchestrator mapping is publicly readable, allowing any contract or user to verify orchestrator authorization status.
Events
- Tracking orchestrator authorization changes
- Off-chain monitoring of authorized orchestrators
- Audit trails for governance actions
Security Model
Authorization Security
- Centralized Control: Only owner can modify orchestrator list
- Explicit Authorization: Orchestrators must be explicitly added
- Revocability: Authorization can be revoked at any time
- Zero Address Protection: Prevents authorization of invalid addresses
Integration Security
Proper integration requires:- Pre-Call Validation: Contracts must check
isOrchestratorbefore granting access - Modifier Usage: Use
onlyOrchestratormodifier for protected functions - Event Monitoring: Watch for orchestrator changes to update off-chain systems
Upgrade Considerations
- Removing an orchestrator doesn’t affect its existing operations (deposits, intents)
- New orchestrators can be added without disrupting existing ones
- Registry contract itself can be upgraded by updating reference in EscrowV2
Usage Pattern
Deployment and Setup
Upgrading Orchestrators
Validation in Protected Contracts
Deployment Considerations
- Single Registry: Use one OrchestratorRegistry per chain for all orchestrator versions
- Initial Authorization: Authorize initial orchestrator(s) immediately after deployment
- Registry Updates: EscrowV2 allows updating registry reference via
setOrchestratorRegistry() - Multi-Version Support: Multiple orchestrator versions can be authorized simultaneously
Related Contracts
- EscrowV2 - Uses registry to validate orchestrator calls
- Orchestrator - V1 orchestrator that can be authorized
- OrchestratorV2 - V2 orchestrator with enhanced features
- UnifiedPaymentVerifier - Validates orchestrator authorization
- Intent Hooks - Various hooks that check orchestrator authorization