Offchain Morpho bots — reallocators, liquidation monitors, market makers, and similar — and the shared packages they consume. Every bot is a long-running program that holds a key, signs transactions, and moves funds on mainnets with no human approving each action, so the code favors safe and explainable over clever or fast.
This is a Bun workspaces monorepo. Bun installs packages and runs scripts; the bots, scripts, and tests run on Node:
bots/— individual bot apps (one per bot); each keeps its ownREADME.mdpackages/— shared libraries the bots depend onframework/— the bot framework: dataflow engine, transaction kernel, controller
Pull requests are not accepted at this time; see CONTRIBUTING.md. Issues are welcome.
| Bot | Description | Docs |
|---|---|---|
| blue-liquidation | Liquidates eligible Morpho Blue positions | README |
| midnight-liquidation | Liquidates eligible Midnight positions | README |
| midnight-crossed-books | Resolves crossed Midnight offer books | README |
| quoter-bot | Midnight maker: setup checks, bootstrap, ladder quoting | README |
| vault-v1-reallocation | Reallocates liquidity across Vault V1 Markets | README |
| vault-v2-reallocation | Reallocates liquidity across Morpho Vault V2 Markets | README |
The quoter-bot CLI is also published to npm as
@morpho-org/quoter and to Docker Hub as
morphoorg/quoter; both are published from this
repository's quoter-* tags by the workflows under .github/workflows/.
| Package | Description |
|---|---|
| @repo/contracts | Shared contract ABIs and Executor sources |
| @repo/kit | Shared bot runtime: clients, logger, chain reads, signing effects, kernel signer |
| @repo/offers | Maker offer-book model: prospective batching and negative-spread checks |
| @repo/swaps | Multi-venue DEX quoting, routing, unwrap seam, and venue selection |
| @repo/typescript-config | Shared TypeScript configuration |
| @repo/utils | Shared server-safe utilities |
nvm use # Node 24.22.3 (see .nvmrc)
curl -fsSL https://bun.com/install | bash -s "bun-v1.4.4" # pinned by package.json#packageManager
bun install
bun run build # @repo/contracts ABIs, needed by the liquidation bots' testsDependency lifecycle scripts run only for the packages listed in trustedDependencies in
package.json; Bun skips every other one and reports it (bun pm untrusted). Install settings
live in bunfig.toml.
bun run lint # oxlint, repo-wide
bun run format # oxfmt, repo-wide
bun run --filter '*' typecheck # tsc --noEmit in every workspace package
bun run knip # dead-code detection
bun run test # vitest projects plus Node playground suitesThe fork and e2e suites under bots/*/test/fork/ and bots/quoter/test/e2e/ fork Base at a
pinned block and need RPC_URL_8453 set to an archive endpoint; see each bot's README.
Release tags look like <bot>-<PR#>, for example quoter-227. A quoter-* tag publishes
the npm package and the Docker Hub image.
docs/CONVENTIONS.md— code organization, patterns, and stylebots/<bot>/README.md— how to configure, run, and deploy each bot
Apache-2.0 © 2026 Morpho Association