Get Started with Mercury
Learn about Mercury and whether it's a good fit for your use-case.
Thanks for taking an interest in Mercury, you have now landed on our documentation! Here you will learn all things Mercury. Let's start by understanding what Mercury is and whether it's a good fit for you.
What is Mercury?
Mercury is the most powerful managed (or self-hosted!) indexing service running on the Stellar Network. It allows projects to retrieve on-chain data efficiently to display user information, plot historical data charts, track the growth of an ecosystem, and much more. In short, whenever you are dealing with on-chain Stellar and Soroban data, there's a high probability that Mercury will come in handy. That is, unless you want to manually poll and process RPC data, but this will likely result in a slower, more resource consuming and more expensive alternative.
When should I use Mercury to retrieve my data?
Using an indexer is a common practice for decentralized applications, services, and wallets. However, in the Stellar ecosystem, we've never really had one.
With the introduction of the Soroban Virtual Machine in Stellar validators, however, a whole new world of applications that rely on custom contract-defined data structures, unregistered (in the ledger) metadata, and more meticulous retrieval needs will emerge. These services either need to:
Rely on block explorers or the RPC. This is a valid option, but will generally be slower, with less specific querying options, and not customizable in any way.
Rely on a self-hosted ingestion workflow, running and maintaining an instance of Stellar core, a database, and ingestion logic.
Rely on managed or self-hosted indexing services.
Rely on data processing and db flows that are tailored for the indexer protocol/smart contracts. This is likely the best and most efficient alternative.
Mercury belongs to both the third and the fourth category of data providers, allowing both standardized indexing and custom indexers. While many of the product's features are centered around Mercury's cloud infrastructure, you can always choose to self-host your indexer based on Mercury's ZephyrVM, the virtual machine that powers our cloud infra.
Why Mercury & the ZephyrVM
You're building/have built a smart contract(s) and now need to rely on an indexer to deal with your data, why would you choose Mercury?
Here are some hints:
Built specifically for Soroban and Stellar. While our ZephyrVM's implementation is chain agnostic, it has soroban-specific features that translate to an incredible developer experience.
The easiest way to build a complete indexer. A zephyr program has all of the capabilities that a low level indexer hardwired to stellar core has (because it's exactly what it is!), all while being developed with a specialized SDK (with built-in support for Soroban types through the rust soroban SDK), in Rust, and with user-friendly handles to abstractions such as the database or the stellar ledger.
Built-in RPC functionality. Simulate and build transactions directly within your indexer, no need to rely on a separate RPC functionality.
Custom APIs. Apart from custom ingestion, your indexer can also offer a custom API for data retrievals with all the filtering and processing that might be required.
Automation jobs. Does your project also need automation based on live on-chain data? We've got you covered.
Made for building dashboards. Besides being your indexer, Mercury can also be the home for your dashboards and we have built-in functionality for that!
No vendor lock-in. You don't need to worry about writing a Zephyr program that might turn out to be useless if you decide that you want to manage your own infrastructure, you can always self-host!
Used to index Soroban's best protocols/contracts: Soroswap, Freighter, SorobanGovernor, the Passkey Kit, Blend, and more.
Built by Stellar and Soroban experts that are also trusted within the Stellar community.
If the above are not enough, you can ask to the stellar community itself and get their feedback!
Last updated