Summary
Connect Dune Analytics to the Boundless escrow contract so we get public, SQL-driven on-chain analytics and a transparency dashboard with zero indexer infrastructure to run. Dune has indexed Stellar (including Soroban) since Meridian 2024, so our contract's events are queryable once it is live on mainnet (pubnet).
This issue lives in the contract repo because the main prerequisite is contract-side: the events we emit must carry enough structured, decodable data for analytics to be meaningful. The Dune dashboard work is downstream and easy once the event schema is confirmed.
Why (what it does for us)
- Public transparency dashboard — TVL in escrow, bounties funded/completed, total paid out to builders. High-signal for community trust, marketing, and Stellar ecosystem / grant reporting.
- Product + treasury metrics — funded vs. completed bounties, average bounty size, time-to-payout, unique participant/organizer wallets, payout volume by asset (USDC…), over time.
- Independent source of truth — reconcile on-chain reality (Dune) against our off-chain DB (
boundless-nestjs bounty/escrow rows) to catch drift.
- No infra — Dune indexes Stellar for us; we just write SQL. Complements our internal
escrow-contract subscriber / stellar/indexers (which exist to drive app state, not analytics).
Background: how Dune sees us
Our escrow contract's activity lands in Dune's Stellar tables:
| Table |
Use |
history_contract_events |
Soroban contract events + traces — our escrow events land here, filterable by contract id |
contract_data |
Contract state/storage (e.g. escrow balances, TTL) |
history_transactions / history_operations / history_effects |
Tx-level detail, actors, fees |
history_ledgers |
Ledger metadata, timing |
We filter history_contract_events to BOUNDLESS_EVENTS_CONTRACT_ADDRESS and build queries → charts → dashboard.
What the contract emits today
From the flow boundless-nestjs already consumes (escrow-contract subscriber + client), these Soroban events fire:
create_event — a bounty escrow is created/funded
add_funds — additional funding / contributions to the pool
apply / apply_to_bounty — a participant applies/claims on-chain
submit — a submission is anchored on-chain
select_winners — winners chosen; payout settles
(Confirm the full set, including any withdraw / refund / cancel / explicit payout.)
The two real gotchas (please confirm)
- Mainnet only. Dune indexes Stellar pubnet (mainnet). The contract is on testnet today, so meaningful analytics begin at mainnet deployment. We need the deployed mainnet contract address(es) for
BOUNDLESS_EVENTS_CONTRACT_ADDRESS (and profile contract if relevant).
- Soroban event decoding. Soroban events are XDR / ScVal-encoded (topics + data), so getting clean numbers out (amounts, bounty id, winner address, asset) requires decoding those topics/data in SQL. The friction here is proportional to how well-structured our emitted events are. We need each analytics-relevant event to carry, in decodable form:
- a stable event/bounty id,
- the amount and asset,
- the relevant address(es) (funder, applicant, winner),
- and a clear topic naming the event.
Scope / tasks
Contract-side (this repo)
Analytics-side (follow-up, likely tracked in platform/infra)
Acceptance criteria
References
Note: this depends on the mainnet-deployment / env-hardening work (escrow contract addresses + STELLAR_NETWORK=mainnet + STELLAR_RPC_URL) already flagged in the production-readiness review.
Summary
Connect Dune Analytics to the Boundless escrow contract so we get public, SQL-driven on-chain analytics and a transparency dashboard with zero indexer infrastructure to run. Dune has indexed Stellar (including Soroban) since Meridian 2024, so our contract's events are queryable once it is live on mainnet (pubnet).
This issue lives in the contract repo because the main prerequisite is contract-side: the events we emit must carry enough structured, decodable data for analytics to be meaningful. The Dune dashboard work is downstream and easy once the event schema is confirmed.
Why (what it does for us)
boundless-nestjsbounty/escrow rows) to catch drift.escrow-contractsubscriber /stellar/indexers(which exist to drive app state, not analytics).Background: how Dune sees us
Our escrow contract's activity lands in Dune's Stellar tables:
history_contract_eventscontract_datahistory_transactions/history_operations/history_effectshistory_ledgersWe filter
history_contract_eventstoBOUNDLESS_EVENTS_CONTRACT_ADDRESSand build queries → charts → dashboard.What the contract emits today
From the flow
boundless-nestjsalready consumes (escrow-contractsubscriber + client), these Soroban events fire:create_event— a bounty escrow is created/fundedadd_funds— additional funding / contributions to the poolapply/apply_to_bounty— a participant applies/claims on-chainsubmit— a submission is anchored on-chainselect_winners— winners chosen; payout settles(Confirm the full set, including any
withdraw/refund/cancel/ explicitpayout.)The two real gotchas (please confirm)
BOUNDLESS_EVENTS_CONTRACT_ADDRESS(and profile contract if relevant).Scope / tasks
Contract-side (this repo)
payout/withdraw/refundevents with amounts).Analytics-side (follow-up, likely tracked in platform/infra)
history_contract_eventsfor our contract into: TVL, bounties funded, total payouts, participant counts.Acceptance criteria
create_event) filtered to our contract id and returns correct values.References
Note: this depends on the mainnet-deployment / env-hardening work (escrow contract addresses +
STELLAR_NETWORK=mainnet+STELLAR_RPC_URL) already flagged in the production-readiness review.