Skip to main content

Overview

Periphery contracts provide supporting infrastructure for the core Aera V3 vault system. They handle price feeds, fee calculation, and other utility functions that the core vaults depend on but are not part of the vault inheritance hierarchy.

OracleRegistry

The OracleRegistry is an ERC-7726 compatible registry of price oracles for asset pairs. Vaults and hooks use it to look up current prices for exchange rate calculations, slippage enforcement, and fee computation.

Functions

getOracle

Returns the oracle address for a given asset pair. Signature:
function getOracle(address base, address quote) external view returns (address oracle)
ParameterTypeDescription
baseaddressBase asset address
quoteaddressQuote asset address
Returns: Address of the registered oracle for the pair.

getPrice

Returns the current price for an asset pair from the registered oracle. Signature:
function getPrice(address base, address quote) external view returns (uint256 price)
ParameterTypeDescription
baseaddressBase asset address
quoteaddressQuote asset address
Returns: Current price of base asset denominated in quote asset.

setOracle

Registers or updates an oracle for an asset pair. Only callable by the registry owner. Signature:
function setOracle(address base, address quote, address oracle) external
ParameterTypeDescription
baseaddressBase asset address
quoteaddressQuote asset address
oracleaddressOracle contract address

Events

OracleSet

Emitted when an oracle is registered or updated.
event OracleSet(address indexed base, address indexed quote, address indexed oracle)

DelayedFeeCalculator

Fee calculator for SingleDepositorVault vaults. Applies time-delayed fee accrual based on vault values reported by an accountant. The delay prevents fee manipulation through short-term vault value changes.

Functions

calculateFees

Calculates accrued fees based on the current vault value and time elapsed since the last report. Signature:
function calculateFees(uint256 vaultValue) external view returns (uint256 fees)
ParameterTypeDescription
vaultValueuint256Current vault value as reported by the accountant
Returns: Amount of fees accrued.

reportValue

Reports the current vault value for fee calculation. Starts or updates the time-delayed fee accrual window. Signature:
function reportValue(uint256 vaultValue) external
ParameterTypeDescription
vaultValueuint256Current vault value

PriceAndFeeCalculator

Fee calculator for MultiDepositorVault vaults. Uses unit-based pricing with managed accountant snapshots for fee computation. Integrates with the OracleRegistry for price lookups.

Functions

calculateFees

Calculates accrued fees based on the current unit price and total supply. Signature:
function calculateFees(uint256 unitPrice, uint256 totalSupply) external view returns (uint256 fees)
ParameterTypeDescription
unitPriceuint256Current price per vault unit
totalSupplyuint256Total supply of vault units
Returns: Amount of fees accrued.

snapshot

Takes a snapshot of the current vault state for fee calculation. Called by the guardian as part of the submit flow (typically via an afterSubmit hook). Signature:
function snapshot(uint256 unitPrice, uint256 totalSupply) external
ParameterTypeDescription
unitPriceuint256Current price per vault unit
totalSupplyuint256Total supply of vault units
This page was manually created as a baseline. Run the contract reference generation pipeline to update with complete NatSpec documentation from the Solidity source.