Defi Amm Security

by affaan-mef648e01899bNo license275K starsListed Oct 8, 2026Updated Oct 8, 2026Repository updated 3 days ago

DeFi自動マーケットメーカー(AMM)スマートコントラクトセキュリティ監査パターン。フラッシュローン、スリッページ、サンドイッチング攻撃、価格操作、再入攻撃、不正確な整数演算をカバー。

Instructions onlySecurity
AI-generated overview

Checklist of DeFi AMM smart contract security patterns covering flash loans, slippage, sandwiching, price manipulation and reentrancy.

What it does
This skill provides security patterns and an audit checklist for automated market maker (AMM) smart contracts. It lists common vulnerabilities such as flash loan attacks, insufficient slippage protection, reentrancy, and price manipulation, and gives a checklist covering oracle price references, slippage protection, checks-effects-interactions, reentrancy guards, integer overflow handling, and access control. It is guidance only and produces no files or scripts.
When to use it
Use it when reviewing AMM contracts such as Uniswap, Curve or Balancer, or when looking for security issues in swap, mint and burn logic. It also fits identifying flash loan and price manipulation weaknesses and testing the economic security of a DeFi protocol.
Requirements
No tools, packages, runtimes, credentials or network access are required; the skill contains instructions only and ships no scripts.

DeFi AMM セキュリティ

自動マーケットメーカー(AMM)スマートコントラクトのセキュリティパターンと監査チェックリスト。

使用時期

  • Uniswap、Curve、BalancerなどのようなAMMコントラクトをレビュー
  • スワップ関数、ミント、バーンロジックでセキュリティの問題を検出
  • フラッシュローン、価格操作脆弱性を特定
  • DeFiプロトコルの経済セキュリティをテスト

一般的な脆弱性

1. フラッシュローン攻撃

ローンが同一ブロック内で返却されたと仮定するコントラクトを攻撃。

2. スリッページ不足

ユーザーが予期しない不利な価格変更を受ける。

3. 再入攻撃

外部呼び出し後の状態チェック。

4. 価格操作

オンチェーン価格参照の信頼不足。

セキュリティチェックリスト

  • すべての価格参照はオラクルから取得
  • フラッシュローンは考慮(価格を信頼しない)
  • スリッページ保護が実装
  • チェック・エフェクト・相互作用パターン使用
  • 再入保護(ミューテックス/チェック付き)
  • 整数オーバーフロー/アンダーフロー処理
  • アクセス制御とロール分離

詳細については、ドキュメントを参照してください。

Source and attribution

Source:affaan-m/eccindocs/ja-JP/skills/defi-amm-securityat commitef648e0

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal