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.
Note: security-contact: contact@plether.com
Constants
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
SHARE_DECIMALS
Decimal multiplier for vault shares (accounts for ERC4626 decimal offset).
uint256 public immutable SHARE_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 in Morpho scale (24 decimals: 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();