[VPD-898]: VIP to roll out DeviationBoundedOracle and upgrade Comptroller on BSC#697
[VPD-898]: VIP to roll out DeviationBoundedOracle and upgrade Comptroller on BSC#697
Conversation
| export const COMPTROLLER_LENS = "0x75A71Ad878f6f24616A2AE21d046C0C8E72f67F8"; | ||
| export const VAI_CONTROLLER_IMPL = "0x8A7d8589A597619A7842d3BC284b9a5a276FaE56"; | ||
| export const UNITROLLER_IMPLEMENTATION = "0x82cA18785BBbacBeD1C4f482921E2B2E989D8C08"; | ||
| export const KEEPER = "0xCab91EBcbf5d242758e22fd436AB568343463A9c"; // TBD — REPLACE WITH KEEPER ADDRESS ON MAINNET |
There was a problem hiding this comment.
Will this be replaced with another address?
There was a problem hiding this comment.
lets use 0xa44eb88198a7a94dc6d2507bc0e5a216c2410d79
| // DBO keeper actions → 3 timelocks + Guardian + K (20) | ||
| ...buildAcmGrants(DEVIATION_BOUNDED_ORACLE, DBO_KEEPER_FUNCTIONS, KEEPER_CALLERS), | ||
| // Comptroller setDBO → Normal + Guardian ( 2) | ||
| ...buildAcmGrants(UNITROLLER, [COMPTROLLER_DBO_SETTER], [NORMAL_TIMELOCK, GUARDIAN]), |
There was a problem hiding this comment.
Should this be granted to all 3 timelocks?
There was a problem hiding this comment.
Since the oracle is upgradeable, the setter is expected to be used only during initial setup or in emergency situations. Therefore, it’s better to avoid granting unnecessary permissions.
| "isBoundedPricingEnabled": false, | ||
| "cachingEnabled": false | ||
| }, | ||
| { |
There was a problem hiding this comment.
lets remove FIL, this is going to be delist
| @@ -0,0 +1,244 @@ | |||
| { | |||
| "assetConfigs": [ | |||
There was a problem hiding this comment.
let's add vPT-clisBNB-25JUN2026 as well
There was a problem hiding this comment.
also i notice some of the assets with temp CF = 0 we are using ~16% here, i think it's fine to use a conservative value, we can do further adjustment the trigger is annoying
| "asset": "0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82", | ||
| "vToken": "0x86aC3974e2BD0d60825230fa6F355fF11409df5c", | ||
| "cooldownPeriod": 3600, | ||
| "triggerThreshold": "409090909090909090", |
There was a problem hiding this comment.
for CAKE lets use 30% so that it could get trigger more aggressively

Summary
Roll out the new DeviationBoundedOracle (DBO) on BNB Chain (testnet + mainnet) and wire it into the Core Pool Comptroller. The DBO wraps the existing ResilientOracle with a per-market rolling min/max price window — when spot deviates beyond a configured threshold, collateral is valued at
min(spot, windowMin)and debt atmax(spot, windowMax), protecting CF/debt-path pricing against short-duration manipulation on low-liquidity collateral tokens.VIPs included
vips/vip-665/bsctestnet.tsShips the DBO and Comptroller upgrade on testnet without per-asset configs. Yet to be updated to mirror the mainnet structure (ACMCommandsAggregator batching, Keeper role, Guardian-callable setters, asset-config seeding).
vips/vip-665/bscmainnet.ts— Phase 1 of 2Ships DBO live but inactive for 23 of 24 assets: each is initialized with
isBoundedPricingEnabled = false, so DBO returns(spot, spot)and behaviour is unchanged. TRX ships enabled (isBoundedPricingEnabled = true) as a low-liquidity validation market for the protection logic in production. Phase 2 will flip the remaining assets once keepers and parameters are validated.ACMCommandsAggregator. Push batch → grant aggregatorDEFAULT_ADMIN_ROLE→ execute → revoke. Adds Keeper role + Guardian-callable governance setters on top of the testnet set. Audit:governance-contracts/audits/118_ACMCommandsAggregator_certik_20241007.pdf.diamondCut(same shape as testnet).ComptrollerLens.setTokenConfigs, populated fromvips/vip-665/asset-configs-bscmainnet.json.Deployed contracts
0xE0dafC97895B3c98d3B96D3f8739AaC73166beB80xc79Cb7efEBd121DC4B39eA141C214606595D665A0xdBD0992dEd0a1EC14CE0532e60ea023F79372eD90x75A71Ad878f6f24616A2AE21d046C0C8E72f67F80xd2848305b0ee7646C930240D79549D50d6Ed024F0x8A7d8589A597619A7842d3BC284b9a5a276FaE560xf00Ba2930E43C96719Ca40c8B5a48F4c9A004c520x82cA18785BBbacBeD1C4f482921E2B2E989D8C080xCab91EBcbf5d242758e22fd436AB568343463A9c(TBD — replace before proposal)Test plan
npx hardhat test simulations/vip-665/bsctestnet.ts --fork bsctestnetnpx hardhat test simulations/vip-665/bscmainnet.ts --fork bscmainnet