Garyson26/Trident-SecOps-Skills / skills/smart-contract-audit
smart-contract-audit
VerifiedSmart contract and Web3 security audit skill for Solidity, Vyper, Move, and Cairo. Covers reentrancy, access control, oracle manipulation, MEV/sandwich exposure, signature replay, upgrade safety, ERC token edge cases, bridge risk, and DeFi invariants. Tooling includes Slither, Mythril, Echidna, Foundry, Halmo, Certora, and custom invariant tests. Use for design review, code audit, and incident analysis on contracts you own or are authorized to assess.
Smart Contract Audit
Authorization Boundary
- Audit only protocols and code where you have explicit authorization or a public bounty scope.
- Treat private keys and seed phrases as untouchable; never request, store, or use them.
- Distinguish lab/testnet from mainnet; never simulate exploits against live user funds.
Audit Workflow
- Architecture: contract map, upgrade pattern, proxy admin, roles, external calls, oracles, AMMs, bridges, governance.
- Threat model: trust assumptions, economic invariants, privileged actors, off-chain dependencies, MEV exposure.
- Static and semantic:
slither,aderyn,semgrep,mythril, Solidity compiler warnings; review storage layout for upgradeable contracts. - Property tests: write invariants in Foundry/Echidna/Halmo; fuzz with state-machine harnesses; run differential tests vs reference.
- Manual review: reentrancy (CEI), unchecked external calls, signature replay, frontrunning, slippage, rounding, oracle freshness/TWAP, ERC-20 fee-on-transfer and rebasing edge cases, ERC-721/1155 callbacks.
- Economic: invariant set on liquidity, fees, debt, collateral; simulate MEV (
mev-share,cannon,tenderly). - Report: severity, likelihood, impact, fix, regression test.
High-Risk Patterns Checklist
- Upgrade safety: storage gaps, initializer guards, admin keys, timelocks.
- Bridge messages: replay protection, finality, message origin validation.
- Oracles: single-source, manipulable spot price, missing staleness checks.
- Governance: flash-loan-driven votes, quorum manipulation, proposal hijack.
- Token assumptions: non-standard ERC-20 (USDT-style, rebasing, fee-on-transfer, blocklist).
Output Contract
scope.md,architecture.md,threat-model.md.findings/<id>.md: severity, code refs, PoC, fix, test.invariants/: Foundry/Echidna harnesses.report.pdforreport.md: exec summary, findings, appendices, remediation status matrix.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 470k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 470k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 470k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |