VDB-24: VIP-664 [BNB Chain] Disable DeviationSentinel for DAI, resume borrowing, reset EBrake snapshots#737
Closed
trumpgpt-bot wants to merge 1 commit into
Conversation
…eset EBrake snapshots Adds VIP-664 (bscmainnet, REGULAR) and its fork simulation: - Disable DeviationSentinel monitoring for DAI (setTokenMonitoringEnabled(DAI, false)) - Resume borrowing on vDAI (setActionsPaused([vDAI],[BORROW],false)); CF stays 0 (pre-incident CF was already 0, so the EBrake CF snapshot is empty — nothing to restore) - Reset the vDAI EBrake snapshots (resetCFSnapshot/resetBorrowCapSnapshot/resetSupplyCapSnapshot) No new ACM grants required. Simulation proves borrowing DAI works post-execution and that handleDeviation(vDAI) now reverts TokenMonitoringDisabled. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Debugger022
reviewed
Jul 13, 2026
Contributor
There was a problem hiding this comment.
VIP-664 LGTM
- Sim green (19/19, bscmainnet fork).
- Addresses, signatures/ACM strings verified. No new ACM grants needed. Market state in VDB-24 are also correct.
- CF stays 0 Pre-incident CF was already 0 and the sentinel only paused borrow, so there's nothing to restore.
- Three EBrake resets are no-ops fine to keep. vDAI snapshots are already empty, so they only emit events. Leaving them in gives a clean slate and a good reference pattern for future sentinel recovery VIPs.
- Note is true Stale helper (out of scope).
src/DeviationSentinel.tswas for old architecture no more need code is dead
cc: @trumpgpt-bot
Debugger022
marked this pull request as ready for review
July 13, 2026 08:24
fred-venus
reviewed
Jul 14, 2026
Contributor
|
To be merged with #736 |
fred-venus
added a commit
that referenced
this pull request
Jul 14, 2026
… execution Fold PR #737 (VDB-24: disable DeviationSentinel monitoring for DAI, resume vDAI borrowing, reset EBrake snapshots) into the mainnet VIP so both changes execute in a single proposal. - vips/vip-999/bscmainnet.ts: commands 1-5 = DAI fix (sentinel disable first, unpause BORROW, three EBrake snapshot resets), command 6 = FRV setVaultImplementation. No cap restore: EBrake never snapshotted vDAI caps (marketStates(vDAI) = (0,0,false,false) on-chain), live caps intact. - simulations/vip-999/bscmainnet.ts: fork block 109660000 (both pre-states verified on-chain: FRV controller on old impl, vDAI BORROW paused, sentinel monitoring on, EBrake snapshots empty); merged pre/post suites and event expectations; DAI behavioral borrow proof runs after the FRV lifecycle with Chainlink-pinned prices. 31 passing on bscmainnet fork. - ABIs: add Comptroller/DeviationSentinel/EBrake/VToken; ResilientOracle replaced by its superset from PR #737. Testnet VIP and sim unchanged (DAI fix is mainnet-only); 16 passing. Co-Authored-By: Claude Fable 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds VIP-664 (bscmainnet,
ProposalType.REGULAR) and its fork simulation implementing VDB-24.What changes (single Normal-Timelock batch):
DeviationSentinel.setTokenMonitoringEnabled(DAI, false)— stop monitoring DAI (deviation config preserved); ordered first so vDAI can't be re-tripped around execution.Comptroller.setActionsPaused([vDAI],[BORROW], false)— resume borrowing. No collateral-factor command: vDAI's pre-incident CF was already 0 (the EBrake CF snapshot is empty because the weekend incident only paused borrowing), so there is nothing to restore and no CF is invented.EBrake.resetCFSnapshot(vDAI)+resetBorrowCapSnapshot(vDAI)+resetSupplyCapSnapshot(vDAI)— clear the vDAI snapshots.No new ACM permissions — the Normal Timelock already holds every role used (verified via
hasRoleon the ACM).Notes for reviewers: The deployed DeviationSentinel (post VIP-610/EBrakeV2) is detection-only and routes to EBrake; the repo helper
src/DeviationSentinel.ts(wrapWithSentinelGuard) describes the old design and is intentionally not used. Snapshot reads/resets live on EBrake; its sim ABI is built from the deployed impl. Every address/signature was verified against networkAddresses, the oracle deployment artifacts, and on-chain reads.Tests:
npx hardhat test simulations/vip-664/bscmainnet.ts --fork bscmainnet→ 19 passing (pre-state, event-count assertions, post-state, and a behavioral proof that a user can borrow DAI again and thathandleDeviation(vDAI)now revertsTokenMonitoringDisabled).yarn lint/yarn prettierclean on the added files.Open points (from the approved spec): confirm CF stays 0 vs an explicit CF/LT; snapshot-reset scope (all three included by default); proposal type REGULAR vs FAST_TRACK.
Opened by the Venus dev bot. Review required; the bot cannot merge.