Guides

Portfolio Risk Analysis

Paste any Ethereum address to get a full risk breakdown — tier distribution, protocol concentration, and exposure alerts.

Use the portfolio endpoint to assess risk across all DeFi positions for an address.

Fetch Positions

curl https://api.philidor.io/v1/address/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045/positions

The response includes:

  • Each vault position with its risk score, APR, and TVL
  • aggregates with weighted risk score, total value, risk distribution, and chain count
  • chain_results with per-chain read status

Interpret Weighted Risk

The weighted risk score uses data.aggregates.weighted_risk_score and accounts for position sizes:

weighted_risk = SUM(position_value × vault_score) / total_value

A portfolio might have a weighted risk of 7.8 even if it includes Edge-tier vaults — if those positions are small relative to Prime-tier holdings.

Concentration Analysis

Look for concentration risks:

Protocol Concentration

If 80% of value is in one protocol, a single exploit affects most of the portfolio.

const byProtocol = positions.reduce(
  (acc, p) => {
    acc[p.protocol_name] = (acc[p.protocol_name] || 0) + parseFloat(p.balance_usd);
    return acc;
  },
  {} as Record<string, number>
);

Chain Concentration

All positions on one chain means exposure to chain-specific risks (bridge failures, sequencer downtime).

Curator Concentration

Multiple vaults managed by the same curator share curator risk.

Yield-per-Score Metric

Compute a yield-to-risk-score ratio as a portfolio metric:

const yieldPerScore = positions
  .map((p) => ({
    name: p.vault_name,
    apr: p.apr_net ?? 0,
    score: p.risk_score,
    ratio: p.risk_score == null ? null : (p.apr_net ?? 0) / (10 - p.risk_score + 0.1),
  }))
  .filter((row) => row.score != null);

Idle or unscored holdings can return risk_tier: "Unrated" and risk_score: null. Keep them visible in portfolio totals even when excluding them from score-only ratios.

Using the MCP Server

The portfolio_risk_assessment prompt automates this entire analysis:

"Assess the risk of my portfolio with 50% in Gauntlet USDC on Morpho and 50% in Aave V3 WETH"

See MCP Prompts for the full specification.

On this page

Raw