Kalman
Engine

Geometric grid

Grid levels are spaced geometrically between lower and upper: level i sits at lower · (upper/lower)^(i/levels), so each step is the same percentage. Capital splits evenly across levels — $16.50 per level in the backtest config, $1.00 live. At start, buy limits are posted at every level below spot. Each buy fill posts a sell one level up; each sell fill re-posts its buy. Profit per round trip is the step percentage minus two fills of cost. Three grid bots run this on SOL/USD, ETH/USD and BTC/USD, each over its own range.

Viability rule

The step must exceed the round trip cost — two fills of fee plus slippage — or the grid grinds capital into fees. The shipped ranges clear it with room: 10 levels between 55 and 110 is a 7.18% step against a 0.40% round trip, and the ETH and BTC ranges give 6.98% and 5.83%. The loader now enforces that inequality rather than trusting the config to satisfy it — a grid whose step does not clear its round trip is rejected at load, as is a degenerate range or a deepest buy larger than the bot's order cap, and a per-level notional under $1.00 warns. What it still cannot check is whether spot sits inside the range, because the loader has no price.

ParameterDefaultMeaning
lower / upper55 / 110 · 1375 / 2700 · 52500 / 92500Range bounds on SOL, ETH and BTC. Outside them the grid is inert.
levels10Number of geometric steps.
capital_usd165 (live 10)Split evenly across levels.

Known failure modes

Price leaving the range: below lower the grid is fully invested and can only wait; above upper it is fully in cash and misses the trend. A price that starts below lower seeds no buys at all and the grid never trades — the one grid failure the loader cannot catch, since checking it needs a price, so an inert bot is still a real way for this to fail quietly.