Replaying the Market
Select Time Window
Check if the range matches any prebuilt bundles, which cover the past 30 days. If needed, filter the search with --after <DATE> or --before <DATE>.
sim rangesStart Time (UTC) End Time (UTC) Start Slot End Slot Bundle Size Kind Scope
----------------------------------------------------------------------------------------------------------------------------------
2026-06-30T17:53:10Z 2026-06-30T19:00:53Z 429,926,541 429,936,540 10,000 account_state global
2026-06-30T18:23:38Z 2026-06-30T18:27:02Z 429,931,041 429,931,540 500 account_state global
2026-07-19T05:50:16Z 2026-07-19T07:00:13Z 433,838,452 433,848,451 10,000 account_state globalFor ranges older than 30 days or ones that fall between prebuilt bundles, build a custom one instead.
sim bundle build --start-slot 400000000 --end-slot 400001000Run a Baseline
Start a session to replay transactions and capture the existing behavior. If the range is covered by multiple bundles, use --parallel to split the work between concurrent sessions.
# Baseline
sim run \
--start-slot 400000000 \
--end-slot 400001000 \
--program-id <PROGRAM_ID> \
--output-file baseline.jsonThis generates a newline-delimited JSON file that contains the results of the run.
sim provides a helper that reads the JSON to summarize the run's output.
sim summarize baseline.jsonFile : baseline.json
Slot range : 400000000 → 400001000
Program IDs : <PROGRAM_ID>
Session(s) : 10
Ran at : 2026-05-29 03:06:07 UTC
i Transactions : 205308 (96972 successes, 108336 failures)# Trace specific wallet balance changes
sim summarize baseline.json --accounts E2gE...Account: E2gE...
SOL 29.455253127 → 29.293640983 (Δ -0.161612144)Run an Experiment
Build a modified program with parameter changes, feature upgrades, or bug fixes. Substitute it in place of the original binary and run the new logic against the same historical flow.
# Experiment
sim run \
--start-slot 400000000 \
--end-slot 400001000 \
--program-id <PROGRAM_ID> \
--program-so <PATH_TO_NEW_BINARY> \
--output-file experiment.jsonIf the new program requires higher compute units, bump it up to prevent transaction failures with --extra-compute-units <EXTRA_UNITS>.
Compare Results
Once both the baseline and experiment are complete, compare the two runs:
regressions: original transaction that succeeded -> now fails
improvements: original transaction that failed -> now succeeds
balance changes: deltas in every account's token accounts
sim compare baseline.json experiment.json# Only show what broke
sim compare baseline.json experiment.json regressions# Check P&L impact
sim compare baseline.json experiment.json balancesLast updated