mtarcure/claude-vibe-squad/read-only-reentrancy-check
Claude Code and agent skill by mtarcure/claude-vibe-squad
- community
Checking that the SKILL.md file is still in the repository.
Use when a composable DeFi integration exposes a pricing or share-value view that can be read while the owning protocol is mid-operation behind only a write-side non-reentrant guard, so an attacker re-enters through an ERC-721/1155 receiver or ETH-transfer hook and feeds a second consumer a skewed valuation to over-borrow, mint, or liquidate.
Install
npx vskill@latest install mtarcure/claude-vibe-squad/read-only-reentrancy-checkSKILL.md
Read-Only Reentrancy Check
Audit composable DeFi integrations for read-only reentrancy: while a protocol is mid-operation (its state temporarily inconsistent and its non-reentrant write guard held), an attacker re-enters through an ERC-721/1155/777 receiver hook or a native-transfer callback and reads a view function (price, share value, collateral ratio) that returns a skewed value, which a second consuming protocol trusts to over-borrow, mint, or liquidate.
Source: corpus A §III.3 (OWASP SC08 read-only reentrancy) — strategy-to-vault state mismatches in composable lending/AMM stacks. Impact class: funds theft / vault drain via mispriced valuation (intrinsic). Governing method: Phase-3a hypothesis lane of systematic-attacking; leads only into the verification spine.
Method
- Identify every externally-callable view function used by other protocols for pricing/valuation
(get_virtual_price, getReserves-derived quotes, share-to-asset conversions). slither + manual mapping of cross-protocol consumers.
- For each, check whether it can be read while the owning protocol holds only a write-side
nonReentrant guard (no read guard) during an operation that hands control to the caller (token callbacks, ETH transfers, remove_liquidity).
- Map the consumer: a second protocol that reads that view mid-callback and acts on it (borrow,
mint, liquidate).
- PoC on
anvil --fork: trigger the owning op, re-enter via the receiver hook, read the skewed
view, and execute the over-borrow/mint on the consumer in the same transaction. Link-level negative control = the same read outside the reentrant window returns the correct value and the consumer action reverts/nets zero.
- Add a
medusa/echidnaproperty spanning both protocols: "consumer valuation reads are never
served from an inconsistent mid-operation state."
Acceptance
- Cross-protocol valuation views are enumerated with their reentrancy-window exposure classified.
- The PoC realizes a fund loss on a real fork by reading a skewed view mid-callback; the
outside-window negative control does not.
- Finding names the view, the reentrancy window, and the consuming protocol; deduped before submission.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingmodel-lanes/gemini/.agents/skills/read-only-reentrancy-check/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mtarcure/claude-vibe-squad/read-only-reentrancy-check)