Skip to content

[VPD-349]: VIP for DeviationSentinel Configuration#666

Open
Debugger022 wants to merge 5 commits intomainfrom
feat/VPD-349
Open

[VPD-349]: VIP for DeviationSentinel Configuration#666
Debugger022 wants to merge 5 commits intomainfrom
feat/VPD-349

Conversation

@Debugger022
Copy link
Contributor

@Debugger022 Debugger022 commented Feb 3, 2026

Summary

  • Configure DeviationSentinel, SentinelOracle, UniswapOracle, and PancakeSwapOracle on BSC mainnet and testnet
  • Grant keeper and governance timelock permissions for price monitoring and market protection
  • Enable DeviationSentinel to pause markets and adjust collateral factors when price deviations are detected

Changes

BSC Mainnet (vip-900/bscmainnet.ts)

  • Accept ownership of 4 oracle contracts (DeviationSentinel, SentinelOracle, UniswapOracle, PancakeSwapOracle)
  • Grant keeper permissions: setTokenConfig, setTrustedKeeper, setTokenMonitoringEnabled, resetMarketState
  • Grant keeper DEX oracle permissions: setTokenOracleConfig, setDirectPrice, setPoolConfig
  • Grant DeviationSentinel permissions on all comptrollers: setActionsPaused, setCollateralFactor
  • Whitelist keeper and governance timelocks as trusted keepers

BSC Testnet (vip-900/bsctestnet.ts)*

  • Initial configuration for testnet contracts
  • Addendum: Additional permission grants
  • Addendum 2: Test unpause mint and update collateral factor actions

Simulations

  • Full test coverage for pre/post VIP behavior
  • Verify ownership transfers, permission grants, and trusted keeper whitelisting

Test plan

  • Run npx hardhat test simulations/vip-900/bscmainnet.ts --fork bscmainnet
  • Run npx hardhat test simulations/vip-900/bsctestnet.ts --fork bsctestnet
  • Run npx hardhat test simulations/vip-900/bsctestnet-addendum.ts --fork bsctestnet
  • Run npx hardhat test simulations/vip-900/bsctestnet-addendum-2.ts --fork bsctestnet

NOTE: For maninnet KEEPER address needs to be changed

… mainnet

Configure DeviationSentinel, SentinelOracle, UniswapOracle, and
PancakeSwapOracle on BSC mainnet and testnet. Grants keeper and
governance timelock permissions for price monitoring and market
protection actions.
@Debugger022 Debugger022 self-assigned this Feb 3, 2026
@fred-venus
Copy link
Contributor

@fred-venus
Copy link
Contributor

Also one more section, pls add CAKE into the setting

  1. for pools, use 0x7f51c8AaA6B0599aBd16674e2b17FEc7a9f674A1 from PCS
  2. for deviation, let's have 20%

…R_ADDRESS

Replace KEEPER_ADDRESS with GUARDIAN wallet for ACM permissions on
DeviationSentinel, SentinelOracle, and DEX oracles. KEEPER_ADDRESS is
now only whitelisted as a trusted keeper alongside GUARDIAN and
governance timelocks.
Utility function to wrap VIP commands affecting markets monitored by
DeviationSentinel. Prevents state conflicts when governance modifies
collateral factors while Sentinel holds stale values.
Configure CAKE with PancakeSwap pool for price feeds and set 20%
deviation threshold on DeviationSentinel for price monitoring.
Route CAKE price requests to PancakeSwapOracle via SentinelOracle,
completing the oracle chain for CAKE price deviation monitoring.
Copy link
Contributor

@fred-venus fred-venus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants