Skip to content

docs: Lighter perp DEX on Robinhood Chain API - #246

Open
buddies2705 wants to merge 1 commit into
mainfrom
docs/lighter-perp-dex-api
Open

docs: Lighter perp DEX on Robinhood Chain API#246
buddies2705 wants to merge 1 commit into
mainfrom
docs/lighter-perp-dex-api

Conversation

@buddies2705

Copy link
Copy Markdown
Contributor

What

New docs page Blockchains → Robinhood → Lighter Perp DEX on Robinhood Chain API (docs/blockchain/robinhood/lighter-perp-dex-api.md) plus its sidebar entry.

Lighter is the perp DEX integrated into Robinhood Wallet since the July 1, 2026 chain mainnet. On Robinhood Chain it runs a full ZkLighter rollup contract (proxy 0x94bab9693ba2f6358507effcbd372b0660afff9d): USDG margin deposits/withdrawals plus the batch lifecycle (~1 batch/min). The page covers:

  • What is on-chain vs. inside the Lighter engine — sets expectations that fills/positions/funding are not chain transactions; on-chain data answers money-flow, TVL, and liveness questions
  • Contract map and the proxy/implementation gotcha: Log.SmartContract shows rotating implementation facets (last rotation Aug 21), so every query anchors on LogHeader.Address + topic0
  • Event reference — topic0 table for all ZkLighter events (Deposit, WithdrawPending, NewPriorityRequest, batch lifecycle, market/asset registry)
  • Queries: latest deposits, withdrawal queue, monthly USDG margin flow since launch over dataset: combined, a rollup-liveness subscription, and deposit() calls by selector
  • Decoding notes — word layouts for client-side decoding (events currently arrive with empty Signature.Name; ABI registration is tracked internally in BIT-15310, after which the same queries also return decoded Arguments)

Verification

  • Every query executed against production streaming.bitquery.io/graphql on Aug 22, 2026 (realtime + combined; combined holds Lighter history back to its June 26 soft start)
  • Decode semantics cross-checked on-chain: Deposit.baseAmount matches the ERC-20 USDG leg 1:1; lifetime deposits − withdrawals ≈ the contract's standing USDG balance
  • Page rendered locally with docusaurus start — compiles clean, sidebar entry and tables/admonitions render correctly

🤖 Generated with Claude Code

New page documenting Lighter (ZkLighter) on Robinhood Chain: contract map,
event topic0 reference, margin deposit/withdrawal queries, full-history USDG
flow via the combined dataset, rollup batch liveness monitoring, and
client-side decoding notes (events are unparsed until the ABI is registered;
tracked in BIT-15310). All queries executed against production
streaming.bitquery.io/graphql before publishing. Adds sidebar entry under
Blockchains > Robinhood.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@buddies2705