AMMO Registry
Introduction
The Algorithmic Market Making Operations (AMMO) Registry smart contract serves as a central point for managing and authenticating AMMO modules within the Azos protocol. This registry is tasked with the dual responsibility of authorizing AMMO modules to access protected methods within the Azos ecosystem and maintaining a verified list of approved modules. By centralizing authorization and module verification, the registry streamlines integration and ensures that only vetted AMMOs can interact with sensitive components of the system, thus upholding the protocol's security and integrity.
Key Methods
registerAMMO(address moduleAddress)
- Description: Registers a new AMMO module with the registry. This method includes checks to ensure that the module adheres to predefined criteria and is not already registered.
- Parameters:
moduleAddress
: The smart contract address of the AMMO module to be registered.
- Requirements:
- Must be called by an address with administrative privileges within the registry.
deregisterAMMO(address moduleAddress)
- Description: Removes an AMMO module from the registry, revoking its authorization to access protected methods within the Azos protocol.
- Parameters:
moduleAddress
: The smart contract address of the AMMO module to be deregistered.
- Requirements:
- Must be called by an address with administrative privileges within the registry.
- The module must be previously registered.
updateAMMOModule(address moduleAddress, address newModuleAddress)
- Description: Updates the address of an existing registered AMMO module. This can be used in case the AMMO module is upgraded or migrated.
- Parameters:
moduleAddress
: The current smart contract address of the AMMO module to be updated.newModuleAddress
: The new smart contract address of the AMMO module.
- Requirements:
- Must be called by an address with administrative privileges within the registry.
- The module must be previously registered.
authorizeModuleUse(address moduleAddress)
- Description: Grants an AMMO module permission to access protected methods within the Azos protocol.
- Parameters:
moduleAddress
: The smart contract address of the AMMO module to be authorized.
- Requirements:
- Must be called by an address with administrative privileges within the registry.
- The module must be previously registered.
revokeModuleUse(address moduleAddress)
- Description: Revokes an AMMO module's permission to access protected methods within the Azos protocol.
- Parameters:
moduleAddress
: The smart contract address of the AMMO module whose permissions are to be revoked.
- Requirements:
- Must be called by an address with administrative privileges within the registry.
- The module must be previously registered.
Key Mechanisms and Concepts
Authorization Management
The registry centralizes the process of granting and revoking access to the Azos protocol's protected methods for AMMO modules. This mechanism ensures a consistent and secure method for managing access across various components of the system.
Single Source of Truth
By maintaining a comprehensive list of approved AMMO modules, the registry acts as the single source of truth within the Azos protocol. This simplifies verification processes and enables easy identification of authorized modules.
Governance Controls
The registry can only be updated via protocol governance.
Administrative Controls
The registry is governed by a set of administrative controls that allow for the addition, removal, and updating of AMMO modules. These controls are designed to be exercised by smart contracts within the Azos protocol, ensuring that the registry remains up-to-date and aligned with the protocol's evolving requirements.
Upgrade and Migration Support
The ability to update AMMO module addresses facilitates the upgrade and migration of modules without disrupting their registration status. This ensures that improvements to AMMO modules can be seamlessly integrated into the Azos ecosystem.
The AMMO Registry smart contract plays a crucial role in the security and efficiency of the Azos protocol's market-making operations.