Introduction to Retroshades

Want to get started with retroshades? You are in the right place.

Traditional indexing methods for Soroban events can be time-consuming and complex. They often require developers to:

  1. Build customized indexing infrastructure, which can take days or even weeks to implement correctly.

  2. Rely on generic indexers with rigid data structures that are a burden to query and require extensive client-side processing.

To counter this, we developed Retroshades to offer a more accessible, and significantly less time consuming alternative that doesn't make efficiency sacrifices:

  • Familiar Territory: For Stellar native teams, Retroshades equates to building indexing logic with Soroban, eliminating the need of learning anything new.

  • Rapid Implementation: Developers can create rich, efficient indexers in minutes rather than days. This occurs by leveraging runtime variables and functions from your own smart contract.

  • Streamlined Functionality: Focused specifically on indexing, Retroshades completely abstracts form the consumer the process of going from a Retroshade event/data structure on your contract to a query-efficient table with native database types as column types.

What is a Retroshade?

A Retroshade is a contract-level defined data structure that might be though of as a contract event but is not. These data structures are defined and emitted within smart contracts deployed to the Mercury network (or other networks that support the SVM-retroshades-fork) and should not be part of the on-chain contract deployment.

Retroshades are not soroban events because they aren't emitted on-chain, rather they are emitted in retroshade-compatible parallel networks that mirror mainnet, such as the Mercury Retroshades network. This means that these events and all associated data retrieval logic does not live on-chain, but it's developed right within the smart contract, enabling Retroshades to contain significantly more data than a standard event, plus gaining advantage by reusing runtime variables, storage functions, contract calls, contract math functions, etc.

In short, a Retroshade enables you to write fully-featured indexers in minutes as opposed to hours or even days, and that's only possible because developers do not need to learn any new technology, because what you are writing is simply a modified version of your contract that runs on a specialized virtual machine.

How It Works

The only similar product across all of web3 is Shadow which recently raised 9M from Paradigm. Similarly, Retroshades introduces a novel approach to indexing:

  1. Integration with Smart Contracts: Developers add the Mercury feature to their Soroban smart contracts and define custom events using runtime variables, contract functions, soroban helpers, etc.

  2. Parallel Execution: Mercury runs a parallel network alongside the main Stellar network, using a modified version of the Soroban Virtual Machine (SVM) called the Retroshade SVM fork.

  3. Custom Event Emission: When transactions are executed, the Retroshade SVM emits custom events with rich, structured data.

  4. Backend Database Adaptors: These events are automatically parsed and stored in a database with native data types and custom columns, making them immediately ready for efficient querying.

Key Benefits

  1. Ease of Use: Create complex indexers in minutes instead of days or weeks.

  2. Flexibility: Fully customizable event structures tailored to your specific needs.

  3. Efficiency: Native database types and structured columns allow for faster and more intuitive queries.

  4. Familiarity: Utilize existing Soroban concepts and functions in your indexing logic.

  5. Rich Data: Incorporate cross-contract calls, storage functions, and external data sources in your indexed events.

Last updated