Skip to main content

Agent Setter

The Agent Setter is a crucial component of the Omo Protocol, responsible for managing the whitelist of agents that can interact with Omo Beacon Vaults. This contract ensures that only authorized agents can execute strategies within the ecosystem by allowing them to call onlyAgent functions within the Omo Beacon Vault contract. These whitelisted agents are entrusted with handling users’ principal capital, interacting with the DeFi ecosystem on their behalf, and returning the users’ funds when they request to redeem their assets.

Key Features

The primary function of the Agent Setter is to maintain a whitelist of agent addresses. It provides:
  • A secure and efficient process for managing authorized agents
  • A mapping to store the whitelist status of each agent
  • Quick verification of an agent’s authorization status
The Agent Setter implements strict access control measures:
  • Only the contract owner can add or remove agents from the whitelist
  • Ownership-based access control is implemented through the Owned contract
  • Provides a robust and standardized ownership mechanism
The Agent Setter contract offers a set of functions for managing the agent whitelist:
  • addAgent and removeAgent for individual agent management
  • addManyAgents and removeManyAgents for bulk operations
  • Gas-efficient design for cost-effective management as the number of agents grows
To ensure transparency and enable off-chain tracking, the contract emits events:
  • AgentAdded event when a new agent is added to the whitelist
  • AgentRemoved event when an agent is removed from the whitelist
  • Events include the address of the affected agent for easy monitoring and auditing
The Agent Setter plays a crucial role in the Omo Beacon Vault ecosystem:
  • Omo Beacon Vault contracts reference an instance of the Agent Setter
  • Used to verify the authorization status of agents attempting to execute sensitive operations
  • Ensures only whitelisted agents can perform critical actions within the vaults
  • Maintains the security and integrity of the Omo Protocol ecosystem