GlobalConfig account stores protocol-wide configuration settings that apply across all lending markets. It manages administrative authorities and fee collection.
GlobalConfig
Current global administrator authority with full control over protocol configuration
Pending administrator that can be promoted to global admin through a two-step process
Account authorized to collect accumulated protocol fees across all markets
Admin Update Process
The GlobalConfig uses a two-step admin update process for security:- Propose: Current admin sets
pending_adminto the new authority - Accept: The pending admin calls
apply_pending_admin()to become the active admin
Update Modes
Configuration updates are performed through theUpdateGlobalConfigMode enum:
Initialization
When initialized, all three fields (global_admin, pending_admin, fee_collector) are set to the same initial admin authority.
Account Size
TheGlobalConfig account has a fixed size of 1000 bytes (GLOBAL_CONFIG_SIZE), including padding for future expansion.
Usage Example
Typical admin rotation flow:Security Considerations
- The global admin has protocol-wide privileges and should be secured with a multisig or governance mechanism
- The pending admin pattern prevents accidental admin lockout
- Fee collector can be set to a separate account for operational security
Related Accounts
- LendingMarket: Each market has its own
lending_market_ownerseparate from global admin - Reserve: Fee collector can claim accumulated fees from reserves across all markets