SAV Price Accumulator
Purpose
The Single Asset Vault (SAV) Price Accumulator oracle is an extension of PriceAccumulator
that tracks the price of ERC4626 vaults.
Functionality
The functionality of the SAV Price Accumulator is identical to the PriceAccumulator
oracle, with the exception that it implements fetchPrice
to track the price of ERC4626 vault share tokens.
This oracle relies on an external oracle (underlyingAssetOracle
) to provide the price of the underlying asset of the vault. This oracle reads the vault's total asset balance (totalAssets
), multiplies this by the price of the underlying asset, then divides the total value of the vault by the vault's total supply (totalSupply
) to calculate the price per share.
Limitations
This accumulator uses its own heart beat (heartbeat
) as the maximum observation age of the underlying asset oracle. This means that the underlying asset oracle must have a heart beat that is less than or equal to the SAV Price Accumulator's heart beat.
Permissions
Like most of our contracts, it's recommended to use the managed version of the SAV Price Accumulator to manage the configuration and permissions of the contract.
The standard managed contract uses OpenZeppelin's AccessControlEnumerable (opens in a new tab) for permissioning with the following roles:
Note that all roles can manage the roles below them. Roles without a role above them are able to manage themselves.