@@ -133,13 +133,14 @@ contract ScaledApi3FeedProxyV1 is IScaledApi3FeedProxyV1 {
133133 /// @notice Reads a value from the underlying `IApi3ReaderProxy` and
134134 /// scales it to `targetDecimals`.
135135 /// @dev Reads an `int224` value (assumed to be 18 decimals) from the
136- /// underlying `IApi3ReaderProxy` and scales it to `targetDecimals`.
137- /// The initial `int224` proxy value is widened to `int256` before scaling.
138- /// The scaling arithmetic (`value * factor` or `value / factor`) is then
139- /// performed using `int256` types. This allows the scaled result to exceed
140- /// the `int224` range, provided it fits within `int256`.
141- /// Arithmetic operations will revert on overflow or underflow
142- /// (e.g., if `value * scalingFactor` exceeds `type(int256).max`).
136+ /// underlying `IApi3ReaderProxy`. This value is then scaled to
137+ /// `targetDecimals` using pre-calculated factors. The scaling arithmetic
138+ /// (e.g., `proxyValue * scalingFactor`) involves an `int224` (`proxyValue`)
139+ /// and an `int256` (`scalingFactor`). `proxyValue` is implicitly promoted
140+ /// to `int256` for this operation, resulting in an `int256` value.
141+ /// This allows the scaled result to exceed the `int224` range, provided
142+ /// it fits within `int256`. Arithmetic operations will revert on `int256`
143+ /// overflow. The function returns the scaled value as an `int256`.
143144 /// @return value The scaled signed fixed-point value with `targetDecimals`.
144145 /// @return timestamp The timestamp from the underlying proxy.
145146 function _read () internal view returns (int256 value , uint32 timestamp ) {
0 commit comments