What problem does it solve? Writing DeFi smart contracts from scratch is error-prone and time-consuming, with risks like reentrancy bugs and incorrect reward math. This Skill provides ready-to-adapt Solidity contract templates for the most common DeFi protocol patterns. ## Core Features & Use Cases - Staking Rewards Contract: Implements token staking with time-based reward distribution, reentrancy protection, and per-user reward accounting using OpenZeppelin libraries. - AMM and Liquidity Pools: Provides a constant-product automated market maker with liquidity minting/burning, a 0.3% swap fee, and LP share tracking. - Governance and Flash Loans: Includes an ERC20Votes-based governance token with proposal voting, plus a flash loan provider and receiver pattern with fee enforcement. - Use Case: When building a yield farming platform, use the staking template for reward distribution and the AMM template for the liquidity pool, then adapt constructor parameters and fee rates to your tokenomics. ## Quick Start Use the defi-protocol-templates skill to generate a staking rewards contract for my ERC20 token with a configurable reward rate.