PerpDesk logoPerpDesk

Brix

Per-user risk filter. Every trade passes through Brix before execution.

What Brix Does

Brix is the bouncer. Riven publishes one trade recommendation per consensus round. Brix evaluates that recommendation for every user on the desk — sizing it to their balance, capping their leverage, enforcing their daily-loss limit — and only passes users that qualify.

Brix does not use AI for filtering. The risk evaluator is pure logic: same inputs, same decision, every time. Fully reproducible, fully auditable.

How the Filter Works

When a Riven recommendation arrives, Brix batch-loads data for all active users in one pass, then runs each user through five steps:

  1. Pre-filter — Disqualify users with zero balance, max positions reached, or daily loss limit hit. Instant.
  2. Exchange routing — Choose the best configured exchange for the user. Fall back to paper trading if none.
  3. Personal scoring — If consensus opinions are available, re-score the direction, confidence, and levels against the user's strategy profile.
  4. Risk evaluation — Apply first-trade cap, confidence scaling, portfolio risk impact check, and exposure cap. Each step can trim the position size.
  5. Reservation accounting — Deduct pending notional from effective balance to prevent over-allocation when multiple recommendations land in the same round.

Users that survive all five steps get a per-user trade signal. Users that don't are silently rejected with a recorded reason.

Tier Defaults

Your trader level sets the default risk parameters. All are overridable.

ParameterBeginnerIntermediateAdvanced
Max leverage3x6x12x
Max position size5% of balance10%25%
Max total exposure20%40%80%
Max open positions51020
Daily loss limit10%15%25%
Default margin modeIsolatedIsolatedCross
Max portfolio risk impact5%6%10%
First-trade cap20% of balance40%No cap

Advanced users skip the sizing adjustments (first-trade cap, confidence scaling, portfolio risk impact, exposure cap). They get their full risk-profile allocation. The trading engine still enforces hard balance and exchange-minimum limits.

How Sizing Gets Built

Starting from balance × max_position_pct, Brix trims the position whenever a check constrains it:

  1. First-trade cap — if you haven't completed a trade yet, cap at first_trade_allocation_pct
  2. Confidence scaling — multiply by Riven's confidence (0.5 confidence = 50% of max size)
  3. Portfolio risk impact — if position × stop_distance exceeds your risk impact limit, scale down
  4. Exposure cap — if total open + new notional would exceed max_total_exposure, scale to fit

If the position hits zero after all checks, the user is rejected for that round.

Warnings

Brix attaches non-blocking warnings to each signal where applicable:

  • Approaching daily loss limit (≥70% used)
  • Near max open positions (one slot away)
  • All open positions in the same direction (high directional concentration)
  • Cross-margin advisory

These surface in your notification but do not block the trade.

Configuration

Risk parameters are configured through the desk UI. Per-user overrides take precedence over tier defaults.

Under the Hood

Type: deterministic agent. No LLM is used for filtering — pure logic only.

Input: listens for Riven's broadcast recommendations via the event bus.

Output: publishes one per-user trade signal for each qualifying user.

Batch loading: risk profiles, open positions, daily losses, and exchange configs are loaded in bulk per round. Strategy profiles and exchange balances are hot-cached.

Risk evaluation: a pure-logic module with no I/O dependencies. Takes the user's profile, positions, losses, and the incoming signal, and returns an assessment with quantity, leverage, checks, adjustments, and warnings.

Exchange routing: selects the best exchange per user based on their configured exchanges and cached balances.

Tier defaults: beginner, intermediate, and advanced defaults are seeded as platform-level config and overridable per user.

On this page