Skip to main content

Factory Contracts in Euler V2

Factory contracts are a cornerstone of the modular, composable architecture of Euler V2. They provide a standardized, auditable, and secure way to deploy and manage multiple instances of smart contracts, ensuring that all deployments originate from a single, verifiable source. This makes it easier for developers and auditors to track, upgrade, and govern protocol components at scale.

Main Factory Contracts

EVault Factory (Generic Factory)

The EVault Factory is the main contract for deploying new EVK vaults. It enables permissionless creation of upgradeable or immutable vaults using a standardized proxy pattern. Vault creators specify parameters such as the underlying asset, oracle, and unit of account. The factory ensures all vaults are initialized securely and can be verified as originating from a trusted source.

Euler Earn Factory

The Euler Earn Factory allows anyone to deploy new Earn vaults. Each Earn vault is an ERC-4626 vault that aggregates yield from multiple strategies, with configurable roles for risk management and rebalancing. The factory ensures all Earn vaults are immutable, non-custodial, and verifiably deployed from a trusted source.

IRM Factory (Kink and Adaptive Curve)

The IRM (Interest Rate Model) factory is responsible for deploying interest rate models used by vaults. Two main types are supported:

  • Kink IRM Factory: Deploys linear kink interest rate models, which use a piecewise-linear curve with a "kink" point to set rates based on utilization.
  • Adaptive Curve IRM Factory: Deploys adaptive curve models, which dynamically adjust rates based on market conditions and utilization.

These factories ensure that only recognized, audited IRMs are used by vaults, and allow for easy upgrades or parameter changes.

Euler Router Factory

The Euler Router Factory deploys price oracle routers. Routers aggregate and route price data from multiple sources, supporting flexible, composable, and governable on-chain pricing for the Euler ecosystem.

Edge Factory

The edge factory allows the creation of small, ungoverned clusters of vaults for specialized use cases. These clusters can be used for isolated risk and rapid prototyping, while still benefiting from the security and auditability of the factory deployment pattern.

Governor Access Control Emergency Factory

This factory deploys a comprehensive governance suite for EVK vaults, including a GovernorAccessControlEmergency contract and two timelock controllers (admin and wildcard). It streamlines the setup of secure, time-delayed, and emergency-enabled governance, following best practices for risk management and user protection. For more, see the Governor Access Control Emergency documentation.

Cap Risk Steward Factory

The Cap Risk Steward Factory deploys CapRiskSteward contracts, which are specialized risk management modules. These stewards allow for controlled, time-limited adjustments to vault parameters (such as supply/borrow caps and interest rate models) within predefined safety limits. They are typically used alongside selector-based governors for delegated, but limited, risk management that is allowed to bypass timelock controllers.