Centralization risk

From PlamenTSV/plamen · View interactive version

Centralization risk is an AI agent skill from the GitHub repository PlamenTSV/plamen. Trigger Protocol has privileged roles (admin, owner, operator, governance, multisig) - Covers Single points of failure, privilege escalation, external governance dependencies

How to use this skill

Skill file

Skill: CENTRALIZATION_RISK

Trigger: Protocol has privileged roles (admin, owner, operator, governance, multisig)

Covers: Single points of failure, privilege escalation, external governance dependencies

Required: NO (optional -- recommended when protocol has 3+ distinct privileged roles)

Trigger Patterns

onlyOwner|onlyAdmin|onlyGovernance|DEFAULT_ADMIN_ROLE|OPERATOR_ROLE|timelock|multisig|governance

Reasoning Template

Step 1: Privilege Inventory

Enumerate ALL privileged functions using Slither (list_functions + analyze_modifiers):

| # | Function | Contract | Modifier/Role | What It Controls | Impact If Abused |

|---|----------|----------|---------------|------------------|-----------------|

| 1 | {func} | {contract} | {role} | {parameter/state} | {worst case} |

Categorize each by impact:

Step 2: Role Hierarchy and Separation

Map the role hierarchy:

| Role | Granted By | Can Grant Others? | Revocable? | Timelock? |

|------|-----------|-------------------|-----------|-----------|

| {role} | {grantor} | YES/NO | YES/NO | YES/NO ({duration}) |

Check:

Step 3: Single Points of Failure

For each privileged role:

| Role | Key Compromise Impact | Mitigation | Residual Risk |

|------|----------------------|------------|---------------|

| {role} | {what attacker can do} | {multisig? timelock? guardian?} | {what remains} |

Severity assessment:

Step 4: External Governance Dependencies

Identify parameters or behaviors controlled by EXTERNAL governance:

| Dependency | External Entity | What They Control | Protocol Impact If Changed | Notification? |

|------------|----------------|-------------------|---------------------------|---------------|

| {dep} | {entity} | {parameter/behavior} | {impact on this protocol} | YES/NO |

Pattern: Protocol depends on external governance decisions (e.g., external protocol upgrades, token migrations, parameter changes) that can silently affect this protocol's behavior without any on-chain notification.

Check:

Step 5: Emergency Powers

Document emergency/pause capabilities:

| Emergency Function | Who Can Call | What It Affects | Recovery Path | Time to Recover |

|-------------------|-------------|-----------------|---------------|-----------------|

| {func} | {role} | {scope} | {how to resume} | {estimate} |

Check:

Output Schema

## Finding [CR-N]: Title

**Verdict**: CONFIRMED / PARTIAL / REFUTED
**Step Execution**: checkmark1,2,3,4,5 | xN(reason) | ?N(uncertain)
**Severity**: Critical/High/Medium/Low/Info
**Location**: Contract.sol:LineN

**Centralization Type**: FUND_CONTROL / PARAMETER_CONTROL / OPERATIONAL_CONTROL / UPGRADE_CONTROL
**Affected Role**: {role_name}
**Mitigation Present**: {multisig/timelock/guardian/NONE}

**Description**: What's wrong
**Impact**: What can happen if role is compromised or acts maliciously
**Recommendation**: How to mitigate (add timelock, separate roles, add guardian)

Step Execution Checklist

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.