Back to catalog / Crypto trading tools
DeFi protocol templates: scaffold contracts from a threat model
Create a testable prototype and risk checklist for staking, AMMs, governance, or flash loans.
Skills
Fix the target chain, token standards, precision, roles, and asset flows. Express economic rules as invariants, then adapt the matching template instead of copying defaults. Test deposits, withdrawals, rewards, fees, slippage, liquidation, and pause paths, including reentrancy, rounding, privilege abuse, and oracle manipulation. Validate on a local chain/fork or testnet; never load production keys. Make deployment parameters explicit and dry-run scripts. Mainnet deployment, fund movement, and governance proposals require independent security review and explicit user approval.
Permissions
Prerequisites
- For scaffolding DeFi staking, AMM, governance, or flash-loan contracts and test plans.
- Specify chain, token standards, economic parameters, threat model, and audit scope.
Permissions
- May create contracts, tests, and deployment scripts; deployment, token issuance, or fund movement are on-chain writes.
- A template is not an audit; test locally/testnet and require separate authorization for production.
Limitations
Design targeted tests for reentrancy, precision/rounding, liquidation, access, oracle, and economic attacks.
Pinned upstream source
- Repository
- wshobson/agents
- File path
- plugins/blockchain-web3/skills/defi-protocol-templates/SKILL.md
- Pinned commit
46891e7e60da0e52baf1050b7b6391b64e84c6d9- Source checked
- 2026-10-14 · Reviewed against the pinned upstream source
Repository metrics
These values describe the upstream repository, not popularity or likes for an individual skill or playbook.
- Stars
- Not collected
- Forks
- Not collected
- Observed at
- Not collected
No metrics snapshot is available yet.
License: MIT
Compatible tools
Smart contract repository · Foundry/Hardhat test suite · Local fork simulator
Main topic
Take a coding Agent change from context to verification