RobinLens is a stateless batch view aggregator that reads vault state for many markets in a single call. Use it for trustless on-chain reads over RPC, or use the Integration API when you want ready-made APY and positions without running an RPC client.
All RobinLens reads key on a wallet’s resolved Robin staking wallet — the user’s Polymarket on-chain account (DepositWallet or Safe proxy), never the raw EOA. See Wallets for how to resolve it. See Contracts overview for the full address list.
RobinLens functions
Every function is apublic view. Return arrays are aligned to the input conditionIds (or sides) by index. All amounts are 6-decimal fixed-point integers (UNDERLYING_DECIMALS=6).
Side is an enum where YES=0 and NO=1. assets are loss-adjusted — they
reflect the vault’s lossIndex accounting, so they can be lower than the
originally deposited token amount after impermanent loss.twapPricesYes parameter
The functions that compute yield or indexes take atwapPricesYes array. This is the time-weighed-average price since the last contract interaction (same as submitted before deposits and withdrawals). Its values are interpreted per market against PRICE_SCALE (1e6 = 100%).
Pass a value
<= PRICE_SCALE (1e6) to force that YES price for the calculation. Pass any value > PRICE_SCALE to use the oracle’s stored TWAP for that market. Functions without this parameter (batchGetUserShares, batchGetUserAssets, batchGetUserSharesAndAssets) do not depend on price.Events to index
To track vault state from logs emitted byRobinStakingVault, index these events.
Withdrawn carries yield (the organic on-chain yield returned) and
protocolFee (Robin may take a protocol fee on the organic yield only). Vault
indexes use INDEX_SCALE=1e18. The off-chain bonus payout (guarantee,
matching, points) is not in these events — it is computed at withdrawal
and sent separately from Robin’s operator wallet.API vs on-chain
Next steps
Integration API overview
Read positions, quotes, and APY breakdowns over HTTP — no RPC required.
Withdrawals
Burn shares to reclaim outcome tokens and organic yield via
batchWithdraw.