Skip to content

[VPD-1097]: add Phase1 Executor permission grant - BSC mainnet & Testnet#699

Open
Debugger022 wants to merge 2 commits intomainfrom
feat/VPD-1097
Open

[VPD-1097]: add Phase1 Executor permission grant - BSC mainnet & Testnet#699
Debugger022 wants to merge 2 commits intomainfrom
feat/VPD-1097

Conversation

@Debugger022
Copy link
Copy Markdown
Contributor

Summary

  • Scaffolds VIP-701 to wire the Phase -1 Executor contract (venus-periphery#61) between off-chain signal monitors and EBrake on BSC mainnet and testnet
  • Tighten-only validation layer: routes LTV/cap decreases and supply/borrow halts to EBrake with on-chain bound checks; loosening only via governance VIP
  • Depends on VIP-610 (EBrake configuration)

Changes

VIP (vips/vip-701/)

  • bscmainnet.ts — grants signal monitor perms on 4 Executor handlers, Executor perms on 5 EBrake funcs, Normal Timelock perm on setMarketConfig
  • bsctestnet.ts — same layout, testnet ACM (0x45f8a08F) and EBrake (0x957c09e3)
  • Perm arrays exported from VIP files for reuse in sims (single source of truth)

Simulations (simulations/vip-701/)

  • bscmainnet.ts — pre/post ACM permission checks, asserts 10 RoleGranted events
  • bsctestnet.ts — mirror of mainnet sim
  • abi/AccessControlManager.json — copied from vip-610

TODOs before proposal

  • EXECUTOR address (deployment VIP must land first)
  • SIGNAL_MONITOR address
  • BLOCK_NUMBER in both sims
  • Confirm setMarketConfig tuple layout vs final IExecutor.sol

Test plan

  • Executor deployed on BSC testnet; set EXECUTOR/SIGNAL_MONITOR/BLOCK_NUMBER
  • npx hardhat test simulations/vip-701/bsctestnet.ts --fork bsctestnet — passes
  • Repeat for mainnet once deployed: npx hardhat test simulations/vip-701/bscmainnet.ts --fork bscmainnet
  • Verify 10 RoleGranted events on execution

Wires the Phase -1 Executor contract between off-chain signal monitors
and EBrake. Grants monitor perms on Executor action handlers, Executor
perms on EBrake, and Normal Timelock perm on setMarketConfig. Mainnet
and testnet scaffolds with shared perm arrays imported from the VIP for
single source of truth.
@Debugger022 Debugger022 self-assigned this Apr 22, 2026
- `handleSupplyHalt` → `handleSupplyCapExceeding` (orphaned role:
  no such function on Executor)
- `handleBorrowHalt` → `handleBorrowCapExceeding` (same)
- `setMarketConfig` tuple: 6-field phantom → 3-field
  `(minBorrowCap, minSupplyCap, enabled)` matching
  IExecutor.MarketConfig
- Broaden `setMarketConfig` grant from Normal-only to Guardian +
  all three timelocks
@Debugger022 Debugger022 marked this pull request as ready for review April 23, 2026 05:02
@Debugger022 Debugger022 changed the title [VPD-1097]: add VIP-701 to configure tighten-only Executor on BSC [VPD-1097]: add Phase1 Executor permission grant - BSC mainnet Apr 23, 2026
@Debugger022 Debugger022 changed the title [VPD-1097]: add Phase1 Executor permission grant - BSC mainnet [VPD-1097]: add Phase1 Executor permission grant - BSC mainnet & Testnet Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant