Community生產力與協作github.com

lrafasouza/solana-peg-risk-skill

Claude Code skill: depeg-risk safety gate for Solana stablecoins & LSTs — assess peg health before integrating/listing and emit pasteable risk parameters. MIT.

相容平台Claude Code~Codex CLI~Cursor
npx skills add lrafasouza/solana-peg-risk-skill

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

說明文件

peg-risk — Collateral & Listing Safety Gate

This skill answers one question before you ship: is this pegged asset safe to integrate right now, and what parameters should govern it? It is a pre-integration safety gate — not a monitoring dashboard. The output is a pasteable RISK-PARAMS block (asset class, warn/refuse/liquidate thresholds in bps, oracle staleness bound, direction sensitivity) you can drop directly into lending protocol config, listing logic, or routing guards. The methodology is derived from a public, MIT-licensed peg-risk framework (github.com/lrafasouza/pegana-replay) that has been running in production on Solana mainnet since 2026-05-29.


Why this is not the same as adjacent tools

Other skills/toolsThis skill
Pyth / Switchboard skills — give you a priceJudges whether that price has broken peg relative to intrinsic value
Token-intel / rug scanners — mint, honeypot, holder safetyJudges the asset's peg mechanism risk (market-vs-intrinsic spread, NAV/CR)
jupiter-lend / kamino — a borrower's LTV / liquidation healthJudges the collateral asset's own peg integrity before you accept it

Operating Procedure

What you needGo to
Understand the 5 states and per-class thresholdspeg-states.md
Understand why naive depeg checks lie (and the 5 real guards)failure-modes.md
Get intrinsic + market prices for a specific asset classcomputing-spread.md
Run the full gate and produce a RISK-PARAMS verdictassess.md
Links to APIs, methodology source, operationalization pointerresources.md

Progressive Disclosure

  • peg-states.md — 8 asset classes, 5 states, per-class threshold tables (bps + CR path), constants, and how to recalibrate defaults per asset.
  • failure-modes.md — The 5 ways a naive depeg check lies, with the guard for each and the real mainnet incident that proved it.
  • computing-spread.md — How to compute intrinsic and market for each class using 2026 APIs (Pyth Hermes, Jupiter, Helius DAS, Sanctum, @solana/kit). Includes Tier 1 runnable adapters and Tier 2 on-chain-read recipes.
  • assess.md — The gate workflow: classify asset → pull spread → run classifier → emit VERDICT + pasteable RISK-PARAMS block. Includes a worked jitoSOL example.
  • resources.md — Canonical links to methodology source, Pyth, Helius, Jupiter, Sanctum, Switchboard, plus a 3-line "run this continuously" pointer.

Command & Agent

  • Command: /peg-assess <mint> — runs the gate end-to-end for a given mint address.
  • Agent: peg-risk-analyst (model: opus) — performs the full classification workflow.

This skill is read-only. All on-chain interactions are reads only. The skill never signs transactions, never sends funds, and never requests a private key. Always use your own HELIUS_API_KEY; the kit's bundled key returns 401. Thresholds in this skill are defaults derived from production data — treat them as starting points and recalibrate per asset.

相關技能