Contract
- Input: problem description and inputs defined by the skill body.
- Output: Markdown artifact with completed process steps.
- Side effects: none.
- Dependencies: none.
- Stop condition: all process steps executed; artifact saved with required sections.
- Risk: low.
- Boundary: produces reasoning artifact only; no system changes.
DeFi Protocol Analysis
Analyse a DeFi protocol — AMM, lending, stablecoin, or derivative — for mechanics, economic security, composability, and regulatory posture.
When to use
- The user wants to understand, build on, or invest in a DeFi protocol.
- A protocol needs an economic or security due-diligence pass.
- A quant or portfolio strategy involves DeFi as an asset class or venue.
Process
1. Classify the protocol type
Name the category and specific protocol:
- AMM: Uniswap, Curve, Balancer; bonding curve, fee tiers, concentrated liquidity.
- Lending / borrowing: Aave, Compound, Morpho; supply / borrow rates, utilisation curves.
- Stablecoins: over-collateralised (DAI), partially (LUSD), algorithmic (logic vs reserve).
- Derivatives / structured: GMX, dYdX, Perp; synthetic vs physically-settled.
- Yield aggregators: Yearn, Convex; strategy composition, fee sharing.
Completion criterion: category and protocol named; brief mechanism described.
2. Core mechanics
- State variables: what state does the protocol hold? (Reserves, collateral, positions.)
- Invariant: what mathematical invariant holds? (x·y=k, utilisation U = borrows/supply, etc.)
- Mechanisms: arbitrage, liquidation, fee distribution — state each with its trigger.
- Parameters: fee tiers, collateral factors, liquidation thresholds, rate models.
Completion criterion: invariant, mechanisms, and parameters all stated.
3. Economic security
- TVL: total value locked; source and meaning (TVL ≠ value; can be inflated).
- Collateral: over-collateralisation ratio; worst-case if collateral drops 50%.
- Oracle: how is price obtained? Chainlink? TWAP? Univ3? What if it fails?
- Attack surface: oracle manipulation, insolvency cascade, liquidation spiral, governance attack.
Completion criterion: TVL, collateral ratio, oracle, and at least one attack surface documented.
4. Composability and systemic risk
- Composability: does it call other protocols? Can a reentrancy or price-manipulation cascade occur?
- Contagion: if one major protocol fails (UST-style), what is the contagion path?
- Fee sustainability: are
1---2name: web3-defi3description: Analyse DeFi protocols — AMMs, lending, stablecoins, derivatives — across protocol mechanics, economic security, and composability risks.4---56## Contract78- **Input:** problem description and inputs defined by the skill body.9- **Output:** Markdown artifact with completed process steps.10- **Side effects:** none.11- **Dependencies:** none.12- **Stop condition:** all process steps executed; artifact saved with required sections.13- **Risk:** low.14- **Boundary:** produces reasoning artifact only; no system changes.151617# DeFi Protocol Analysis1819Analyse a **DeFi protocol** — AMM, lending, stablecoin, or derivative — for mechanics, economic security, composability, and regulatory posture.2021## When to use2223- The user wants to understand, build on, or invest in a DeFi protocol.24- A protocol needs an economic or security due-diligence pass.25- A quant or portfolio strategy involves DeFi as an asset class or venue.2627## Process2829### 1. Classify the protocol type3031Name the category and specific protocol:3233- **AMM:** Uniswap, Curve, Balancer; bonding curve, fee tiers, concentrated liquidity.34- **Lending / borrowing:** Aave, Compound, Morpho; supply / borrow rates, utilisation curves.35- **Stablecoins:** over-collateralised (DAI), partially (LUSD), algorithmic (logic vs reserve).36- **Derivatives / structured:** GMX, dYdX, Perp; synthetic vs physically-settled.37- **Yield aggregators:** Yearn, Convex; strategy composition, fee sharing.3839**Completion criterion:** category and protocol named; brief mechanism described.4041### 2. Core mechanics4243- **State variables:** what state does the protocol hold? (Reserves, collateral, positions.)44- **Invariant:** what mathematical invariant holds? (x·y=k, utilisation U = borrows/supply, etc.)45- **Mechanisms:** arbitrage, liquidation, fee distribution — state each with its trigger.46- **Parameters:** fee tiers, collateral factors, liquidation thresholds, rate models.4748**Completion criterion:** invariant, mechanisms, and parameters all stated.4950### 3. Economic security5152- **TVL:** total value locked; source and meaning (TVL ≠ value; can be inflated).53- **Collateral:** over-collateralisation ratio; worst-case if collateral drops 50%.54- **Oracle:** how is price obtained? Chainlink? TWAP? Univ3? What if it fails?55- **Attack surface:** oracle manipulation, insolvency cascade, liquidation spiral, governance attack.5657**Completion criterion:** TVL, collateral ratio, oracle, and at least one attack surface documented.5859### 4. Composability and systemic risk6061- **Composability:** does it call other protocols? Can a reentrancy or price-manipulation cascade occur?62- **Contagion:** if one major protocol fails (UST-style), what is the contagion path?63- **Fee sustainability:** are