Skip to main content

Omo Beacon Vault Factory

The Omo Beacon Vault Factory contract is a crucial component of the Omo Protocol, responsible for creating and managing instances of OmoBeaconVault. This factory pattern allows for efficient deployment and tracking of multiple beacon vaults within the ecosystem.

Key Features

The primary function of Omo Beacon Vault Factory is to create new OmoBeaconVault instances. It provides a streamlined process for deploying vaults with custom parameters.
  • Users can specify the vault asset, name, and symbol
  • Each new vault is associated with an AgentSetter
  • Newly created beacon vaults are automatically tracked within the factory
Omo Beacon Vault Factory maintains a registry of all created beacon vaults, enabling easy access and management.
  • Keeps an array of all deployed beacon vault addresses
  • Provides functions to query the total number of vaults and access individual vault addresses
The contract emits events to provide transparency and enable off-chain tracking of beacon vault creation.
  • VaultCreated event is emitted upon successful beacon vault deployment
  • Event includes the new vault’s address, owner, and vault asset address

Beacon Vault Creation Process

Omo Beacon Vault Factory Workflow

Omo Beacon Vault Factory Workflow

1

User Calls createVault

A user calls the createVault function with the required parameters.
2

Deploy New OmoBeaconVault

Omo Beacon Vault Factory deploys a new OmoBeaconVault instance with the specified parameters.
3

Add to Vaults Array

The new beacon vault address is added to the internal vaults array.
4

Emit VaultCreated Event

A VaultCreated event is emitted with the details of the new beacon vault.
5

Return New Vault Address

The address of the newly created beacon vault is returned to the caller.

Usage and Integration

The Omo Beacon Vault Factory contract serves as the entry point for users and protocols looking to create customized Omo Beacon Vaults. It ensures consistency in vault deployment and provides a central registry for all Omo Beacon Vaults in the ecosystem.
While the Omo Beacon Vault Factory simplifies beacon vault creation, users should ensure they understand the parameters and implications of creating a new vault before proceeding.