Component: ServiceRegistry
Description
The ServiceRegistry is a centralized access-control registry that maintains a curated list of DeFi protocol service adapters available for ManagementAccount interactions. It establishes the system's trust boundary by ensuring that only validated services can be used by ManagementAccounts to interact with external DeFi protocols. Each registered service contains metadata including its service type (LENDING, BORROWING, YIELD, or CUSTOM), protocol identifier, risk score, and active status.
Invariants
Access control
Only accounts with
SERVICE_ADMIN_ROLEcan register, update, or remove services.The
DEFAULT_ADMIN_ROLEcan grant or revoke theSERVICE_ADMIN_ROLE.
Attack surface
Service deactivation risk. A
SERVICE_ADMIN_ROLEcan deactivate services by settingactiveto false or removing them entirely, which would prevent all ManagementAccounts from executing new actions with that service (see Finding ref↗).Service management. Only
SERVICE_ADMIN_ROLEcan manage services, preventing malicious external parties from registering, upgrading, or removing services.