Stat calculator returns incorrect report for swETH
The purpose of the in-scope `SwEthEthOracle` contract is to act as a price oracle specifically for swETH (Swell ETH) per the comment in the contract below and the codebase's README\\n```\\nFile: SwEthEthOracle.sol\\n/**\\n * @notice Price oracle specifically for swEth (Swell Eth).\\n * @dev getPriceEth is not a view fn to support reentrancy checks. Does not actually change state.\\n */\\ncontract SwEthEthOracle is SystemComponent, IPriceOracle {\\n```\\n\\nPer the codebase in the contest repository, the price oracle for the swETH is understood to be configured to the `SwEthEthOracle` contract at Line 252 below.\\n```\\nFile: RootOracleIntegrationTest.t.sol\\n        swEthOracle = new SwEthEthOracle(systemRegistry, IswETH(SWETH_MAINNET));\\n..SNIP..\\n        // Lst special pricing case setup\\n        // priceOracle.registerMapping(SFRXETH_MAINNET, IPriceOracle(address(sfrxEthOracle)));\\n        priceOracle.registerMapping(WSTETH_MAINNET, IPriceOracle(address(wstEthOracle)));\\n        priceOracle.registerMapping(SWETH_MAINNET, IPriceOracle(address(swEthOracle)));\\n```\\n\\nThus, in the context of this audit, the price oracle for the swETH is mapped to the `SwEthEthOracle` contract.\\nBoth the swETH oracle and calculator use the same built-in `swEth.swETHToETHRate` function to retrieve the price of swETH in ETH.\\nLST Oracle Calculator Rebasing\\nswETH SwEthEthOracle - `swEth.swETHToETHRate()` SwethLSTCalculator - `IswETH(lstTokenAddress).swETHToETHRate()` False\\n```\\nFile: SwEthEthOracle.sol\\n    /// @inheritdoc IPriceOracle\\n    function getPriceInEth(address token) external view returns (uint256 price) {\\n..SNIP..\\n        // Returns in 1e18 precision.\\n        price = swEth.swETHToETHRate();\\n    }\\n```\\n\\n```\\nFile: SwethLSTCalculator.sol\\n    function calculateEthPerToken() public view override returns (uint256) {\\n        return IswETH(lstTokenAddress).swETHToETHRate();\\n    }\\n```\\n\\nWithin the `LSTCalculatorBase.current` function, assume that the `swEth.swETHToETHRate` function returns $x$ when called. In this case, the `price` at Line 203 below and `backing` in Line 210 below will be set to $x$ since the `getPriceInEth` and `calculateEthPerToken` functions depend on the same `swEth.swETHToETHRate` function internally. Thus, `priceToBacking` will always be 1e18:\\n$$ \\begin{align} priceToBacking &= \\frac{price \\times 1e18}{backing} \\ &= \\frac{x \\times 1e18}{x} \\ &= 1e18 \\end{align} $$\\nSince `priceToBacking` is always 1e18, the `premium` will always be zero:\\n$$ \\begin{align} premium &= priceToBacking - 1e18 \\ &= 1e18 - 1e18 \\ &= 0 \\end{align} $$\\nAs a result, the calculator for swETH will always report the wrong statistic report for swETH. If there is a premium or discount, the calculator will wrongly report none.\\n```\\nFile: LSTCalculatorBase.sol\\n    function current() external returns (LSTStatsData memory) {\\n..SNIP..\\n        IRootPriceOracle pricer = systemRegistry.rootPriceOracle();\\n        uint256 price = pricer.getPriceInEth(lstTokenAddress);\\n..SNIP..\\n            uint256 backing = calculateEthPerToken();\\n            // price is always 1e18 and backing is in eth, which is 1e18\\n            priceToBacking = price * 1e18 / backing;\\n        }\\n\\n        // positive value is a premium; negative value is a discount\\n        int256 premium = int256(priceToBacking) - 1e18;\\n\\n        return LSTStatsData({\\n            lastSnapshotTimestamp: lastSnapshotTimestamp,\\n            baseApr: baseApr,\\n            premium: premium,\\n            slashingCosts: slashingCosts,\\n            slashingTimestamps: slashingTimestamps\\n        });\\n    }\\n```\\n
When handling the swETH within the `LSTCalculatorBase.current` function, consider other methods of obtaining the fair market price of swETH that do not rely on the `swEth.swETHToETHRate` function such as external 3rd-party price oracle.
The purpose of the stats/calculators contracts is to store, augment, and clean data relevant to the LMPs. When the solver proposes a rebalance, the strategy uses the stats contracts to calculate a composite return (score) for the proposed destinations. Using that composite return, it determines if the swap is beneficial for the vault.\\nIf a stat calculator provides inaccurate information, it can cause multiple implications that lead to losses to the protocol, such as false signals allowing the unprofitable rebalance to be executed.
```\\nFile: SwEthEthOracle.sol\\n/**\\n * @notice Price oracle specifically for swEth (Swell Eth).\\n * @dev getPriceEth is not a view fn to support reentrancy checks. Does not actually change state.\\n */\\ncontract SwEthEthOracle is SystemComponent, IPriceOracle {\\n```\\n