current workflow:
fork mainnet
run security scan
fuzz weird execution paths
export report
before deployment ever touches production.
we built SolanaTestForge during @colosseum Frontier Hackathon because “tests passed” means very little without adversarial conditions.
fork state.
mutate inputs.
break assumptions first.
github.com/EconomicFuzz-dev/…
forking mainnet does not just make tests more realistic.
it removes assumptions.
same program.
same instructions.
completely different outcomes once real state is involved.
demo: economicfuzz.vercel.app
some teams treat testing like confirmation.
we treat it like adversarial research.
if the protocol survives weird timing, weird state, and weird inputs,
then the real confidence starts.
current workflow inside SolanaTestForge:
fork state
run scanner
fuzz instructions
export report
all before deployment touches mainnet.
local validator:
everything green.
forked mainnet:
slot mismatch,
oracle drift,
unexpected CPI path.
same program.
different reality.
most teams test happy paths. some test failure paths. almost nobody tests timing.
oracle lag. slot delay. account sync. that is where things break.
instruction passed all checks.
post-state matched expectations.
except one thing:
rent-exempt threshold dropped below minimum after transfer.
not caught in test.
caught in fork.
yes, that is a bug.
coming from Foundry? fuzzing on solana is not just calldata mutation.
you are mutating:
- account state
- signer flags
- cpi boundaries
same idea. different failure modes.
forking mainnet does not just give you real state. it removes assumptions.
most programs pass on local validator.
fail within 20s on fork. that is the gap people underestimate.
found this after ~420k iterations.
cpi call succeeded.
state updated.
event emitted.
authority check failed silently. yes, that is a bug.
Testing Solana CPIs is hard: inner instructions are hidden from logs by default, transaction-level pre/post checks miss intermediate state bugs, and target programs often only exist on mainnet. Forking solves the mainnet issue, but the first two are on you.
coming from Foundry? here is the rough mapping.
forge test → solforge test vm.deal() → forked account state with whatever lamports you want vm.prank() → no direct equivalent.
CPI authority is checked at instruction boundary, not impersonated at runtime.
ran security check on a hackathon program last week. signer_check failed on withdraw. authority account had no isSigner flag.
2 critical, 1 high, 0 minutes to find. the report was longer than the program. yes, that is a bug. fixed before submission.
submitting solanatestforge to @colosseum.
`forge test --fork mainnet --fuzz 800000`
~30 seconds.
2 critical bugs.
1 unexpected revert path.
demo will be live.
found this edge case after 600k iterations. instruction succeeded. state updated. lamports not synced for one slot.
yes, that is a bug. fix shipped in v0.5.3.
testing against local validators is where most issues hide. forking mainnet state usually breaks assumptions in under 30s.











