depth-consensus-invari…
L1 mode - deep analysis of consensus safety/liveness invariants, non-determinism sources,…
Part of the Aptos Verification Protocol skill. Read `SKILL.md` for the core workflow first.
$ npx -y skills add PlamenTSV/plamen --agent claude-codeHow it fires
How this agent gets triggered: by you, by Claude, or both.
Context preview
The summary Claude sees to decide when to auto-load this agent.
Part of the Aptos Verification Protocol skill. Read `SKILL.md` for the core workflow first.
> Part of the Aptos Verification Protocol skill. Read `SKILL.md` for the core workflow first.
Before writing PoC tests for HIGH/CRITICAL findings, query the vulnerability database:
mcp__unified-vuln-db__get_attack_vectors(bug_class="{category}")Returns step-by-step attack strategies from real exploits.
mcp__unified-vuln-db__get_poc_template(bug_class="{category}", framework="move_test")Returns example test structures for this vulnerability type.
mcp__unified-vuln-db__get_similar_findings(pattern="{vulnerability description}")Returns similar historical findings with code examples.
mcp__unified-vuln-db__validate_hypothesis(hypothesis="{your finding summary}")Returns supporting/contradicting evidence from historical exploits.
| RAG Result | Impact on Verification | |------------|----------------------| | Attack vector found | Use documented steps as test basis | | PoC template available | Adapt template to this protocol | | Similar exploit exists | Extract key attack pattern | | No similar findings | Proceed with manual analysis, note uncertainty |
In the verification output, add:
### RAG Evidence - **Attack Vectors Consulted**: [list bug classes queried] - **Similar Exploits Found**: [count and brief descriptions] - **PoC Template Used**: [yes/no, which template] - **Historical Precedent**: [describe any matching historical vulnerabilities]
---
> **CRITICAL**: Before assigning severity to ANY finding affecting share/asset ratios or exchange rates, you MUST complete this quantitative analysis. Do NOT use qualitative terms without numbers.
For findings affecting exchange rates, fill in this table:
| Metric | Value | Source | |--------|-------|--------| | Protocol TVL | [X APT or USD] | Production or documented estimate | | Attack cost | [Y] | Calculated from attack steps (gas, tokens, opportunity) | | Attacker profit | [Z] | Calculated (extraction - cost) | | Victim loss per user | [W] | Calculated per affected user | | Affected user count | [N] | one / some / all | | Profit ratio | [Z/Y] | Attacker profit / attack cost |
**Step 1**: Calculate total impact = W * N (victim loss * affected users)
**Step 2**: Calculate profitability = Z/Y (attacker profit / cost)
**Step 3**: Apply severity matrix:
| Total Impact | Profitability > 2x | Profitability 1-2x | Profitability < 1x | |--------------|-------------------|-------------------|-------------------| | > $100,000 | CRITICAL | HIGH | HIGH | | $10,000 - $100,000 | HIGH | HIGH | MEDIUM | | $1,000 - $10,000 | HIGH | MEDIUM | MEDIUM | | < $1,000 | MEDIUM | LOW | LOW |
---
When a finding is classified as a "design flaw" or "accounting inaccuracy" rather than an exploit, apply this escalation check:
| Criterion | YES/NO | |-----------|--------| | Risk-free for the attacker (no capital at risk, or attacker profits even if partial) | | | Repeatable (can be executed on every occurrence of a triggering event) | | | Scales with protocol usage (impact grows with TVL, user count, or time) | | | No mitigation without code change (off-chain monitoring cannot prevent, only detect) | |
**If ALL 4 criteria are YES**: Severity floor = MEDIUM (cannot be rated LOW or Informational) **If 3 of 4 criteria are YES**: Recheck -- the remaining criterion may not actually block the attack at scale
**Rationale**: Design flaws that are risk-free, repeatable, scaling, and unmitigable are effectively permanent value extraction channels. Even if per-event profit is small, cumulative impact over protocol lifetime is significant. "Attacker loses money" is only a valid downgrade if the loss is CERTAIN and PROPORTIONAL -- not if the attacker can structure the trade to break even or profit.
---
> **CRITICAL**: Semi-trusted role findings CANNOT be marked REFUTED unless BOTH directions are analyzed.
Before marking ANY finding involving BOT/KEEPER/OPERATOR roles as REFUTED:
If Direction 2 (USER -> ROLE) is NOT analyzed:
**Example**:
## Finding [SR-3]: Keeper timing abuse **Verdict**: CONTESTED (not REFUTED) **Reason**: Only Direction 1 (keeper->user) analyzed. Direction 2 (user->keeper) not analyzed. ### Missing Analysis - [ ] Can users predict keeper timing? - [ ] Can users manipulate preconditions to block keeper? - [ ] What is system degradation if keeper is blocked? **Step Execution**: check1,2,3,4 | x5,6(not analyzed) -> INCOMPLETE
---
> **PURPOSE**: Prevent di
Autonomous Web3 security auditor for Claude Code and OpenAI Codex CLI. Orchestrates 18-100 AI agents across 40+ phases to produce audit reports with verified PoC exploits — for smart contracts and L1 node-client infrastructure.
Repo: PlamenTSV/plamen
L1 mode - deep analysis of consensus safety/liveness invariants, non-determinism sources,…
Zero-state return, dust analysis, boundary conditions with real constants
External call side effects, cross-chain timing windows, MEV analysis
L1 mode - deep analysis of p2p / RPC / mempool attack surfaces, DoS vectors, pre-auth panic…
Cross-function state mutation tracing, constraint enforcement verification
Deep analysis of token entry/exit paths, donation attacks, type separation