Back to blog
AnalyticsMAY 2026

On-chain data
needs a reader.

Programmable credit only delivers on its transparency promise if the data is actually readable. Dune SIM gives PRISM a real-time event stream — NAV, yield, defaults, AMM swaps — with one API call and no custom indexer to build or maintain.

The problem

Public data is not the same as readable data.

PRISM runs on a public blockchain. Every deposit, every yield epoch, every credit event, every AMM swap is permanently recorded on Solana. In theory, this means complete transparency — any investor can verify the protocol's accounting at any time.

In practice, raw on-chain data is nearly unusable without an indexing layer. An RPC node tells you the current state of an account. It does not tell you how that state changed over time, in what sequence, and in response to which events.

  • RPC nodes return current state — they do not store history.
  • Reconstructing yield distributions from raw logs requires custom parsing.
  • NAV curves need every deposit, withdrawal, and yield event in sequence.
  • Building and maintaining a custom indexer takes months and drifts from protocol changes.
  • Most teams end up with a half-built indexer that breaks silently on upgrades.

Without an indexer, PRISM's NAV chart is flat. The credit event log is empty. The TVL tracker shows only the current balance. The promise of on-chain transparency collapses into a wall of account state that no human can read.

The indexer trap

Building your own is a trap.

The instinct when you need historical data is to build an indexer. Most teams do. Most teams regret it.

  • A reliable Solana indexer is 3–6 months of dedicated engineering.
  • It requires its own infrastructure: RPC nodes, a database, a parsing pipeline.
  • It must be updated every time program instructions or account layouts change.
  • When it falls behind, every dashboard reading from it silently lies.
  • All of this is infrastructure that has nothing to do with credit logic.

For a credit protocol, the indexer problem is especially bad. PRISM emits six distinct event types. Each one has its own account layout, its own sequence guarantees, and its own downstream consumers — the NAV chart, the credit event log, the TVL tracker, the AMM price feed. A custom indexer has to handle all of them correctly, in order, without gaps, across restarts and RPC failures.

That is three to six months of work that produces zero credit logic. It is infrastructure overhead that compounds every time a program instruction changes.

Dune SIM

Real-time Solana state with one API key.

Dune SIM is a real-time developer platform that provides low-latency APIs to query Solana state — PDAs, account balances, and event streams — without building a custom indexer. It subscribes to the chain, parses events as they land, and makes them queryable over HTTP.

For PRISM, the integration is one route handler. A single API key. The entire analytics layer — NAV, TVL, yield, credit events, AMM pricing — runs on top of what Dune SIM returns.

Integration surface
Base URLhttps://api.sim.dune.com
AuthX-Sim-Api-Key header
Env varDUNE_SIM_API_KEY
Tx endpoint/beta/svm/transactions/{address}
Balance endpoint/beta/svm/balances/{address}
Latencysub-second
Infrastructurezero — Dune manages it

The protocol emits events via Anchor's emit! macro. Dune SIM subscribes to those events by name. Everything that happens on PRISM flows into the Dune event stream automatically — no webhook configuration, no parsing logic, no database schema to maintain.

The events

Six events. A complete picture of the protocol.

PRISM's program emits six event types that together describe everything happening in the credit lifecycle — capital in, yield distributed, losses applied, and market pricing in real time. Dune SIM indexes all six.

deposit
DepositEvent
TVL chart

Running total of capital locked per tranche in real time.

withdraw
WithdrawEvent
Outflow chart

LP exit activity — shows market sentiment shifts before price does.

accrue_yield
YieldDistributed
Yield counter

Per-tranche cumulative yield, updated each epoch.

trigger_credit_event
LossApplied
NAV cascade

Loss magnitude and tranche impact — the most critical event for investors.

trigger_credit_event
CreditEventCreated
Credit event log

Full audit trail of every default, partial loss, and forced liquidation.

amm::swap
SwapExecuted
AMM price chart

Real-time tranche token pricing — the market's view of risk at any moment.

Each event is structured, typed, and emitted at the exact moment the instruction succeeds. There is no polling, no delayed consistency. When a credit event fires on Solana, the LossApplied event lands in the Dune stream in the same block.

The dashboard

What investors actually see.

Dune SIM powers four distinct panels in the PRISM protocol dashboard. Each one consumes a subset of the event stream and renders it into something an LP or credit analyst can act on.

Event Ticker
Dune SIM

A live stream of every protocol event in chronological order. Deposits, yield epochs, credit events, AMM swaps — all pulled from the /beta/svm/transactions endpoint and labeled by instruction type.

Account Balances
Dune SIM

SPL token balances for protocol-controlled accounts queried via /v1/solana/balances. Shows live USDC holdings across vault reserve and tranche accounts without building a custom RPC crawler.

NAV Chart
On-chain RPC

Net Asset Value per tranche derived from on-chain account state. Read directly from the Anchor program accounts via RPC — not Dune — since NAV is a computed field, not an emitted event.

TVL & AMM Prices
On-chain RPC

Total Value Locked and pPRIME / pCORE / pALPHA token prices read from program accounts via RPC. Updated every 5 seconds by the useVaultState polling hook.

The credit event log is the most consequential. It is the permanent, auditable record of every default, partial loss, and forced liquidation — the exact data that credit investors need to evaluate a protocol's track record. Without Dune SIM, reconstructing that log from raw RPC data would require parsing hundreds of transaction records manually.

What changes

Transparency that actually works.

The difference between PRISM with and without Dune SIM is the difference between a protocol that claims to be transparent and one that proves it.

Without Dune SIM
  • Dashboard reads from RPC — current state only, no history.
  • NAV chart requires a custom indexer built and maintained by the team.
  • Credit event log has to be reconstructed from raw transaction logs.
  • Any indexer gap means the dashboard displays stale or missing data.
  • Transparency is the promise; the data layer breaks before the user sees it.
With Dune SIM
  • Single API key gives access to protocol transaction history and account balances.
  • Event ticker and balance panel update in real time — no custom infrastructure.
  • Credit event log is complete and auditable from day one via /beta/svm/transactions.
  • SPL token balances queryable instantly via /v1/solana/balances — no RPC crawling.
  • Two endpoints, zero indexer maintenance: Dune SIM stays in sync with the chain.
Why it matters

Transparency is the product.

The fundamental promise of on-chain credit is that no one has to trust a black box. Yield distributions are verifiable. Loss allocation is deterministic. Credit events are auditable. None of that matters if the data is not readable.

In traditional credit markets, transparency is a legal obligation enforced by regulators — filed quarterly, audited annually, and often months out of date. In PRISM, transparency is an architectural property enforced by the protocol — updated in every block, readable by anyone, and never more than a few seconds behind the chain.

Dune SIM is the bridge between that architectural property and a dashboard that investors can actually use. It is the difference between "the data is there if you know how to read raw Solana account state" and "here is the NAV chart, here is the credit event log, here is the AMM price feed — real time, no intermediary."

On-chain credit without the analytics layer is a promise. With Dune SIM, it is a product.