Midnight: Developer Resources
This page is your central hub for all the tools, links, and data sources you need to build on Morpho Midnight.
Data & Contracts
These resources are for interacting directly with the blockchain.
- Contract Specifications: For detailed function signatures, events, and errors, refer to the canonical contract specs:
- Midnight Core Contract: immutable fixed-rate lending primitive via isolated permissionless markets
- Midnight Bundler: atomic multi-step transactions (e.g., supply collateral + take in one call)
- GitHub Repositories:
- Midnight: The core protocol contracts (Midnight.sol, interfaces, libraries).
Integration Methods
These tools provide easier access to onchain data for frontends, backends, and analytics.
- Midnight REST API: Indexed onchain state (markets, positions, transactions, offer groups, and performance data).
- API Reference: Morpho Midnight API examples
- Base URL:
https://api.morpho.org/v0/midnight/ - Tutorials:
- Midnight SDK: TypeScript library for constructing offers, computing ticks, encoding payloads, and interacting with the protocol.
Other
- Validation Rules Reference: Full table of Router mempool rules (what the Router checks before indexing an offer)