> ## Documentation Index
> Fetch the complete documentation index at: https://docs.istravex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Indexer hardening guide

> Nine rules for turning Stellar ledger data into records correctly, each one backed by evidence.

> [!TIP]
>
> Reviewed and confirmed by a Stellar Core engineer on 14 November 2026.

This guide is for anyone writing code that turns Stellar ledger data into records: indexers, explorers, wallets, custody systems, analytics pipelines. It applies in any language. Where a rule can be checked mechanically in Go, [istravex-lint](https://docs.istravex.com/tools/lint.md) does it.

Every rule cites something you can check yourself: a fixture in the corpus, a lint rule, or a measured result in `corpus/results/`. Nothing here is "best practice" by assertion.

## The one idea underneath all of it

> The envelope says what a transaction **asked** for. `LedgerCloseMeta` says what **happened**. When they disagree, the metadata is right.

Most of the rules are that idea applied to a specific field.

## The rules

> [card] [1. Effects from metadata](https://docs.istravex.com/guide/effects-from-meta.md)
>
> Participants, balances and created entries come from meta, not the envelope.

> [card] [2. Fees](https://docs.istravex.com/guide/fees.md)
>
> Who paid, how much, and why fee changes over-count Soroban fees.

> [card] [3. 64-bit integers](https://docs.istravex.com/guide/wide-integers.md)
>
> Muxed IDs, amounts, limits and TOIDs all exceed 2^53.

> [card] [4. Muxed accounts](https://docs.istravex.com/guide/muxed-accounts.md)
>
> Keep the account and the ID; expect fee-bump wrapping.

> [card] [5. Signed-payload signers](https://docs.istravex.com/guide/signed-payload-signers.md)
>
> Store the full P… key, payload included.

> [card] [6. SAC trustlines](https://docs.istravex.com/guide/sac-trustlines.md)
>
> Trustlines and accounts created without classic operations.

> [card] [7. Untrusted strings](https://docs.istravex.com/guide/untrusted-strings.md)
>
> Memo text isn't validated UTF-8.

> [card] [8. Bounded recursion](https://docs.istravex.com/guide/bounded-recursion.md)
>
> Walkers over ScVal and auth trees need a depth limit.

> [card] [9. Consensus data only](https://docs.istravex.com/guide/consensus-data.md)
>
> Diagnostic events differ between nodes. Never index them.

Short on time? Start with the [checklist](https://docs.istravex.com/guide/checklist.md).

## Does following it work?

The replay harness measures it. An indexer that reads effects from the envelope gets **all four** indexed cases wrong: two incorrect, two dropped. One that follows these rules gets all four right. [stellar/wallet-backend](https://docs.istravex.com/pilots/wallet-backend.md), which already follows them, gets all six fixtures right.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.