---
title: "Snapshot dreUSDs savings metrics (cron)"
method: POST
path: "/cron/savings"
tags: ["cron"]
---

# Snapshot dreUSDs savings metrics (cron)

`POST /cron/savings`

Expected schedule: **every 10 minutes**.

Reads `totalAssets()` and `convertToAssets(1e18)` on `DREUSDS_ADDRESS`, `totalSupply()` on `DREUSD_ADDRESS` via the configured RPC endpoints, computes `ratio` as `totalAssets/totalSupply`, then inserts a row into `savings_snapshots`. Returns **204** with an empty body on success. Requires `X-CRON-API-KEY` matching `CRON_API_KEY`.

The cadence is **bounded by dreUSDs pricing**, not by this snapshot: the registry price refresh dates dreUSDs by this snapshot’s `recordedAt` and serves DRE observations for 15 minutes, so a slower schedule here makes dreUSDs report as stale between runs.

## Headers

- `X-CRON-API-KEY` string, required

## Response `204`

Savings snapshot persisted. On-chain reads succeeded; no response body.

## Other responses

- `401` — Missing or invalid `X-CRON-API-KEY`.

---

[API](https://skmtc.dev/dre/apis/dre-api.md) · [All operations](https://skmtc.dev/dre/apis/dre-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dre/dre-api/revisions/5d14beb9482b/schema)
