Read-only Solana and NEAR wallet risk API for AI agents: a 0-100 score, A-F grade and plain-English findings…
Svalin
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**Read-only portfolio risk intelligence for AI agents.**
Give Svalin a Solana wallet or a NEAR account. Get back a priced portfolio and a deterministic
risk report: a 0-100 score, an A-F grade, exposure metrics, and findings with concrete next
steps. Agents pay per call in USDC over x402 on Solana or NEAR. No API keys, no
accounts, and no way to move funds.
Features · How it works · Use cases · Endpoints · Use it from an agent · Run locally · Trust and safety · Docs
Features
- **Risk reports.** A 0-100 score and A-F grade from concentration, stablecoin buffer and long-tail
exposure, with findings that explain each risk in plain English and suggest a next step.
- **Solana and NEAR.** Solana wallets (7xKX…) and NEAR accounts (alice.near) go through the
same engine and the same endpoints.
- **Priced portfolios.** Live balances and USD prices, with each token placed in a risk category:
stablecoin, native, liquid staking, major, meme or long-tail. Staked SOL and NEAR count as staked.
- **Briefs.** A headline, a short summary and up to three actions for explaining a wallet to a
person, written by Claude when configured and by a template otherwise.
- **Pay per call.** USDC over x402 on Solana or NEAR. No keys, no accounts, no subscription.
- **MCP server.** svalin-mcp brings the tools to Claude, Cursor and any MCP client, with a hard
per-call price cap and a session budget.
- **Read-only.** Svalin never asks for keys, approvals or signatures from the wallet it analyses,
and it has no code path that moves funds.
- **Deterministic.** Same holdings, same report. No LLM computes a number, and the
methodology is public and versioned.
How it works
Invalid addresses are rejected *before* the paywall, and failed responses (4xx/5xx), such as a
NEAR account that does not exist, are never settled, so a caller is never charged for an error.
A trimmed risk report:
Use cases
Svalin is the read-only risk step in an agent workflow. Agents and people ask it how risky a
wallet is before they act, and act somewhere else.
Orchestration pattern: the risk gate
An orchestrator agent checks the wallet with Svalin before it hands a plan to an executor. Svalin
only reads. Execution stays with a separate tool that you control, and you choose the grade
thresholds.
| Pattern | Svalin calls | Cost per wallet (default prices) |
| --- | --- | --- |
| Risk gate before an action | risk, then brief when the grade is poor | $0.004 to $0.024 |
| Scheduled treasury check | risk for each wallet on each run | $0.004 per run |
| Wallet explainer in chat | brief | $0.02 |
| Batch research | portfolio or risk for each wallet | $0.002 to $0.004 |
| Trying it out | free scan | Free, 10 per hour |
Any orchestrator that can call MCP tools or make HTTP requests can use these patterns.
Endpoints
| Endpoint | Price | Returns |
| --- | --- | --- |
| GET /v1/demo/risk/{address} | Free, 10 per hour per visitor | Risk report |
| GET /v1/portfolio/{address} | $0.002 | Priced holdings, allocation and a risk category per token |
| GET /v1/risk/{address} | $0.004 | Score, grade, exposure metrics and findings with actions |
| GET /v1/brief/{address} | $0.02 | Headline, summary and up to 3 actions, plus the full report |
| GET / · /openapi.json · /llms.txt | Free | Machine-readable service description for agents |
{address} is a Solana address or a NEAR account ID. Prices are the defaults and can be changed