sentinel_stablecoins
Monitor stablecoin pegs (USDC, USDT, DAI) across blockchain networks to detect depegs and deviations from target values.
Instructions
Monitor stablecoin pegs (USDC, USDT, DAI) across all chains. Detects depegs and deviations.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp/server.ts:148-187 (handler)The tool 'sentinel_stablecoins' is registered and implemented within `src/mcp/server.ts` using `server.tool`. It fetches cross-chain feed data, filters for specific stablecoins, calculates deviations from a $1.0 peg, and returns a summary report.
server.tool( "sentinel_stablecoins", "Monitor stablecoin pegs (USDC, USDT, DAI) across all chains. Detects depegs and deviations.", {}, async () => { const feeds = await crossChainScan(); const stables = feeds.filter( (f) => f.pair.includes("USDC") || f.pair.includes("USDT") || f.pair.includes("DAI") ); if (stables.length === 0) { return { content: [{ type: "text", text: "No stablecoin feeds found." }] }; } const lines = stables.map((f) => { const dev = Math.abs(f.price - 1.0) * 100; const status = dev > 5 ? "DEPEG" : dev > 1 ? "WARNING" : "OK"; return `${f.pair.padEnd(10)} ${f.chain.padEnd(10)} $${f.price.toFixed(6)} dev: ${dev.toFixed(3)}% [${status}]`; }); const maxDev = Math.max(...stables.map((f) => Math.abs(f.price - 1.0) * 100)); const overallStatus = maxDev > 5 ? "DEPEG ALERT" : maxDev > 1 ? "WARNING" : "ALL STABLE"; return { content: [ { type: "text", text: [ `**Stablecoin Monitor — ${overallStatus}**`, `Feeds: ${stables.length} stablecoin feeds across ${[...new Set(stables.map((s) => s.chain))].length} chains`, "", "```", ...lines, "```", ].join("\n"), }, ], }; } );