Skip to main content

Overview

Yield is distributed periodically via the on-chain YieldDistributor contract. For each period, the operator publishes a merkle root that commits to every holder’s allocation; holders then submit a merkle proof to claim() and receive their funds directly. The Camino API serves the off-chain data callers need to construct that claim. GET /v1/yield/{address} returns the holder’s claims as a flat data list. Each entry is self-contained — it carries its own chainId and distributor address — so it can be passed directly into the corresponding contract’s claim(). Entries are sorted by periodId ascending. Each entry carries a status:
  • unclaimed — the holder can currently claim this one (finalized and within the claim window).
  • claimed — the holder has already pulled this one on-chain.
Unpublished periods, periods still in the operator replace window, and expired-without-claim periods are omitted. Requires an API key.

Look up a holder

const holder = '0x742d35cc6634c0532925a3b844bc454e4438f44e';

const response = await fetch(
  `https://api.caminotreasury.com/v1/yield/${holder}`,
  { headers: { 'x-api-key': 'your-api-key' } },
);

// Restrict to a single chain by passing `?chainId=1`:
//   /v1/yield/0x…?chainId=1

const { data, count } = await response.json();

// {
//   "data": [
//     {
//       "chainId": 1,
//       "distributor": "0x…",
//       "periodId": "4",
//       "status": "claimed",
//       "root": "0x…",
//       "index": 12,
//       "account": "0x742d35…",
//       "amount": "1200000",
//       "proof": ["0x…", "0x…"]
//     },
//     {
//       "chainId": 1,
//       "distributor": "0x…",
//       "periodId": "5",
//       "status": "unclaimed",
//       "root": "0x…",
//       "index": 12,
//       "account": "0x742d35…",
//       "amount": "1500000",
//       "proof": ["0x…", "0x…"]
//     }
//   ],
//   "count": 2
// }

const claimable = data.filter((p) => p.status === "unclaimed");

Entry shape

FieldTypeDescription
chainIdintegerChain this period lives on.
distributorstringYieldDistributor contract address on chainId.
periodIdstringPeriod ID on the distributor (uint as string).
status"claimed" | "unclaimed"Whether the on-chain isClaimed flag is set.
rootstringMerkle root committed on-chain for this period.
indexintegerLeaf index in the period’s merkle tree.
accountstringRecipient address — claim() always transfers here.
amountstringRaw claim amount (use the token’s decimals to format).
proofstring[]Merkle proof for the leaf.
To claim, call claim(periodId, index, account, amount, proof) on the distributor address (on chainId) with the fields from an unclaimed entry.

Period artifact (verification)

GET /v1/yield/artifacts?periodId=N returns the full artifact (root, every leaf, every proof, totals) for a published period. Anyone can fetch this and independently verify what’s committed on-chain.
const response = await fetch(
  `https://api.caminotreasury.com/v1/yield/artifacts?periodId=5`,
);

const artifact = await response.json();
// { version, periodId, blockRange, root, leaves: [...], ... }
Artifacts for finalized periods are immutable — once a period is published, its root, leaves, and proofs never change.

Next Steps

Deposit and Start Earning

Deposit stablecoins into C0 to begin accruing yield

Wallets

Create and manage wallets, track token balances