Dark engine source
These are the files that run the matching engine behind this site, as deployed. Onchain settlement is not written yet: no contract is deployed and no funds move.
engine.mjs
The matching engine: sealing, resting, crossing at the mid, the public feed. Runs unchanged locally and on Vercel.vercel-api.mjs
The hosted function: one route, the book kept in private Vercel Blob storage with conditional writes.server.mjs
The local server: same engine, the book kept in a file.test.mjs
End-to-end test of the engine, 11 steps, including simultaneous blocks.test-online.mjs
The same kind of test, run against the hosted engine.