StakedOracle
Inherits: IOracle
Title: StakedOracle
Prices ERC4626 vault shares by combining underlying price with exchange rate.
Price = UnderlyingPrice * ExchangeRate. Used for splDXY-BEAR/splDXY-BULL in Morpho.
State Variables
VAULT
The staking vault (splDXY-BEAR or splDXY-BULL).
IERC4626 public immutable VAULT
UNDERLYING_ORACLE
Oracle for the underlying plDXY token.
IOracle public immutable UNDERLYING_ORACLE
UNDERLYING_DECIMALS
Decimal multiplier for the underlying asset.
uint256 public immutable UNDERLYING_DECIMALS
Functions
constructor
Creates staked oracle for a vault.
constructor(
address _vault,
address _underlyingOracle
) ;
Parameters
| Name | Type | Description |
|---|---|---|
_vault | address | ERC4626 staking vault address. |
_underlyingOracle | address | Price oracle for the underlying plDXY token. |
price
Returns price of 1 vault share including accrued yield.
function price() external view override returns (uint256);
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint256 | Price scaled to 1e36 (underlying price * exchange rate). |
Errors
StakedOracle__InvalidPrice
Thrown when underlying oracle returns zero price.
error StakedOracle__InvalidPrice();
StakedOracle__ZeroAddress
Thrown when zero address provided to constructor.
error StakedOracle__ZeroAddress();