Under the hood

The tech

Motion is one program on Solana. It holds the margin, runs the curve and pays the winners. The program needs no server of ours.

On Solana mainnetProgram address: D4h92sYjETPZZDWMrxwQKvPDAUxubKmiRqqioW6q487J, since 24 November 2026. Its markets are paused for opens. Every address: the trust page.

The pieces

PieceWhere it runsWhat it does
The programSolanaevery rule about money: opening, closing, the band and its rule, funding, liquidation, the cushion, the sweep
Your walletyour devicesigns your transactions; nobody else can move your margin
The sitemotion.tradingbuilds transactions for your wallet and draws the markets; it trades through our servers
The rescue pageone file in your browsercloses a position, adds margin or collects what is waiting for you, through an RPC you choose, with nothing from our servers
The indexerour serverreads the chain and serves charts, history and the API
The keeperour server, or anyone'ssends liquidations, band rule closes and sweeps, and brings each market up to date after a change of settings; every one of these is open to anyone. A second machine watches our keeper and messages the team when it stops
The buy and burnour servera script that holds the buy and burn wallet's key; once an hour it buys $motion with what that wallet holds, up to a cap, and burns it

If our site and servers went offline, positions would still be on chain, and closing, adding margin, liquidating and band rule closes would still work for anyone who sends the transaction to the program. The website, which trades through our servers, is the client Motion gives traders. For when it is down there is the rescue page: it closes a position, adds margin or collects what a band rule close set aside, through an RPC address you type in and your own wallet, and asks nothing of our servers once it is open. It is one file, so save a copy and you can open it from your own computer.

What is not there

Accounts

AccountOne for eachHolds
Configprogramthe admin, the pause guardian, the fund's address, and every setting with its limits
Marketaccount being tradedthe curve, the two edges of its band, depth, the 10 minute average price, both funding indexes and the funding numbers it was last charged at, units and size open on each side, the cushion, what is set aside for owners
Market vaultmarketSOL only: traders' margin, the cushion, and what a band rule close set aside for an owner. Owned by the program.
Positionwallet in a marketside, units, size at entry, margin, the liquidation line it opened with, and what is waiting for its owner

A market is tied to the account's numeric id on its platform, never to its handle, because handles change.

Instructions

InstructionWho can send it
open_position, close_positionthe trader
add_margin, remove_marginthe trader
close_position_account, returns the rent once a position is flatthe trader
liquidateanyone
band_close, the band rule's closeanyone; the program checks the position is worn under what it must hold at all times
claim_owed, pays an owner what is waiting for themanyone; the SOL goes only to the position's owner
touch_market, brings a market's average price and funding up to nowanyone
grow_depthanyone; switched off in this version, it always answers that the rule is not met
sweep, cushion above its cap to the fundanyone
fund_backstop, add SOL to a market's cushionanyone
pause_all, pause_market, pause new opensthe guardian or the admin; only the admin resumes
init_market, update_config, retire_marketthe admin

The math

The rules that keep a market whole

How the rules were tested

Every money rule was written first as a reference model. The engine inside the program is a port of that model, and the two are compared number by number.

Scripted attacks and random markets run against the model's rules2,457 checks, 0 failed
Operations replayed through the engine, every number equal to the model's48,006
Random stress runs of the engine4,800
Checks of the program on a local validator, against the model after every transaction3,505, 0 failed

The attacks try what the rules are there to stop: pushing the price to the far edge of the band and holding it there for up to a day, pushing the price to take more than a position's margin, liquidating a whole side inside one transaction, wearing a margin down with funding and then moving the price across the band, closing a worn position at a price the sender picked, trading with yourself for a gain, and changing settings to liquidate open positions or to charge funding for time that has passed. The tests hold these after every single operation:

  1. A vault always holds at least its cushion.
  2. The curve's product never falls below its set value.
  3. The curve stays inside its band whoever leaves, and the band's two prices never move outward.
  4. A position that holds what it must hold at all times is not under its line at the market price, on any settings the program allows.
  5. With funding switched off, no position is liquidated at all. With a keeper sending band rule closes inside the hour at the launch settings, nothing was lost past a margin in 1,000 runs.
  6. With every position closed, what is left in a vault beyond the cushion is a few lamports of rounding and never negative.
  7. Wallets, vaults and the fund together neither gain nor lose a lamport.

The rules of 23 November 2026 came out of an independent review by a research team working with AI agents, with no part in the build. See before a market opens.

The coin side

$motion is a Token 2022 coin. The buy and burn reads the coin's token program at run time instead of assuming one. The program's fund pays out SOL only; it never holds the coin. See $motion.