Build on Uptick
For agents
A public evidence API and an MCP server that prepares unsigned deposit and withdraw transactions for Uptick vaults.
The evidence API
The base URL is https://uptick-evidence.earn-shield-alerts.workers.dev. Every response is JSON with CORS open, so a browser or a worker can read it directly.
| Endpoint | What it returns |
|---|---|
| GET /vaults | id, ticker, open, deposit_cap_usd, fee_apr_pct, kept_apr_pct, pool and window_days for every vault. |
| GET /vaults/:id | The full detail: token, pool, fee tier, feed, the per-pool replay, and the gate with its rule, reason, worst half and swap count. |
| GET /llms.txt | The same facts as plain text for agents that read markdown. |
| GET /health | ok, the generation time, the replay window and the total swaps replayed. |
The response is a JSON array with one entry per vault, 17 today. The first entry, as served now:
curl https://uptick-evidence.earn-shield-alerts.workers.dev/vaults{
"id": "mstr",
"ticker": "MSTR",
"open": false,
"deposit_cap_usd": 22206,
"fee_apr_pct": 229.1253738312145,
"kept_apr_pct": -28.53260158684701,
"pool": "0x17578C0e0D15da44f31677263114F71aE76653EA",
"window_days": 30
}The MCP server
POST /mcp speaks JSON-RPC 2.0 over Streamable HTTP. initialize returns protocolVersion 2025-06-18, the tools capability, serverInfo, and instructions for how to report a vault. tools/list returns the four tools. tools/call runs one. A notification, a message with no id, returns 204. A malformed body returns -32700 and an unknown method returns -32601.
| Tool | What it does |
|---|---|
| list_vaults | Every vault with its gate state, open flag, deposit cap, fee APR, kept APR and the gate reason. |
| get_vault_evidence | Full evidence for one vault: the replay pools, the gate rule and reason, the replay window, the swap count, and a source URL. |
| prepare_deposit | Unsigned transactions for a deposit. Refuses closed vaults with the gate reason, and refuses an amount above the vault's deposit cap or, for a reduced vault, its per-transaction cap, whichever is lower. Asset stock approves the Stock Token then calls ERC-4626 deposit; asset usdg approves USDG then zaps through the Uptick router. |
| prepare_withdraw | The unsigned ERC-4626 redeem for a vault. Shares are 24 decimals, 18 plus the vault offset of 6. |
A tools/call body for the same list:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "list_vaults",
"arguments": {}
}
}The result arrives as a text payload, a JSON string. Pretty-printed, the first vault of the same call:
{
"vaults": [
{
"id": "mstr",
"ticker": "MSTR",
"gate_state": "closed",
"open": false,
"deposit_cap_usd": 22206,
"fee_apr_pct": 229.1253738312145,
"kept_apr_pct": -28.53260158684701,
"reason": "Closed: the weaker half kept -28.5% a year, below the -20% floor."
}
]
}Sources
api/src/worker.tsThe /vaults, /vaults/:id, /llms.txt and /health routes.
api/src/mcp.tsThe JSON-RPC dispatch, the four tools, the cap checks and the refusals.
web/public/llms.txtThe canonical gate states, caps and endpoint list.