cron
Refresh cash-equivalent reserve APY from Aave and USTB (cron)
Expected schedule: every 5 minutes.
Loads all cash equivalent reserves, then refreshes APY by yieldSource for rows whose JSON data has cashEquivalentType on-chain:
- Aave (yieldSource Aave): reads Aave V3 USDC liquidityRate on Base mainnet via Alchemy (API key from ALCHEMY_RPC_KEY), derives compounded supply APY (annual rate in ray, same compounding model as Aave MathUtils).
- USTB (yieldSource USTB): reads 30-day yield from the Superstate API (https://api.superstate.com/v1/funds/1/yield); result is cached in memory for 24 hours under ustbYield so the external call runs at most once per day.
Matching reserves get apy updated; others are skipped. Returns 204 with an empty body on success. Requires X-CRON-API-KEY matching CRON_API_KEY.
post/cron/apy
Headers
X-CRON-API-KEYstring required
Must match CRON_API_KEY
Response
APY refresh completed. On-chain Aave and/or cached USTB yields were applied to matching cash-equivalent reserves; no response body.