skip to content
matterprotocol.xyz
private alpha
v0.4 · primitives sdknow in invite-only alpha

snap-together
strategies.
ship in an afternoon.

matter is a library of typed trading primitives — entry, risk, rebalance, exit. compose them into an agent, deploy non-custodially, take LP capital without writing the boilerplate.

try the composer
$npm i @matter/sdk·typescript
mean-rev-eth
strategy · 4 primitives
composed
emaCross
entry
fast: 12 · slow: 26
volTarget
risk
sigma: 0.18 · lookback: 30d
timeRebal
rebalance
daily · 00:00 UTC
trailStop
exit
pct: 4.5 · activate: +2%
add a primitive
entry
types ✓ · interfaces ✓ · ready to deploy
02what is matter

a strategy is four decisions.

matter ships each one as a typed primitive. write your own, or pull from a library that's been hammered against years of on-chain and CEX data.

// the contract
type Primitive<In, Out> = (ctx, In) => Out
compose([p1, p2, p3]) → Strategy
primitive · entry
01
watch the market.
a primitive that decides when to act.
emaCross · rsiOversold · fundingFlip
primitive · risk
02
constrain the position.
a primitive that decides how much.
volTarget · drawdownCap · kelly
primitive · rebalance
03
re-weight on a schedule.
a primitive that decides when to re-balance.
timeRebal · thresholdRebal · riskParity
primitive · exit
04
close the position.
a primitive that decides when to stop.
trailStop · takeProfitLadder · timeInTrade
03how it works

three steps. nothing custodial.

step · 01
emaCross✓
rsiOversold
volTarget✓
trailStop✓

pick primitives.

browse the library, or write your own against the typed interface. types tell you what fits where.

step · 02
emaCross
volTarget
trailStop
✓ types match

compose the agent.

snap primitives in order. matter type-checks the composition, runs the dataflow, and generates the entrypoint.

step · 03
$ matter build --out agent.bin
✓ typecheck
✓ dataflow
✓ bundled → agent.bin (284 KB)

ship it.

export to a typed agent binary. paper-trade, backtest, or deploy live — all from the same composed object.

04primitive library

every primitive is a one-line import.

the first cut. opinionated, typed, tested. new primitives ship as packages — semver, audit log, the works.

  • entry
    emaCross

    fast/slow exponential moving-average crossover.

    v0.3.4↗ docs
  • entry
    rsiOversold

    enter when RSI dips below a band and reverts.

    v0.3.2↗ docs
  • entry
    fundingFlip

    funding rate flips sign on a perp venue.

    v0.3.1↗ docs
  • entry
    volBreakout

    range break confirmed by σ-multiple volume.

    v0.2.6↗ docs
  • entry
    liquiditySweep

    sweep of a stop cluster, then mean-revert.

    v0.2.4↗ docs
  • entry
    basisDivergence

    perp basis decouples from spot beyond θ.

    v0.2.1↗ docs
  • risk
    volTarget

    size positions to a target realized σ.

    v0.3.5↗ docs
  • risk
    drawdownCap

    hard pause if equity curve breaches threshold.

    v0.3.3↗ docs
  • risk
    positionLimit

    per-leg and aggregate notional caps.

    v0.3.0↗ docs
  • risk
    correlationLock

    reject trades that raise portfolio ρ above θ.

    v0.2.7↗ docs
  • risk
    kellyFraction

    fractional-kelly sizing from edge estimate.

    v0.2.2↗ docs
  • rebalance
    timeRebal

    re-weight on a fixed cadence (1h…7d).

    v0.3.4↗ docs
  • rebalance
    thresholdRebal

    re-weight when drift exceeds a band.

    v0.3.2↗ docs
  • rebalance
    inverseVolWeight

    allocate inversely proportional to σ.

    v0.2.6↗ docs
  • rebalance
    riskParity

    equalize risk contribution across legs.

    v0.2.3↗ docs
  • exit
    trailStop

    trailing stop activated past breakeven.

    v0.3.6↗ docs
  • exit
    takeProfitLadder

    scale-out across N tiers above entry.

    v0.3.1↗ docs
  • exit
    timeInTrade

    flat after a maximum hold duration.

    v0.2.8↗ docs
publish your own primitive
05composer · try it

snap a strategy together — right here.

tap or drag primitives from the palette into the stack. reorder with the arrows. the code panel updates as you compose.

composer ·
3 primitives
entry
risk
rebalance
exit
strategy stackorder matters →
01
emaCrossentry
{ fast: 12, slow: 26 }
02
volTargetrisk
{ sigma: 0.18, lookback: '30d' }
03
trailStopexit
{ pct: 4.5, activate: '+2%' }
strategy.tstypescript
import { matter } from '@matter/sdk'
export const untitled_strategy = matter.compose([
emaCross({ fast: 12, slow: 26 }),
volTarget({ sigma: 0.18, lookback: '30d' }),
trailStop({ pct: 4.5, activate: '+2%' })
])
// inferred type:
Strategy<Entry & Risk & Exit>
a sketch of the real composer. the production sdk is typescript-first and runs locally.
06for builders

read the types.
write the strategy.

matter is a typescript sdk. import primitives, compose them, export a strategy. that's it.

read the docs
mean-rev-eth.ts
import { matter, type Strategy } from '@matter/sdk'
import { emaCross } from '@matter/entries'
import { volTarget } from '@matter/risk'
import { trailStop } from '@matter/exits'
export const meanRevEth: Strategy = matter.compose([
emaCross({ fast: 12, slow: 26 }),
volTarget({ sigma: 0.18 }),
trailStop({ pct: 4.5 }),
])
// 6 lines. one strategy. typed end-to-end.
typed sdk

every primitive is a type.

inputs, outputs, side effects — declared upfront. compositions that don't fit fail at the type checker, not at runtime.

local-first

runs on your machine.

backtest, paper-trade, debug — all from the cli. no cloud account required to write your strategy.

composable

small pieces, shared interfaces.

every primitive speaks the same protocol. swap an entry for a different entry; the rest of the strategy keeps working.

audited paths

the dangerous parts are shared.

execution, custody handoff, accounting — written once, audited once. your strategy just decides what to do.

07roadmap

four quarters. honestly scoped.

dates slip in crypto; intent shouldn't. here's what's on the bench and what's queued behind it.

Q3 2026 · shipping

private alpha.

  • core sdk · 18 primitives
  • composer (cli + studio)
  • invite-only access
  • local backtester
shipping
Q4 2026 · now

solana primitives.

  • jupiter · drift · marginfi
  • cross-chain venue routing
  • on-chain execution receipts
building
Q1 2027 · next

primitive marketplace.

  • third-party publishing
  • royalty + versioning
  • attestations & audits
  • on-chain primitive registry
planned
Q2 2027 · later

public composer.

  • open access
  • browser-native studio
  • shared strategy snapshots
  • +12 primitives
planned
08faq

real questions, plainly answered.

something missing?
say hi → hello@matterprotocol.xyz
01who is matter for?
people who write trading strategies and don't want to write everything from scratch. quant devs, on-chain strategists, agent builders. if you read code more often than tweets, you're the audience.
02does matter custody funds?
no. matter is a sdk and a runtime — it composes strategies and produces a typed agent binary. custody happens wherever you choose to deploy. matter never holds keys or capital.
03how is a primitive different from a function?
a primitive is a function with a declared role (entry, risk, rebalance, exit), a typed contract, and an audit trail. it composes with other primitives at the type level. plain functions don't.
04can i write my own primitives?
yes. matter ships an interface; everything else is a package. you can keep your primitive private, share it inside your org, or publish it. publishing isn't open yet — that lands with the marketplace in q1 2027.
05what does private alpha mean in practice?
invite-only access to the sdk, a handful of live strategies, and direct line to the team. we're scoping by hand to keep feedback loops tight. request access from the top of the page.
06fees?
the sdk and runtime are free for the alpha. long-term we expect a small fee on strategies that go to production. we'll tell you the number before charging it — never a surprise invoice.
07which chains and venues?
evm and major cex perps in the alpha. solana primitives ship in q4 2026 (jupiter, drift, marginfi). venue routing is part of the same primitive interface — no special-casing in your strategy code.
08open source?
the primitive interface and the core compose runtime are open. individual primitives are a mix — some open, some source-available. we'll be specific per-package.