# Midnight Scan documentation

The explorer's reference documents, published as plain Markdown. Each is the same file the code was written against (the repo's `docs/`).

- [Glossary](https://midnightscan.org/docs/glossary.md) — Every protocol and explorer term — units, ticks, price, implied APR, LLTV, lossFactor, the three market ids, offerHash — with its scale and where it appears.
- [Architecture & protocol reference](https://midnightscan.org/docs/architecture.md) — Data flow from chain to page, the protocol model handlers encode (units, buyer = lender, ticks, market ids, offer death, maturity, lossFactor) and the handler invariants.
- [Mempool offer wire format](https://midnightscan.org/docs/decoder.md) — Spec of record for the offer-blob encoding broadcast through the Mempool contract: version byte, gzip envelope, the Offer struct, resource limits, derived hashes.
- [Contract ground truth](https://midnightscan.org/docs/contracts.md) — Source repositories, verified deployed addresses per chain, the Tenor vault registry, router attribution and the event → handler → table catalog.
- [Machine-readable surfaces](https://midnightscan.org/docs/api.md) — How to read the explorer as a program or a model: Markdown twins, the REST API and its envelope, OpenAPI, the MCP server, the resolver and llms.txt.

Everything above, concatenated with the site map for models: https://midnightscan.org/llms-full.txt. The short map: https://midnightscan.org/llms.txt.
