Amounts & scales
All outcome tokens and USDC are 6-decimal fixed-point integers. Prices and vault indices use their own fixed scales.
The Integration API follows the same numeric model with two presentation rules:
- Amounts are returned as 6-decimal integer strings —
"1500000"means 1.5. Parse with abigint, not a float. - APY values are returned as plain numbers in percent —
6means 6.00%, not0.06.
conditionId
AconditionId is the Polymarket condition id: a bytes32 hex value. It is the primary key that links Robin’s contracts, the Integration API, and Polymarket itself.
Use the same conditionId everywhere — on-chain calls, Lens reads, API requests, and Polymarket’s data APIs all key on it. See the API overview for indexing and reading a market by its conditionId.
Side enum
Every market has two sides, encoded as a Solidityenum:
conditionId has a distinct YES share id and NO share id.
The APY formula
Robin computes a total APY on top of the organic yield. It combines a guarantee-floored base with two bonuses.Organic yield vs. the bonus programme
Two payouts, two systems. The organic yield is paid on-chain by the vault via dual-index accounting (
lossIndex + yieldPerShare) and settles as part of batchWithdraw. The guarantee, matching, and points bonuses are an off-chain programme run by Robin: they are computed at withdrawal and paid in a single, separate USDC transaction from Robin’s operator wallet — not by the withdraw call.Integrators never handle points directly. The API folds them into the APY breakdown (base / matching / points), so they appear as a line in the response and are summed into the total.Next steps
API overview
Base URL, conventions, the index-then-read flow, and the APY breakdown.
Architecture
How the vault, oracle, Lens, and off-chain programme fit together.