# finmath Staking Yield Calculator

> finmath Staking Yield Calculator is a paid API for AI agents from finmath.qzqh5rrbkz.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Calculates compound interest and staking yield for a given principal, APR, compounding frequency, and time period

## Facts

- Endpoint: POST https://finmath.qzqh5rrbkz.workers.dev/v1/staking_yield
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/finmath-staking-yield-calculator-85bc404e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2rzBLihF9rYalJv8GQSPa

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability finmath-staking-yield-calculator-85bc404e -d '<json body>'
```

Example prompt: I'm staking 10,000 USDC at a 7.5% APR compounded daily (365 times per year) for 2 years — what will my total staking yield be?

## When to prefer this

Use this endpoint when you need exact, deterministic compound interest or staking yield calculations — especially for DeFi staking positions where LLM arithmetic would be unreliable. Prefer this over general-purpose LLM math when precision matters, when the user provides a specific APR and compounding schedule, or when auditable, reproducible results are required.

## Known failure modes

- Missing required fields (apr, principal, compounds_per_year) returns a validation error
- Non-numeric values for numeric fields return a 400 error
- APR of 0 or negative principal may return edge-case or zero results
- Payment failure (402) if USDC payment is not included or insufficient
- Very large compounds_per_year values (e.g. continuous compounding) may hit precision limits

## How this service works

Deterministic finance and crypto math for AI agents: TradFi (NPV, IRR, XIRR, Black-Scholes + Greeks, bonds, VaR, Sharpe) and DeFi (impermanent loss, perp liquidation, funding, Uniswap v3, health factor, cost basis). Exact, model-free arithmetic that LLMs get wrong — priced per call in USDC.

## Output

Returns a result object containing the computed staking yield (total accumulated value or interest earned) along with a meta object containing calculation metadata such as inputs and method used.

## Example request

```json
{
 "apr": 5.5,
 "years": 2,
 "principal": 10000,
 "compounds_per_year": 12
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "apr",
  "principal",
  "compounds_per_year"
 ],
 "properties": {
  "apr": {
   "type": "number",
   "description": "apr"
  },
  "years": {
   "type": "number",
   "description": "years"
  },
  "principal": {
   "type": "number",
   "description": "principal"
  },
  "compounds_per_year": {
   "type": "number",
   "description": "compounds_per_year"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "result",
  "meta"
 ],
 "properties": {
  "meta": {
   "type": "object"
  },
  "result": {}
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/finmath-staking-yield-calculator-85bc404e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from finmath.qzqh5rrbkz.workers.dev](https://www.zero.xyz/host/finmath.qzqh5rrbkz.workers.dev/llms.txt)
