defi-protocol-templates
DeFiプロトコルコントラクトをより迅速に構築
堅実なDeFiコントラクトのテンプレートが必要だが、一から作りたくない方のために、ステーク、AMM、ガバナンス、レンディングプロトコル向けのそのまま使える構造物を提供します。素早く適応可能です。
スキルZIPをダウンロード
Claudeでアップロード
設定 → 機能 → スキル → スキルをアップロードへ移動
オンにして利用開始
テストする
「defi-protocol-templates」を使用しています。 Explain the AMM template and list the main functions.
期待される結果:
- The AMM tracks two token reserves and issues liquidity shares to providers.
- Main functions are addLiquidity, removeLiquidity, and swap.
- Prices follow a constant product model with a 0.3 percent fee on swaps.
「defi-protocol-templates」を使用しています。 What does the staking contract reward calculation look like?
期待される結果:
- The contract uses rewardPerTokenStored to track accumulated rewards per staked token.
- When users stake or withdraw, pending rewards are calculated and distributed.
- The formula multiplies time elapsed by reward rate divided by total supply.
「defi-protocol-templates」を使用しています。 How do I create a governance proposal?
期待される結果:
- Call the propose function with a description string.
- You must hold tokens above the proposal threshold.
- The proposal enters a voting period that lasts approximately three days.
セキュリティ監査
安全Pure documentation skill containing only Solidity code examples in markdown. No executable scripts, network calls, file system access, or environment variable harvesting detected. All 74 static findings are false positives caused by the scanner misinterpreting Solidity code syntax and markdown formatting as security threats.
リスク要因
🌐 ネットワークアクセス (1)
⚡ スクリプトを含む (16)
品質スコア
作れるもの
DeFi MVPのプロトタイプ作成
ステークとAMMのテンプレートを適用して、新しいプロトコルアイデアを迅速に検証します。
プロトコルスコープの計画
ガバナンスとフラッシュローンの例をレビューしてプロダクト要件を定義します。
ベースラインパターンの比較
テンプレートをベースとして使用して、カスタムコードの不足しているコントロールを特定します。
これらのプロンプトを試す
ステーク報酬テンプレートを要約し、主要なステート変数とイベントを列出してください。
AMMテンプレートにおけるaddLiquidityとswapの動作を説明し、数学的な前提条件を注記してください。
テンプレートにおけるガバナンス提案のライフサイクルを概説し、カスタムロジックを配置すべき場所を列出してください。
フラッシュレイヤンプレートにおけるセキュリティチェックを特定し、2つの追加のセーフガードを提案してください。
ベストプラクティス
- 適応したテンプレートをデプロイ前に包括的なユニットテストを追加してください
- トークンとアクセス制御ロジックには監査済みのOpenZeppelinライブラリを使用してください
- 数学のオーバーフローと丸みのエッジケースを本番環境でレビューしてください
回避
- 専門的なセキュリティ監査なしでテンプレートをデプロイすること
- 重要な機能のアクセス制御と一時停止メカニズムをスキップすること
- トークンの小数点処理と手数料のエッジケースを無視すること
よくある質問
どのようなプラットフォームと互換性がありますか?
これらのテンプレートの制限は何ですか?
これを自分のプロジェクトに統合するにはどうすればよいですか?
このスキルはデータにアクセスしますか?
コンパイルが失敗した場合はどうすればよいですか?
完全なDeFiフレームワークと比較してどうですか?
開発者の詳細
作成者
wshobsonライセンス
MIT
リポジトリ
https://github.com/wshobson/agents/tree/main/plugins/blockchain-web3/skills/defi-protocol-templates参照
main
ファイル構成
📄 SKILL.md