> ## Documentation Index
> Fetch the complete documentation index at: https://docs.beaconcha.in/llms.txt
> Use this file to discover all available pages before exploring further.

# APY & ROI Metrics

> Calculate annual percentage yield and return on investment for validators

## Overview

The APY & ROI endpoint provides standardized return metrics for your validators, broken down by execution layer (EL) and consensus layer (CL) contributions.

<Note>
  **API Endpoint:** This guide uses `/api/v2/ethereum/validators/apy-roi` for aggregated return metrics.
</Note>

<Note>
  **When to use APY/ROI vs BeaconScore:** APY and ROI measure absolute returns in ETH/percentage terms. BeaconScore measures relative efficiency normalized for luck (see [residual luck factors](/validator-dashboard/metric-validator-efficiency#residual-luck-factors)). For comparing validator performance across operators, BeaconScore is recommended.
</Note>

<Tip>
  **See Also:** For detailed per-epoch missed reward analysis (which duty types are causing losses), see [Analyze Missed Rewards](/use-cases/missed-rewards). This endpoint focuses on aggregated return metrics.
</Tip>

***

## Understanding the Metrics

| Metric  | Description                                                                        |
| ------- | ---------------------------------------------------------------------------------- |
| **ROI** | Return on Investment — Actual return during the evaluation period (not annualized) |
| **APY** | Annual Percentage Yield — ROI extrapolated to a yearly rate                        |

Both metrics are calculated separately for:

| Component           | Source                                          |
| ------------------- | ----------------------------------------------- |
| **Execution Layer** | Block proposals, MEV rewards, transaction fees  |
| **Consensus Layer** | Attestations, sync committees, CL block rewards |
| **Combined**        | Total return across both layers                 |

<Warning>
  APY is an extrapolation based on the selected evaluation window. Past performance does not guarantee future results, especially for execution layer rewards which are highly variable.
</Warning>

***

## Quick Start: Fetch APY & ROI

```bash theme={null}
curl --request POST \
  --url https://beaconcha.in/api/v2/ethereum/validators/apy-roi \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "chain": "mainnet",
  "validator": {
    "dashboard_id": 123
  },
  "range": {
    "evaluation_window": "30d"
  }
}
'
```

### Response

```json theme={null}
{
  "data": {
    "execution_layer": {
      "roi": "0.00125",
      "apy": "0.0152"
    },
    "consensus_layer": {
      "roi": "0.00285",
      "apy": "0.0347"
    },
    "combined": {
      "roi": "0.0041",
      "apy": "0.0499"
    },
    "finality": "finalized"
  },
  "range": {
    "epoch": { "start": 407453, "end": 414202 },
    "timestamp": { "start": 1763285975, "end": 1765877974 }
  }
}
```

The response shows:

* **Execution Layer:** 1.52% APY from block proposals/MEV
* **Consensus Layer:** 3.47% APY from attestations/sync committees
* **Combined:** 4.99% total APY

***

## Evaluation Windows

| Window     | Best For                              |
| ---------- | ------------------------------------- |
| `24h`      | Quick daily check (high variance)     |
| `7d`       | Weekly reporting                      |
| `30d`      | Monthly reports, smoothed variance    |
| `90d`      | Quarterly analysis                    |
| `all_time` | Lifetime performance since activation |

<Tip>
  Longer evaluation windows provide more stable APY estimates. Short windows are heavily influenced by luck (block proposals, MEV).
</Tip>

***

## APY vs BeaconScore

| Metric          | Use Case                    | Affected By                                                                                                                                                |
| --------------- | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **APY**         | Absolute return calculation | Luck (proposals, MEV), network conditions                                                                                                                  |
| **BeaconScore** | Performance comparison      | Primarily validator behavior (normalized for luck; some [residual factors](/validator-dashboard/metric-validator-efficiency#residual-luck-factors) remain) |

<Tip>
  A validator with lower APY might still have a higher BeaconScore if they were unlucky with block proposals. BeaconScore largely removes luck from the equation, making it ideal for comparing operator performance. Some [residual luck factors](/validator-dashboard/metric-validator-efficiency#residual-luck-factors) can still influence scores over short windows.
</Tip>

***

## Best Practices

<CardGroup cols={2}>
  <Card title="Use 30d+ Windows" icon="calendar">
    Short windows are noisy. Use 30 days or longer for meaningful APY estimates.
  </Card>

  <Card title="Track EL Separately" icon="layer-group">
    EL rewards (MEV) are highly variable. Track them separately from CL rewards.
  </Card>

  <Card title="Compare Apples to Apples" icon="scale-balanced">
    When comparing validators, ensure they use the same MEV-boost configuration.
  </Card>

  <Card title="Use BeaconScore for Ranking" icon="ranking-star">
    For comparing validator quality, BeaconScore is more reliable than APY.
  </Card>
</CardGroup>

***

## Related Resources

* [Monitor Validator Performance](/use-cases/performance-introduction) — BeaconScore metrics
* [Analyze Missed Rewards](/use-cases/missed-rewards) — Quantify lost earnings
* [Calculate Validator Rewards](/use-cases/rewards-introduction) — Detailed reward breakdowns
