Agent skill · software engineering · rmyndharis
defi-protocol-templates
Implement DeFi protocols with production-ready templates for staking, AMMs, governance, and lending systems. Use when building decentralized finance applications or smart contract protocols.
Why this skill is useful
Provides production-ready templates for DeFi protocols, including executable smart contract code for staking and AMMs that extend the AI's capabilities in decentralized finance.
What it needs
Requires solidity installed locally. About 6k tokens when loaded. Last updated 2026-08-02. 1,255 stars on the source repository.
What this skill does
DeFi Protocol Templates Production-ready templates for common DeFi protocols including staking, AMMs, governance, lending, and flash loans. Do not use this skill when The task is unrelated to defi protocol templates You need a different domain or tool outside this scope Instructions Clarify goals, constraints, and required inputs. Apply relevant best practices and validate outcomes. Provide actionable steps and verification. Use this skill when Building staking platforms with reward distribution Implementing AMM (Automated Market Maker) protocols Creating governance token systems Developing lending/borrowing protocols Integrating flash loan functionality Launching yield farming platforms Staking Contract AMM (Automated Market Maker) Governance Token Flash Loan Resources references/staking.md: Staking mechanics and reward distribution references/liquidity-pools.md: AMM mathematics and pricing references/governance-tokens.md: Governance and voting systems references/lending-protocols.md: Lending/borrowing implementation references/flash-loans.md: Flash loan security and use cases assets/staking-contract.sol: Production staking template assets/amm-contract.sol: Full AMM implementation assets/governance-token.sol: Governance system assets/lending-protocol.sol: Lending platform template Best Practices 1. Use Established Libraries: OpenZeppelin, Solmate 2. Test Thoroughly: Unit tests, integration tests, fuzzing 3. Audit Before Launch: Professional security audits 4. Start Simple: MVP first, add features incrementally 5. Monitor: Track contract health and user activity 6. Upgradability: Consider proxy patterns for upgrades 7. Emergency Controls: Pause mechanisms for critical issues Common DeFi Patterns Time-Weighted Average Price (TWAP): Price oracle resistance Liquidity Mining: Incentivize liquidity provision Vesting: Lock tokens with gradual release Multisig: Require multiple signatures for critical operations Timelocks: Delay execution of governance decisions
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills rmyndharis/defi-protocol-templates