mobileRumblefishLogo
Menu
Building Soroban Scan: the Soroban Block ExplorerOpen-source infrastructure for transparent, human-readable access to Soroban smart contract data
building-sorobanscanCaseStudyWideImage
About the project

Soroban is Stellar's smart contract platform, the layer that powers DeFi, token standards, and complex on-chain logic on the network. Since Soroban launched on mainnet in late 2023, the explorer landscape has been slow to catch up with it. Most Stellar tooling was designed around classic operations such as payments, trustlines, and offers, with Soroban support added on top rather than built in from the start.

For developers debugging smart contracts, users verifying their transactions, or anyone trying to understand what was happening on-chain, that gap mattered. Contract invocations, events, and return values were often shown as raw XDR or only partially decoded. The ecosystem also lacked an open-source, Soroban-first explorer whose data pipeline anyone could inspect, reuse, or deploy themselves.

The Stellar Development Foundation recognised this. Through the Stellar Community Fund (SCF #41), Rumble Fish was awarded a grant to build a Soroban-first block explorer from scratch - one that would make on-chain Soroban data accessible to developers, users, and anyone curious about the network, not just engineers who can read binary wire formats by hand. The result is SorobanScan, a publicly available, open-source Soroban block explorer indexed from Soroban genesis and running live on the Stellar mainnet and testnet at sorobanscan.com.

Collaboration timeframe:~4 months (April – July 2026)
Tech stack:
Galexie ClickHouse Rust TypeScript React AWS Soroban SDK
Services:Stellar Product Development, Blockchain Development, AWS Cloud Solutions, Smart Contract Development
Team size:4 blockchain developers, 1 UX designer
Challenges
Soroban Produces Data Structures Classic Explorers Weren't Built For

Soroban smart contracts generate a category of on-chain data that classic Stellar explorers weren't designed around: decoded contract invocation trees, typed function arguments and return values buried in binary ScVal representations, function signatures embedded in WASM bytecode, and CAP-67 contract events. Existing tools either skipped this data entirely or displayed it as raw, unreadable XDR blobs. Building a Soroban block explorer meant solving the decoding problem from first principles, and there was no open-source tooling to adapt.

No External API Could Serve the Data Required

The most obvious architectural shortcut, wrapping an existing Stellar API like Horizon or Soroban RPC, was not viable. Horizon is deprecated for the indexing use cases the project required. Soroban RPC provides contract-level access but not the assembled, queryable data structures a block explorer needs to serve. Neither source offered decoded invocation trees, WASM-extracted function signatures, or structured CAP-67 event data. The team had to own the pipeline end-to-end, ingesting directly from canonical ledger data, or accept permanent limitations on what the explorer could surface.

Ingesting a New Ledger Every Five Seconds, Indefinitely

The Stellar network produces a new LedgerCloseMeta XDR payload every five to six seconds, roughly 17,000 per day, continuously. Each file contains every transaction, every Soroban invocation, every CAP-67 event, and every ledger entry change for a complete ledger close. Processing this at near-real-time required an ingestion architecture that was fast enough to keep pace with the network, recoverable from failures without data loss, and cost-efficient enough to run at scale.

Two Years of Historical Data Before Going Live

Soroban has been on the mainnet since late 2023. For the explorer to be useful from day one, it needed to index roughly two years of history before launch. Running that historical backfill through the same event-driven pipeline designed for continuous live ingestion would have been slow and expensive.

Projected Database Storage of 7 TB

When the schema was designed in PostgreSQL and tested against a batch of ledgers, the extrapolated storage size for the full Stellar history came to approximately 7 TB. At that scale, infrastructure costs become a significant ongoing concern, and query performance for the time-range scans that power every page of the explorer becomes difficult to maintain.

Solutions
End-to-End XDR Ingestion Pipeline, Owned Completely

Rather than accepting an external API dependency, the team built a complete ingestion pipeline from the canonical ledger source. Galexie, the Stellar Foundation's ledger streaming tool, runs on ECS Fargate as a continuously running container, which had the right shape for a long-running, stateful process that maintains peer connections across ledger closes. When Galexie writes a LedgerCloseMeta XDR file to S3, a Rust Lambda fires on the PutObject event, parses the complete ledger contents, and writes structured records to ClickHouse in a single operation. Because each ledger is a durable S3 artifact, any ledger can be reprocessed by replaying the Lambda with its S3 key - recovery from failures, schema migrations, or parsing bugs without re-ingesting from the network.
A third Lambda, the Event Interpreter, fires every five minutes via EventBridge. It reads recently stored Soroban events and pattern-matches against known DeFi protocols (Soroswap, Aquarius, Phoenix) to generate plain-language summaries: "Swapped 100 USDC for 95.2 XLM." Keeping enrichment in a separate Lambda from ingestion means interpretation logic can be updated and rerun over historical events without touching the ingestion path.

Rust Lambdas for Cold Start Performance and XDR Throughput

All three backend Lambda functions are written in Rust. A compiled Rust Lambda is a single statically linked binary, typically under five megabytes, with no runtime to initialise - it starts in milliseconds. For the Ledger Processor, which fires on every S3 event, roughly 17,000 times a day, this matters: provisioned concurrency is not a practical solution for a function responding to events every five seconds indefinitely.

XDR parsing throughput reinforced the decision. Decoding thousands of binary operations per ledger close, transactions, invocations, events, ledger entry changes, in under ten seconds requires predictable memory usage and no garbage collection pauses. Rust delivers throughput roughly an order of magnitude higher than equivalent Node.js for this workload. The team was well inside the ten-second target with headroom. An additional practical benefit: Rust's strict compile-time error model proved highly productive in an AI-assisted development workflow, surfacing ownership violations and type mismatches at compile time rather than silently at runtime.

Pragmatic Backfill: Local Machines, Not the Cloud

The historical backfill ran on local machines, writing directly to a local ClickHouse instance, with the result migrated to production when complete. The event-driven pipeline is optimised for continuous steady-state ingestion; its overhead - Lambda invocations, S3 round-trips, remote database writes -  is trivially small for live ingest and a bottleneck for a one-time bulk operation across millions of ledgers. Running on hardware the team already owned processed historical data faster and at zero incremental cost. The architecture worked as intended precisely because the backfill was treated as its own case rather than forced through the pipeline designed for something else.

ClickHouse on Hetzner: 7 TB Becomes 900 MB

The 7 TB PostgreSQL projection was resolved by switching to ClickHouse, a columnar database. Rather than storing rows with all fields adjacent, ClickHouse stores columns, with all values for a given field adjacent in storage. Blockchain data is highly repetitive: account IDs, contract addresses, operation types, and status codes repeat millions of times. Column-adjacent storage lets compression algorithms exploit that repetition far more aggressively than a row-oriented layout, reducing the full Stellar Soroban history from a projected 7 TB to approximately 900 MB. Beyond compression, columnar layout is naturally suited to the time-range scans that power every page of the explorer; ClickHouse reads only the columns a query touches, substantially less I/O than a row store reading entire rows.

ClickHouse is not available as a managed AWS service. It runs on a dedicated Hetzner server with NVMe storage, at a fraction of the cost of an equivalent managed instance, while the compute layer (Lambda, ECS Fargate, API Gateway, CloudFront) remains on AWS. The Lambda runtime connects to ClickHouse over a standard TCP connection; vendor co-location is a convenience, not a technical requirement.

Nx Monorepo for a Hybrid TypeScript/Rust Codebase

Eight packages spanning Rust and TypeScript - three Rust Lambda crates, a React SPA, CDK infrastructure, shared domain types, utilities, and UI components - live in a single Nx monorepo. The coupling between frontend, backend, and infrastructure is real; making it visible and tooling around it is preferable to distributing it across repository boundaries. nx affected --target=build builds only packages touched by a given change. A change to libs/ui does not trigger a Rust compilation. The dependency graph is explicit, visualisable, and enforced by the toolchain rather than by convention.

LinkedIn Square (16).png

The Results
Infrastructure Performance
  • Ledger ingestion pipeline: live mainnet data indexed continuously, from Soroban genesis to present
  • p95 API response time under 200ms at 1 million requests/month equivalent load (load-tested, Tranche 3)
  • Database storage: approximately 900 MB for full Soroban history (projected 7 TB in PostgreSQL)
Security and Production Readiness
  • Security audit completed against OWASP Top 10, zero critical findings at launch
  • GitHub Actions CI/CD with OIDC authentication - no long-lived AWS credentials stored in the public repository
  • Full API documentation and seven-day post-launch monitoring report delivered
Ecosystem Contribution
  • SorobanScan is free, publicly accessible, and indexed from Soroban genesis
  • Repository is fully open source; CDK stack is reproducible - anyone can cdk deploy a complete working copy in a fresh AWS account
  • DeFi event interpretation live for Soroswap, Aquarius, and Phoenix protocols at launch
Looking Forward: From Block Explorer to Soroban Data API

SorobanScan adds an open, Soroban-first data layer to the Stellar ecosystem, making contract activity easier to debug, verify, and understand. But the explorer is only the most visible layer of what the project produced. Underneath it sits something more broadly useful: a continuously updated, fully decoded dataset of Soroban activity from genesis to present, served by infrastructure that has already proven it can handle production load.

That makes the next step a natural one: opening that data layer as a public Soroban Data API. Today, every team building on Soroban that needs decoded invocation trees, typed arguments and return values, WASM-extracted function signatures, or structured CAP-67 events faces the same choice we did. They can run their own ingestion pipeline from raw LedgerCloseMeta, or live with the limits of Horizon and Soroban RPC. The API removes that choice. Wallets can show users what a transaction actually did instead of an XDR blob. Analytics platforms and dashboards can query historical contract activity without first spending months on a backfill. Auditors and compliance teams can trace contract interactions end to end. DeFi protocols can consume the Event Interpreter's plain-language summaries directly in their own interfaces.

The same properties make the API a strong fit for AI agents. An LLM-based agent can do very little with raw XDR, but it can reason well over structured, typed data and summaries like "Swapped 100 USDC for 95.2 XLM." That opens the door to several kinds of agents. Some could answer questions about an account's on-chain history. Others could monitor contracts and flag unusual activity, explain a failed transaction to a developer, or assemble context before executing a DeFi strategy on Stellar. Exposing the API through an agent-friendly interface such as an MCP server would let these tools query Soroban data directly, with no custom integration work on either side.

The architecture was built with this in mind. The explorer frontend already consumes the backend through a documented API, with p95 response times under 200 ms at load-tested scale. Ingestion and enrichment are decoupled, so new protocol interpreters and new endpoints can ship without touching the ingestion path. ClickHouse's columnar storage keeps the cost of serving large time-range queries low enough to offer them to external consumers sustainably. In practice, SorobanScan becomes one client of the API among many.

As Stellar's DeFi ecosystem matures, infrastructure that makes on-chain data legible to developers, users, auditors, and newcomers alike becomes foundational rather than optional. SorobanScan showed that Rumble Fish can design, build, and ship that infrastructure to production within a fixed-budget public mandate. Turning it into an API is how that infrastructure starts working for the whole ecosystem, not just the people who visit the explorer.

Check our case studies
Previous projectEVM-to-Soroban redesign bringing DeFi incentive infrastructure to the Stellar ecosystemlastCaseStudyBanner
Previous projectCross‑chain bridge with tapplet security and DeFi‑ready ERC‑20lastCaseStudyBanner
Have an idea?
Let’s work
together!
We will answer any questions you may have related to your startup journey!Do you prefer e-mail?
hello@rumblefish.pl