cron
Snapshot on-chain investment balances for cash-equivalent reserves (cron)
Expected schedule: every 30 minutes.
Loads all cash equivalent reserves whose JSON data has cashEquivalentType on-chain, then for each reserve reads the on-chain balance at the latest block by yieldSource:
- Aave (yieldSource Aave): Aave V3 USDC supply position for wallet on Base via the Aave client.
- USTB and other sources: ERC-20 balanceOf(wallet) on contractAddress for chainId.
Upserts a collaterals row per reserve (collateralType INVESTMENT_ONCHAIN, assetType, wallet, chainId, blockNumber, value). Returns 204 with an empty body on success. Requires X-CRON-API-KEY matching CRON_API_KEY. Also updates WTGXX unpaid yield.
post/cron/onchain-investments
Request
- Base URLhttps://api.dre.app (the document declares no server; this is the origin it was published from)
- Authnone declared. Required headers: X-CRON-API-KEY
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
X-CRON-API-KEYstring required
Must match CRON_API_KEY
Response
On-chain investment snapshot pass finished; collateral rows were upserted for matching reserves; no response body.
Changes
No recorded changes to this operation across all 3 revisions of this API.