centralization-risk
Skill36 starsChanged 5 months agoMITView on GitHub
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.
In this repository44 other files it gives its agents.
- access-controlSkill
- approval-issuesSkill
- caching-and-incrementalSkill
- confidence-scoringSkill
- cosmwasmSkill
- cross-chain-messagingSkill
- cross-contract-stateSkill
- delegatecall-risksSkill
- diamond-eip2535Skill
- dos-vectorsSkill
- erc1271-contract-signaturesSkill
- erc4337-account-abstractionSkill
- erc4626-inflationSkill
- false-positive-feedback-loopSkill
- fee-on-transferSkill
- flash-loan-attacksSkill
- initializationSkill
- inline-assemblySkill
- integer-issuesSkill
- intents-erc7683Skill
- known-good-comparisonSkill
- liquidation-cascadeSkill
- mev-frontrunningSkill
- mev-pbsSkill
- multi-pass-self-critiqueSkill
- oracle-manipulationSkill
- oracle-redundancySkill
- permit2-patternsSkill
- pragma-and-addressesSkill
- progress-and-streamingSkill
- reentrancySkill
- restaking-eigenlayerSkill
- selfdestruct-eip6780Skill
- signature-malleabilitySkill
- signature-replaySkill
- solana-anchorSkill
- storage-layoutSkill
- stylus-rustSkill
- token-compatibilitySkill
- tx-context-misuseSkill
- unchecked-callsSkill
- ve-lock-governanceSkill
- vyper-specificSkill
- zk-verifier-bugsSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Every privileged function (mint, burn, set-fee, set-oracle, upgrade, pause, recover, sweep, blacklist)
- Distinctive: line 120
Test networks / staging contracts are fine to centralize.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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)
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)
function mint(address to, uint256 amt) external onlyMinter { _mint(to, amt); } // ← no cap, inflation riskBlacklist without on-chain criteria (HIGH)
A blacklist(address) function with no public criteria = "the protocol's discretion to freeze you".
Oracle controlled by single admin (HIGH)
function setOracle(address o) external onlyOwner { oracle = IOracle(o); }Admin → switches to malicious oracle → liquidates everyone.
Sweep-any-token without allowlist (HIGH — also in [[access-control]])
recoverERC20(token) that can sweep user deposits.
Upgrade authority over user funds, no exit window (HIGH)
Users should have a window after upgrade announcement to withdraw if they disagree. Without it, governance can rug by upgrade.
"Renounced ownership" theater (HIGH)
Ownable renounced but DEFAULT_ADMIN_ROLE retained. Or admin role transferred to a smart contract that has its own backdoor.
EOA multisig threshold of 1 (HIGH)
Marketed as "multi-sig" but threshold == 1 defeats the purpose.
Validator / sequencer centralization (HIGH for bridges, L2s)
Single sequencer / centralized validator set. Document for bridges + L2 deployments.
Treasury without time-locked spend (HIGH)
Owner can drain treasury immediately.
selfdestruct reachable by admin (MEDIUM-HIGH)
See [[selfdestruct-eip6780]].
Severity rubric
| Pattern | Severity |
| EOA controls upgrade + treasury + oracle | Critical (for trust report) |
| Pause with no auto-unpause | High |
| Mint with no cap | High |
| Unrestricted blacklist | High |
| No timelock on key params | High |
| Sweep includes user deposits | High |
| Multisig threshold = 1 | High |
| Renounce + retained admin role | High |
| Timelock < 24h on high-impact ops | Medium |
| Single-sequencer L2 | Medium-Info (contextual) |
Output format
Centralization findings should produce a "Trust report" section in /report:
Admin powers:
setOracle— can replace price oracle → drain liquidations (no timelock).upgradeTo— can swap implementation (UUPS, no timelock).recoverERC20— can sweep any token, including user deposits.pause— can freeze withdrawals indefinitely (no auto-unpause).setFee— can set fee to 100% (no cap).Mitigations in place:
- Owner is a Gnosis Safe at
0x…with 3/5 threshold.- 24h Timelock at
0x…mediatessetOracleandupgradeTo.Trust assumption: Users must trust the multi-sig signers and the 24h timelock window.
Remediation patterns
- Multi-sig (3+ of N) for admin role.
- Timelock (≥48h for upgrades, ≥24h for params).
- Per-function caps on what admin can change (fee ≤ 5%, mint ≤ 10% of supply).
- Auto-unpause after N hours.
- Withdraw-only mode on pause.
- Public "trust assumptions" doc — every admin function listed.
False-positive notes
- A pre-launch protocol with single admin pending timelock setup is normal — flag with recommendation, not critical.
- Test networks / staging contracts are fine to centralize.
Related
- [[access-control]]
- [[initialization]]
- [[delegatecall-risks]]
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

