Overview
When you deposit USDC or USDT into C0, your balance earns yield from the underlying M token rate. The yield estimate endpoint provides projections based on your current C0 balance and the live on-chain rate.
How Yield Works
You deposit USDC or USDT and receive C0
C0 accrues yield from the M token earner rate (continuous compounding)
The gross APY is converted to a net APY after a 10% platform fee
Your C0 balance grows over time as yield accrues
1. Get Yield Estimate
Fetch yield projections for a wallet’s C0 balance:
const chainId = 1 ;
const address = '0x742d35cc6634c0532925a3b844bc454e4438f44e' ;
const response = await fetch (
`https://api.caminotreasury.com/v1/ ${ chainId } /yield?address= ${ address } ` ,
{ headers: { 'x-api-key' : 'your-api-key' } }
);
const { earning , decimals , rate , dailyYield , monthlyYield , annualYield } =
await response . json ();
// {
// "earning": "5000000000",
// "decimals": 6,
// "rate": { "apy": 0.03047 },
// "dailyYield": "417",
// "monthlyYield": "12500",
// "annualYield": "152373"
// }
Field Type Description earningstring Current C0 balance in raw units decimalsinteger Token decimal places (6) rate.apynumber Net annual percentage yield after fees dailyYieldstring Projected daily yield in raw units monthlyYieldstring Projected monthly yield in raw units annualYieldstring Projected annual yield in raw units
2. Interpreting the Response
All values are in raw C0 units with 6 decimal places. To convert to human-readable amounts:
const balance = Number ( earning ) / 10 ** decimals ;
const daily = Number ( dailyYield ) / 10 ** decimals ;
const monthly = Number ( monthlyYield ) / 10 ** decimals ;
const annual = Number ( annualYield ) / 10 ** decimals ;
console . log ( `C0 Balance: ${ balance . toFixed ( 2 ) } ` );
console . log ( `APY: ${ ( rate . apy * 100 ). toFixed ( 2 ) } %` );
console . log ( `Daily: ${ daily . toFixed ( 6 ) } ` );
console . log ( `Monthly: ${ monthly . toFixed ( 6 ) } ` );
console . log ( `Annual: ${ annual . toFixed ( 6 ) } ` );
Yield projections are based on the current C0 balance and the live on-chain M token rate. If the rate or balance changes, projections will update accordingly.
3. Tracking Yield Over Time
You can track how your C0 balance grows by polling the balances endpoint periodically:
async function trackYield ( chainId , address , apiKey ) {
const headers = { 'x-api-key' : apiKey };
// Get current C0 balance
const balanceRes = await fetch (
`https://api.caminotreasury.com/v1/ ${ chainId } /balances/ ${ address } ` ,
{ headers }
);
const { data : balances } = await balanceRes . json ();
const c0 = balances . find ( b => b . symbol === 'C0' );
// Get yield estimate
const yieldRes = await fetch (
`https://api.caminotreasury.com/v1/ ${ chainId } /yield?address= ${ address } ` ,
{ headers }
);
const estimate = await yieldRes . json ();
return {
balance: Number ( c0 . raw ) / 10 ** c0 . decimals ,
apy: estimate . rate . apy ,
monthlyYield: Number ( estimate . monthlyYield ) / 10 ** estimate . decimals
};
}
Compare snapshots over time to see actual yield accrual — as yield accrues, your C0 balance will increase, and so will the projected yields.
Next Steps
Wallets & Balances Create and manage wallets, track token balances
Deposit and Start Earning Deposit stablecoins into C0 and start earning yield