Skip to content

feat: simpler role breakdown for risk management - #1355

Draft
Kogaroshi wants to merge 4 commits into
feat/configurator-role-breakdownfrom
fix/simpler-role-breakdown
Draft

feat: simpler role breakdown for risk management#1355
Kogaroshi wants to merge 4 commits into
feat/configurator-role-breakdownfrom
fix/simpler-role-breakdown

Conversation

@Kogaroshi

Copy link
Copy Markdown
Contributor

Configurator role breakdown

Carves risk management and emergency out of each configurator's single role, and renames the DOMAIN_ADMIN roles to DOMAIN_BASE.

ID Label Selectors
200 HUB_CONFIGURATOR_DOMAIN_BASE_ROLE addAsset, addAssetWithDecimals, updateLiquidityFee, updateFeeReceiver, updateFeeConfig, updateInterestRateStrategy, updateReinvestmentController, resetAssetCaps, addSpoke, addSpokeToAssets, updateSpokeActive, updateSpokeHalted, resetSpokeCaps
201 HUB_CONFIGURATOR_RISK_MANAGEMENT_ROLE updateSpokeAddCap, updateSpokeDrawCap, updateSpokeRiskPremiumThreshold, updateSpokeCaps, updateInterestRateData
202 HUB_CONFIGURATOR_EMERGENCY_ROLE deactivateAsset, haltAsset, deactivateSpoke, haltSpoke
400 SPOKE_CONFIGURATOR_DOMAIN_BASE_ROLE updateReservePriceSource, addReserve, updatePaused, updateFrozen, updateBorrowable, updateReceiveSharesEnabled, updatePositionManager
401 SPOKE_CONFIGURATOR_RISK_MANAGEMENT_ROLE updateLiquidationTargetHealthFactor, updateHealthFactorForMaxBonus, updateLiquidationBonusFactor, updateLiquidationConfig, updateCollateralRisk, addCollateralFactor, updateCollateralFactor, addMaxLiquidationBonus, updateMaxLiquidationBonus, addLiquidationFee, updateLiquidationFee, addDynamicReserveConfig, updateDynamicReserveConfig
402 SPOKE_CONFIGURATOR_EMERGENCY_ROLE pauseReserve, pauseAllReserves, freezeReserve, freezeAllReserves

The emergency selectors only ever move a target to a safer state and cannot revert it, so the role can be held by a faster-moving entity than the base role; the two-way flags (updateSpokeActive/updateSpokeHalted, updatePaused/updateFrozen) and the Hub cap resets stay on the base role, since only risk management can restore what they zero.

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.

2 participants