centralization-risk

Solid

Detect centralization and trust-assumption risks — admin powers, single-key risk, missing timelocks, upgrade authority, treasury keys, pause permanence, blacklisting authority, oracle authority. Activate on `onlyOwner`, `onlyRole`, `AccessControl`, upgrade authorizations, pause/unpause functions, mint/burn caps, treasury/fee setters.

AI & Automation 38 stars 5 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 82/100

Stars 20%
53
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Centralization risk audit ## Why this matters Centralization findings are non-exploits in the traditional sense, but they're the most common reason audits flag a protocol as "rugpullable". The protocol can be the attacker. Investors deserve a clear inventory. ## When this applies - Every privileged function (mint, burn, set-fee, set-oracle, upgrade, pause, recover, sweep, blacklist) - Multi-sig configuration - Timelock configuration - Upgrade authority (UUPS `_authorizeUpgrade`) - Emergency-withdraw / emergency-pause - Token mint caps + upgradability of caps ## Detection patterns ### Single-key admin (HIGH) ```solidity contract X is Ownable { function upgradeTo(address impl) external onlyOwner { ... } function setFee(uint256 fee) external onlyOwner { ... } // ← one key, can pull rug } ``` Findings: - "Owner can upgrade implementation immediately, with no timelock or multi-sig." - "Single key controls treasury." ### No timelock (HIGH) `onlyOwner` upgrades / fee changes / oracle changes that take effect immediately. Add a Timelock (OZ TimelockController), document the delay. ### Pause-without-time-cap (HIGH) `pause()` with no auto-unpause. Owner can permanently freeze user funds. ### Mint without cap (HIGH) ```solidity function mint(address to, uint256 amt) external onlyMinter { _mint(to, amt); } // ← no cap, inflation risk ``` ### Blacklist without on-chain criteria (HIGH) A `blacklist(address)` function with no public criteria = "the protocol's discr...

Details

Author
iktok90-design
Repository
iktok90-design/ai-smart-contract-auditor
Created
1 weeks ago
Last Updated
2 days ago
Language
JavaScript
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category