Skip to content
ubi.fun
Esc
navigateopen⌘Jpreview
On this page

Subgraph

A Graph Protocol subgraph over our events, packaged for self-hosting against an Arc RPC.

If your stack already speaks GraphQL through graph-node, we maintain a subgraph over the protocol’s core events: coin launches, swaps with resolved coin and USDC deltas, live pool state, fair launch lifecycle, referrer accruals and claims, fee withdrawals, manager deployments, and holder pool payouts. It deliberately skips per-coin ERC20 transfer indexing; holder balances come from the REST API instead.

One difference from protocols on chains The Graph serves: The Graph’s hosted network does not index Arc, so there is no public gateway endpoint to query. You run the subgraph on your own graph-node pointed at an Arc RPC. For a serious integration that is a single docker-compose stack; the only configuration Arc needs is registering the chain under the network name arc.

The package lives at github.com/ubidotfun/subgraph (manifest, schema, mappings, ABIs, and step-by-step self-host instructions in the README), or as a direct download: ubi-subgraph.tar.gz. Sync starts at the protocol deployment block, 12226732.

Entities at a glance

Entity What it holds
Coin One per launch: metadata, creator, pool id, fair launch and premine parameters
Pool v4 pool id to coin lookup plus the latest price, fees, and liquidity state
Swap Every swap with the three legs summed, the swapper, and signed tokenAmount / cashAmount deltas
FairLaunch Per-pool fair launch window and its outcome
ReferralAssignment / ReferralClaim / ReferrerBalance The 5% referrer share: per-event history plus per-referrer running totals
FeeWithdrawal FeeEscrow withdrawals, classified: creator payouts vs the PlatformFeeSplitter draining the protocol leg
Manager Fee split manager deployments
HolderClaim Holder pool payouts through the UniversalRewardsDistributor
Protocol Platform counters: coins, swaps, USDC volume

Amount conventions match the REST data API: USDC 6 decimals, coins 18, swap deltas from the swapper’s perspective. The two surfaces overlap on core market data but are not equivalent: the subgraph carries raw per-event referral and claim history; the REST API adds holders, OHLCV candles, and USD-normalized fields, with zero infrastructure to run.

Was this page helpful?