[WONT MERGE][VPD-1151] [VPD-1118] feat: add DeviationSentinelConfigurator helpers contract for vip-616#67
Closed
Debugger022 wants to merge 7 commits into
Closed
[WONT MERGE][VPD-1151] [VPD-1118] feat: add DeviationSentinelConfigurator helpers contract for vip-616#67Debugger022 wants to merge 7 commits into
Debugger022 wants to merge 7 commits into
Conversation
- Combined VIP-616 + VIP-617 cross-chain payload would exceed LayerZero V1's ~10KB RelayerV2 ceiling; encoding grants and per-market wiring in Solidity drops each chain's VIP to ~6 commands - execute() is atomic and gated by NORMAL_TIMELOCK: self-grants transient ACM perms, fans out admin grants to Guardian + 3 Timelocks + EBrake + multisig pauser, wires every monitored market, then self-revokes - Renounces DEFAULT_ADMIN_ROLE on the ACM at the end so the helper retires permanently in one tx with no follow-up cleanup VIP - Abstract base + per-chain children: Ethereum adds CurveOracle (eBTC), Base adds AerodromeSlipstreamOracle (cbBTC, wstETH), Arbitrum routes its 5 markets through UniswapOracle only
- Cover the full execute() path on Ethereum, Arbitrum One, and Base: ownership normalization, ACM DEFAULT_ADMIN_ROLE grant, per-market wiring across UniswapOracle/CurveOracle/AerodromeSlipstreamOracle, and helper self-retirement (renounce + transient revokes) - Shared fixture + parametrized factories so each per-chain entry file is ~20 lines; chain differences live entirely in configs.ts - accessControlTests run on a fresh helper before execute() so the OnlyTimelock revert path is meaningful; remaining suites share a before-hook that calls execute() once - Curve markets skip the direct DEX-oracle pool check: CurveOracle uses a struct rather than a flat tokenPools mapping, and execute() is atomic, so the SentinelOracle assertion implies setPoolConfig succeeded
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
fred-venus
reviewed
May 5, 2026
Contributor
fred-venus
left a comment
There was a problem hiding this comment.
one-off contract, won't merge
|
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.
Description
Adds the per-chain
DeviationSentinelConfiguratorhelper contracts and their fork tests. Each helper packages the entire VIP-616 + VIP-617 bootstrap (ACM grants, EBrake permissions, multisig pauser permissions, trusted-keeper whitelisting, per-market deviation wiring) into a singleexecute()call.This is what allows the cross-chain VIPs to fit under LayerZero V1's RelayerV2 ~10KB payload ceiling — encoding ~100 ACM grants and per-market wiring directly inside Solidity collapses each chain's VIP to ~6 commands (acceptOwnerships +
helper.execute()).Changes
Contracts (contracts/helpers/)
DeviationSentinelConfigurator.sol— abstract base; every grant/revoke pattern shared across chains, plus the Uniswap V3 market wiring primitive.DeviationSentinelConfiguratorEthereum.sol— 9 Uniswap V3 markets + 1 Curve StableSwap-NG market (eBTC priced via the eBTC/WBTC Curve pool).DeviationSentinelConfiguratorArbitrumOne.sol— 5 Uniswap V3 markets, no extra DEX oracles.DeviationSentinelConfiguratorBaseMainnet.sol— 2 Uniswap V3 + 2 Aerodrome Slipstream markets (cbBTC, wstETH).IDeviationSentinelConfigurator.sol— shared external interfaces (ACM, DeviationSentinel, SentinelOracle, IDexPoolOracle, ICurveOracle).Tests (tests/hardhat/Fork/Configurator/)
DEFAULT_ADMIN_ROLEsetup,execute(), then assertions over governance permission grants, EBrake action perms, trusted keepers, per-market wiring, and helper self-retirement.configs.ts.Build config
Header(ExcessBlobGasNotSet)on recent blocks.Trust model
execute()is gated bymsg.sender == NORMAL_TIMELOCK().DEFAULT_ADMIN_ROLEon the local ACM andacceptOwnership()s every contract the helper admins.execute()the helper transiently self-grants the periphery-side admin perms it needs, fans out all governance / EBrake / keeper grants, wires every monitored market, then revokes its transient perms and renouncesDEFAULT_ADMIN_ROLEon the ACM.execute()the helper has no remaining authority — re-running it reverts on the very first self-grant. No follow-up cleanup VIP needed.Test plan
FORKED_NETWORK=ethereum npx hardhat test tests/hardhat/Fork/Configurator/ethereum.tsFORKED_NETWORK=arbitrumone npx hardhat test tests/hardhat/Fork/Configurator/arbitrumone.tsFORKED_NETWORK=basemainnet npx hardhat test tests/hardhat/Fork/Configurator/basemainnet.tsvips/repo (VIP-616 + VIP-617) green against the deployed configurator addresses.