Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Deploy an oracle router

When a liability vault accepts collateral, it needs a reliable way to value the collateral and liability asset in the vault's unit of account. An EVK vault can use any compatible IPriceOracle; EulerRouter is the standard composable option for combining direct pair oracles, ERC-4626 conversions, and a fallback.

For a cluster of connected vaults, a shared router can make pricing paths easier to manage consistently. The router and unit of account are selected when each vault is created, so map the complete pricing path before deployment.

Before you deploy

Deploy your own oracle adapters for the routes your vaults need rather than reusing adapters found onchain. The Oracle Deployer supports deployment of the available adapter types, and deploying your own keeps the configuration and provenance of every route under your control. If you do reuse an existing adapter, confirm the network, contract address, source, quote unit, update behavior, and governance first.

Quick start

  1. Map every required price. Define how each liability and collateral asset will be quoted in the vault's unit of account.
  2. Deploy adapters. Use the Oracle Deployer for the available adapter types. Check decimals, update cadence, stale-price handling, bounds, and failure behavior.
  3. Deploy or select an EulerRouter. Open the EVK Vault Manager and choose Oracle Router. To deploy, connect the intended governor account on the intended network, choose Deploy New Oracle Router, and confirm the transaction. The connected account is set as the initial governor. Record the router's network, address, governor, fallback, and source version.
  4. Add direct pair oracles. Configure the base/quote pairs that should resolve directly.
  5. Resolve ERC-4626 vaults where needed. Use govSetResolvedVault when a share price should be derived through convertToAssets.
  6. Assign the oracle to the liability vault. Verify the router and unit of account, then test every collateral/liability quote before launch.

How the router resolves prices

EulerRouter resolves a quote in this order:

  1. base and quote are the same asset;
  2. a configured direct pair oracle;
  3. configured ERC-4626 resolved-vault conversion;
  4. the configured fallback oracle.

A direct pair oracle therefore takes precedence over resolved-vault conversion.

ERC-4626 pricing paths

Resolving an ERC-4626 vault lets the router convert shares into the underlying asset with convertToAssets. A nested route can combine several conversions and an adapter. For example:

esDAI → sDAI → DAI → USD

Check every edge in the path, including decimals, rounding, recursive dependencies, source freshness, redemption liquidity, fees, restrictions, and fallback behavior. convertToAssets reports an accounting conversion; it does not establish that the assets can be redeemed immediately at that value.

Governance and testing

Router governance and vault governance are separate unless a deployment deliberately assigns them to the same controller. Verify who can change pair oracles, resolved vaults, and fallbacks, and whether those changes are delayed.

Before launch, test normal quotes as well as stale, unavailable, extreme-price, recursive, and restricted-redemption cases. Recheck the deployed route after every governance change.

Read next