Skip to main content
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 a public 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 a twapPricesYes 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 by RobinStakingVault, 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

The Integration API returns ready-made positions with a full APY breakdown (base / matching / points) and accrued yield as JSON — no RPC client, ABI, or TWAP handling required. Reach for RobinLens when you need trustless reads straight from chain, want to avoid a hosted dependency, or are already running an RPC client. The on-chain organic yield from RobinLens excludes the off-chain bonus programme; the API folds bonuses into its totals.

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.