Area
Soroban contracts / Backend API
What problem does this solve?
As state commitments grow across multiple bridge operators and Soroban contracts, storing and querying historical Merkle roots for reserve backing proofs causes ledger footprint inflation and RPC query slowdowns. Currently, verifying historical Merkle proofs requires iterating over uncompressed leaf hashes in TimescaleDB or on-chain storage.
Proposed solution
- Develop an on-chain compact Merkle Mountain Range (MMR) accumulator contract in Soroban (
contracts/soroban/mmr_accumulator).
- Implement MMR leaf insertion, peak aggregation, and append-only state compression algorithms.
- Build a backend service
mmrAccumulator.service.ts to compute append-only proof peaks from historical reserve commitments.
- Expose verification endpoints (
POST /api/v1/reconciliation/verify-mmr-proof) and Soroban contract method verify_mmr_proof to validate inclusion with logarithmic space complexity ($O(\log N)$).
- Write integration test suites verifying proof generation and Soroban contract validation across multi-thousand leaf trees.
Alternatives considered
Keeping flat Merkle tree leaves stored on-chain, but MMR accumulators drastically reduce ledger storage footprint and provide verifiable historical state proofs.
Area
Soroban contracts / Backend API
What problem does this solve?
As state commitments grow across multiple bridge operators and Soroban contracts, storing and querying historical Merkle roots for reserve backing proofs causes ledger footprint inflation and RPC query slowdowns. Currently, verifying historical Merkle proofs requires iterating over uncompressed leaf hashes in TimescaleDB or on-chain storage.
Proposed solution
contracts/soroban/mmr_accumulator).mmrAccumulator.service.tsto compute append-only proof peaks from historical reserve commitments.POST /api/v1/reconciliation/verify-mmr-proof) and Soroban contract methodverify_mmr_proofto validate inclusion with logarithmic space complexity ($O(\log N)$).Alternatives considered
Keeping flat Merkle tree leaves stored on-chain, but MMR accumulators drastically reduce ledger storage footprint and provide verifiable historical state proofs.