Adaptive market making

Adaptive liquidity, explicit state.

DEXBot2 is an open source market-making bot. It maintains a geometric limit-order grid, reconciles fills against on-chain state, and recalculates the grid from configurable market signals.

01 Open source02 No external services03 Blockchain: BitShares
DEXBot2 trading robot with a green and red market-making grid System ready
DEXBOT2 / MARKET MAKING RUNTIMEv1.6.11
AdaptiveGrid + AMA signals
ExtendedMPA / credit + Claw
ResilientReplay-safe fills
SecureEncrypted credentials

The idea

A grid is a state machine, not a one-sided bet.

DEXBot2 maintains a geometric limit-order grid around a reference price. Each fill updates the internal accounting model; the engine plans a replacement grid, broadcasts the delta, and commits only after confirmation.

That separation between market view, order state, and execution is the point. The grid can move with a fixed anchor, pool price, order-book midpoint, or AMA source without losing track of what is actually on-chain.

Platform note DEXBot2 runs on the BitShares decentralized exchange. BitShares is the execution venue, not a prerequisite for understanding the strategy.

Risk model

Tighter increments increase turnover and fees. Wider spreads reduce trade frequency. The bot does not remove adverse selection, inventory risk, or execution risk.

How the grid thinks01 / 03
01

Anchor the fair value

Use the market-derived start price to enter the market, then anchor the grid to the AMA (adaptive moving average). AMA presets control how quickly the anchor follows price.

02

Build around it

Geometric increments place buy and sell levels at changing distances from the center instead of using a flat step.

03

Keep a spread

The empty zone between buy and sell orders is the room the strategy aims to capture. Fills trigger a controlled rebalance.

Adaptive signals can adjust the center, range, and buy/sell weights.

One controlled cycle

From an on-chain fill to a safer replacement plan.

DEXBot2 separates observation, accounting, planning, and execution. That separation is what makes recovery and debugging possible.

01

Observe

Fill events and periodic chain reads tell the bot what actually happened on the DEX.

02

Account

Processed-fill tracking credits a fill once, even when a recovery or retry repeats the same event.

03

Plan

A copy-on-write working grid calculates the new buy and sell orders without mutating the last confirmed plan.

04

Commit

Only after the broadcast is confirmed does the working grid become the new master grid.

What you can do

Operational workflows for the full bot.

Start with the workflow you need. DEXBot2 connects market signals, capital workflows, research tools, and runtime operations in one system.

01

Market Adapter

AMA pricing, grid triggers, dynamic weights, and collateral advisory signals.

02

MPA and Credit Usage

Bot-scoped debt policy, MPA borrowing, and credit offer workflows.

03

Analysis

Research runners, chart generators, and tuning helpers for AMA fitting, trend detection, bot fitting, and TradingView exports.

04

Grid Recalculation

Reset sources and triggers for AMA deltas, range scaling, divergence correction, and fund regeneration.

05

Claw

Bridge setup, launcher commands, short MPA workflows, and example commands for external runtimes.

Under the hood

The runtime behind each workflow

01

Geometric grid execution

Generate a controlled ladder of limit orders, then rotate it from the fill-driven rebalance path. Tune spread, increment, range, and side weights without changing the runtime model.

02

Grid Reconciliation

Verify account state, order state, and bot state after startup, maintenance, or unexpected interruptions; repair drift before creating new orders.

03

Secure operations

Keep keys encrypted at rest. A credential daemon handles signing in an isolated process so raw keys stay out of the main bot process.

04

Runtime integrity

Replay-safe fill accounting, startup recovery, and copy-on-write rebalancing keep the runtime deterministic across restarts, retries, and partial failures.

Quick start

From clean install to a controlled first run.

Use the local workflow first. Open the README when you need the complete parameter reference.

RequirementsNode.js v22.12+ · Git
Installnpm i -g dexbot
Startdexbot start
01

Connect

Set up the trading account and its active key, then import your credentials into the encrypted vault.

dexbot key
02

Configure

Choose a pair, set your range and spread, and start from the recommended market price and AMA anchor.

dexbot bot
03

Run

Start in dry-run mode, inspect the grid and logs, then enable live operation deliberately.

dexbot start

Recommended first configuration

Start with a reference, not a guess.

Use the market price for the initial start reference and the AMA as the grid anchor. The recommended baseline is a 2× range, 2% target spread, 0.5% increment, and equal buy/sell weights.

startPrice: poolgridPrice: ama3minPrice / maxPrice: 2xtargetSpreadPercent: 2incrementPercent: 0.5weights: 1 / 1

The full README is mirrored locally as a reference. Open the local README ↗ · BitShares setup notes ↗

For serious operators

Control the details. Keep the overview.

DEXBot2 is designed to be inspected. Read the strategy, understand the recovery model, and use the tools that match your operation.

Open the full documentation ↗
Market adapter 01

Enable live AMA pricing, dynamic buy/sell weights, and range scaling with per-bot adapter flags.

Credit and MPA 02

Run credit-only mode, manage margin borrowing, and review offers with debt-first collateral ratio planning.

State and recovery 03

Understand startup reconciliation, fill recovery, copy-on-write rebalancing, dust cleanup, and log rotation.

Integrate and operate 04

Use the CLI, Docker images, diagnostics, JSON logs, and the Claw bridge for compatible runtimes.

Choose your path

Built for operators, developers, and BitShares newcomers.

For market makers

Keep a grid active without building a full trading stack. Tune spread, increment, range, and weight distribution for your market.

See trading features ↗

For developers

Study the architecture, tests, fund accounting, copy-on-write rebalancing, and runtime boundaries before extending or integrating the bot.

Study the source ↗

New to BitShares?

BitShares is the exchange where DEXBot2 runs. Learn only the setup details you need: account, active key, assets, and dry-run operation.

Read the platform guide ↗

Ready when you are

Put a clear grid on the market.

Use the local quick start, read the full README when needed, and make the first run deliberate.

Good to know

Questions, answered simply.

What is DEXBot2?

DEXBot2 is an open source systematic market-making bot. It generates a geometric limit-order grid, applies market-derived signals, accounts for fills, and reconciles its working state with the exchange. The bot runs on the BitShares decentralized exchange.

Does it need a database or other services?

No database or external runtime services. DEXBot2 includes its native BitShares client, key handling, persistence, and core runtime. You need Node.js 22.12 or newer.

Can I test before trading?

Yes. A bot can be configured with dry-run mode enabled, and the onboarding guide walks you through a safe first setup.

How do I keep my keys safe?

Import only the key the bot needs, protect the profile directory, and let the credential daemon handle signing. Never share private keys or passwords.

Is DEXBot2 financial advice?

No. It is software provided as-is, without warranty. You are responsible for your account, configuration, and trades. Use it at your own risk.