From 5ab15cb05685493b234e7d70e24b5bc9a5717fbf Mon Sep 17 00:00:00 2001 From: GitGuru7 Date: Mon, 18 May 2026 19:17:32 +0530 Subject: [PATCH 1/3] fix: [VLC-32] document OneJumpOracle.INTERMEDIATE_ORACLE ratio precondition --- contracts/oracles/OneJumpOracle.sol | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contracts/oracles/OneJumpOracle.sol b/contracts/oracles/OneJumpOracle.sol index 8c3acdfb..cf5ff289 100644 --- a/contracts/oracles/OneJumpOracle.sol +++ b/contracts/oracles/OneJumpOracle.sol @@ -13,6 +13,10 @@ import { IERC20Metadata } from "@openzeppelin/contracts/token/ERC20/extensions/I */ contract OneJumpOracle is CorrelatedTokenOracle { /// @notice Address of the intermediate oracle + /// @dev MUST return the price of `CORRELATED_TOKEN` denominated in `UNDERLYING_TOKEN` + /// (scaled to `36 - underlyingDecimals`), NOT a USD-denominated price. A USD feed + /// would inflate `getUnderlyingAmount()`; with `snapshotInterval == 0` (CAPO cap + /// disabled) the inflated value would reach `ResilientOracle` unbounded. OracleInterface public immutable INTERMEDIATE_ORACLE; /// @notice Constructor for the implementation contract. From dfde36ef7a4b7856212e275114f44fe0449bd3b3 Mon Sep 17 00:00:00 2001 From: GitGuru7 Date: Tue, 19 May 2026 15:11:48 +0530 Subject: [PATCH 2/3] fix: [VLC-47] document that updateAssetPrice() success doesn't guarantee snapshot advancement --- contracts/ResilientOracle.sol | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contracts/ResilientOracle.sol b/contracts/ResilientOracle.sol index 8e16b33f..543b1263 100755 --- a/contracts/ResilientOracle.sol +++ b/contracts/ResilientOracle.sol @@ -247,7 +247,10 @@ contract ResilientOracle is PausableUpgradeable, AccessControlledV8, ResilientOr /** * @notice Updates the capped main oracle snapshot. - * @dev This function should always be called before calling getPrice + * @dev This function should always be called before calling getPrice. + * A successful return does NOT guarantee the snapshot was advanced — CAPO-style + * main oracles no-op `updateSnapshot()` while within `snapshotInterval`, or when + * `snapshotInterval == 0`. * @param asset asset address */ function updateAssetPrice(address asset) external { From 4390c6ea963cd1663eb31be428a14a386d83948c Mon Sep 17 00:00:00 2001 From: GitGuru7 Date: Tue, 19 May 2026 15:33:41 +0530 Subject: [PATCH 3/3] chore: update yarn.lock --- yarn.lock | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/yarn.lock b/yarn.lock index c21d32de..e2039ac2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4131,29 +4131,7 @@ __metadata: languageName: node linkType: hard -"@venusprotocol/oracle@npm:^2.7.0": - version: 2.14.0 - resolution: "@venusprotocol/oracle@npm:2.14.0" - dependencies: - "@chainlink/contracts": ^0.5.1 - "@defi-wonderland/smock": 2.4.0 - "@nomicfoundation/hardhat-network-helpers": ^1.0.8 - "@openzeppelin/contracts": ^4.6.0 - "@openzeppelin/contracts-upgradeable": ^4.7.3 - "@venusprotocol/governance-contracts": ^2.13.0 - "@venusprotocol/solidity-utilities": ^2.0.0 - "@venusprotocol/venus-protocol": ^9.7.0 - ethers: ^5.6.8 - hardhat: 2.22.18 - hardhat-deploy: ^0.12.4 - module-alias: ^2.2.2 - patch-package: ^8.0.0 - solidity-docgen: ^0.6.0-beta.29 - checksum: e10a6b303cb2d41f158fdae300d030f9fb506e0d389414a7b94fdada89bd322ad3e452a8b929a8e42602dd93e380916bbc86c9ba58fdf5178d38fbbb71edadb8 - languageName: node - linkType: hard - -"@venusprotocol/oracle@workspace:.": +"@venusprotocol/oracle@^2.7.0, @venusprotocol/oracle@workspace:.": version: 0.0.0-use.local resolution: "@venusprotocol/oracle@workspace:." dependencies: