{"sources":{"src/WstETHPriceFeedCompounded.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.13;\n\nimport {IChainlinkFeed, IWstETH} from \"./WstETHPriceFeed.sol\";\n\n/// @notice Ethereum mainnet wstETH/USD feed using Chainlink stETH/ETH, ETH/USD, and Lido's conversion rate.\n/// @dev Consumers must validate price validity and the freshness of both Chainlink inputs.\ncontract WstETHPriceFeedCompounded {\n    IWstETH public constant wstETH = IWstETH(0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0);\n    IChainlinkFeed public constant stEthToEth = IChainlinkFeed(0x86392dC19c0b719886221c78AB11eb8Cf5c52812);\n    IChainlinkFeed public constant ethToUsd = IChainlinkFeed(0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419);\n\n    /// @notice Returns the 18-decimal USD price per wstETH with the minimum input timestamps.\n    /// @dev stEthPerToken and stETH/ETH have 18 decimals; ETH/USD has 8 decimals. Multiplication\n    /// is checked and the single final division truncates toward zero. No validity or freshness\n    /// checks are performed. Upstream reverts and checked arithmetic failures propagate.\n    /// roundId and answeredInRound identify only the ETH/USD input, not a composite round.\n    /// startedAt and updatedAt are independently minimized and do not track Lido rate updates.\n    function latestRoundData()\n        public\n        view\n        returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)\n    {\n        (, int256 stEthEthAnswer, uint256 stEthStartedAt, uint256 stEthUpdatedAt,) = stEthToEth.latestRoundData();\n        (roundId, answer, startedAt, updatedAt, answeredInRound) = ethToUsd.latestRoundData();\n\n        answer = int256(wstETH.stEthPerToken()) * stEthEthAnswer * answer / 1e26;\n        startedAt = stEthStartedAt < startedAt ? stEthStartedAt : startedAt;\n        updatedAt = stEthUpdatedAt < updatedAt ? stEthUpdatedAt : updatedAt;\n    }\n\n    /// @notice Returns the same 18-decimal price as latestRoundData().\n    function latestAnswer() external view returns (int256) {\n        (, int256 answer,,,) = latestRoundData();\n        return answer;\n    }\n\n    function decimals() external pure returns (uint8) {\n        return 18;\n    }\n}\n"},"src/WstETHPriceFeed.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.13;\n\ninterface IChainlinkFeed {\n    function latestRoundData()\n        external\n        view\n        returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);\n}\n\ninterface IWstETH {\n    function stEthPerToken() external view returns (uint256);\n}\n\n/// @notice Ethereum mainnet wstETH/USD feed using Chainlink stETH/USD and Lido's conversion rate.\n/// @dev Derived from Inverse Finance's WstETHPriceFeed, without fallback pricing or governance.\n/// Consumers must validate the returned price and round metadata, including freshness.\ncontract WstETHPriceFeed {\n    IWstETH public constant wstETH = IWstETH(0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0);\n    IChainlinkFeed public constant stEthToUsd = IChainlinkFeed(0xCfE54B5cD566aB89272946F602D76Ea879CAb4a8);\n\n    /// @notice Returns the 18-decimal USD price per wstETH and unmodified Chainlink round metadata.\n    /// @dev stEthPerToken has 18 decimals and stETH/USD has 8 decimals. No validity or freshness\n    /// checks are performed. Upstream reverts and checked arithmetic failures propagate.\n    function latestRoundData()\n        public\n        view\n        returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)\n    {\n        (roundId, answer, startedAt, updatedAt, answeredInRound) = stEthToUsd.latestRoundData();\n        answer = int256(wstETH.stEthPerToken()) * answer / 1e8;\n    }\n\n    /// @notice Returns the same 18-decimal price as latestRoundData().\n    function latestAnswer() external view returns (int256) {\n        (, int256 answer,,,) = latestRoundData();\n        return answer;\n    }\n\n    function decimals() external pure returns (uint8) {\n        return 18;\n    }\n}\n"}},"matchId":"57090155","creationMatch":"exact_match","runtimeMatch":"exact_match","verifiedAt":"2026-10-26T11:13:50Z","match":"exact_match","chainId":"1","address":"0x6148B9e0246380A70f1404C78B66661F39f76c90"}