Skip to main content

Overview

Vela is purpose-built for high-frequency and professional market makers. Most DEXs force you to choose between capital efficiency and throughput. Vela eliminates that tradeoff. What makes Vela different:

Credit System

Vela is the first DEX to let market makers quote beyond their deposited amount. Your total quoted notional across all open orders must be ≤ your deposited balance — but you can have many orders open simultaneously as long as the aggregate stays within that cap. A 10,000depositsupports10,000 deposit supports 10,000 of live quotes spread across as many orders as you like.

HFT Nonce Scheme

Instead of a strict per-user sequence number, Vela maintains a rolling window of your 20 most recent nonces. Any new nonce greater than the minimum of that window is accepted — even if it arrives out of order. This means 20 orders can be in-flight simultaneously with no head-of-line blocking.

Sub-microsecond Matching

The matching engine runs on a custom Rust CLOB with a 1.38μs p50 match latency at 725,000 operations per second. Benchmarks use a single-threaded, in-process setup to reflect the actual latency you experience, not a theoretical maximum.

Authentication

Every order mutation requires a wallet signature. Vela uses Ethereum’s personal_sign standard (EIP-191 with \x19Ethereum Signed Message:\n prefix).

Signing Libraries

  • Python: web3.py (eth_account)
  • TypeScript: viem (signMessage) or ethers.js (wallet.signMessage)
  • Go: go-ethereum (accounts.TextHash)

Order Signature Format

All fields are plain strings. Price and quantity are the fixed-point integers you will send in the request body (see Fixed-Point Encoding).

Cancel Signature Format

Use an empty string "" for client_order_id if the order was placed without one.

Python Example

TypeScript Example (viem)


Nonce Scheme (HFT Compatible)

Vela’s nonce scheme is designed for market makers sending bursts of orders.

Rules

  1. The engine stores the 20 most recent nonces per user.
  2. A new nonce is accepted if it is greater than min(window) and not already in the window.
  3. A new nonce is rejected with InvalidNonce if it is ≤ min(window).
  4. A new nonce is rejected with DuplicateNonce if it is already in the window.
This gives you 20 “slots” of concurrency. You can dispatch 20 orders in parallel without waiting for acknowledgment on any of them.
Timestamp-based nonces (int(time.time_ns())) work well — they are always increasing and survive process restarts without risking replay. Avoid random nonces; if you generate one below the window minimum it will be rejected.

Concurrent Dispatch Pattern


Fixed-Point Encoding

All prices and quantities in the API are fixed-point integers with 6 decimal places. Multiply your display value by 1,000,000 before sending. To convert back: divide by 1_000_000.
Always use integer arithmetic after converting. Floating-point rounding errors will cause signature mismatches — the engine signs the integer you send, not the display value.

Order Management

Place a Limit Order

Request body:
Field reference: Time-in-force semantics: Successful response:
Error response:

Cancel an Order

Cancel by engine order ID:
Cancel by your own client order ID:
For the cancel signature when using client_order_id, use order_id = "":
Response:

Query Orders

Returns all open orders for the address. Optional query parameters: Look up a specific order by client order ID:

Client Order IDs

Client order IDs let you assign your own identifiers to orders at placement time. This eliminates the round-trip latency of waiting for the engine’s order_id before you can cancel.

Rules

  • Maximum 64 characters
  • Alphanumeric, hyphens (-), and underscores (_) only
  • Must be unique per user (not globally unique across all users)
  • Automatically released when the order is filled or cancelled — you can reuse the ID after that

Naming Convention for Market Makers

A useful scheme that encodes enough context to debug without a lookup:

Bulk Cancel by Prefix

The engine does not natively support prefix cancellation, but you can track your own IDs and cancel in parallel:

Credit System

The credit system is Vela’s most distinctive feature. It allows you to have more quoted notional than your deposited balance — up to a 1:1 ratio.

How It Works

Example: You deposit 10,000 USDC. You have 521ofcreditheadroomremaining.Youcanaddmoreordersaslongastherunningtotalstays521 of credit headroom remaining. You can add more orders as long as the running total stays ≤ 10,000.

Auto-Cancel on Breach

When a new order would push utilization above 100%:
  1. The engine cancels your oldest open orders one at a time until there is room.
  2. The new order is then accepted.
  3. You receive order_update messages with status: "cancelled" for each auto-cancelled order on your private feed.
This is intentional behavior, not an error. Design your strategy to handle unexpected cancellations gracefully — for example, by tracking your own open orders and reconciling on each order_update.

Monitoring Credit Utilization

Your real-time credit utilization is visible on the dashboard at vela.monolithsystematic.com/dashboard. The private WebSocket feed also emits balance_update events whenever your utilization changes.

Fees

Fees are applied to the quote asset (USDC) on each fill. Maker rebates are credited directly to your balance. Net exchange margin: 0.04% per matched pair.

Fee Calculation Example

A fill of 1 ETH at $1,580:

Fill Response with Fees

Fees in API responses are in fixed-point (÷1,000,000 for display):
maker_fee: -158000 → divide by 1,000,000 → +$0.158 rebate

Market Data Feeds

HTTP Endpoints (Public)

No authentication required.

WebSocket (Public)

Connect to wss://vela-engine.fly.dev/ws and subscribe:
Order book snapshot:
Incremental update:
A quantity of 0 means the price level was removed. Apply updates in seq order; if you miss a sequence number, re-subscribe to get a fresh snapshot.

WebSocket (Private L3 Feed)

Your order updates and fills are not visible on the public feed. To receive them, authenticate before subscribing: Step 1 — Authenticate:
The auth signature message is vela:auth:{address}:{timestamp} (timestamp is Unix seconds, must be within 30 seconds of server time).
Step 2 — Subscribe:
Private message types: Example order_update:
Example fill:

Rate Limits

On breach — HTTP 429:
Use retry_after_ms to back off for exactly the right duration rather than using a fixed sleep.
The 20 orders/minute limit aligns with the 20-slot nonce window. You can send 20 orders in a burst and they will all be accepted if nonces are valid. The rate limit resets on a rolling 60-second window.

Complete Python Market Maker

A production-quality two-sided market maker that quotes 5 levels on ETH-USDC, manages its own order state, and handles auto-cancellations from the credit system.
In production, replace the cancel_all + place_order cycle with a reconcile loop driven by the private WebSocket feed. Track order_update events in a local state dict keyed by client_order_id, and only cancel orders that have drifted more than a tick from the new mid. This reduces round-trips and avoids transient gaps in your quotes.

Error Codes


FAQ

Can I use the same nonce twice? No. Nonces prevent replay attacks. Use a monotonically increasing counter — timestamp-based (int(time.time() * 1000)) survives restarts without risk of reuse. What happens when I hit the credit limit? The engine auto-cancels your oldest open orders until there is room for the new order, then processes the new order. You receive order_update cancellation events on your private feed. Design your strategy to handle unexpected cancellations — they are not errors, just credit management. Can I quote multiple markets simultaneously? Yes. The credit limit is computed across all markets combined. Your total quoted notional across all open orders on all markets must stay ≤ your deposited balance. Is my order flow visible to other market makers? No. The public trade feed shows fills (price, quantity, timestamp) but does not attribute them to specific orders or wallets beyond the matched price level. Your order placement, cancellations, and open order state are only visible on the authenticated private feed. How do I exit if Vela goes offline? Vela uses a 7-day forced exit mechanism. Call initiateEmergencyExit() on the VelaSettlement contract. After the 7-day delay, call executeEmergencyExit() to withdraw all your funds directly from the contract without any operator involvement. What is the minimum deposit to market make? There is no enforced minimum. Practically, a deposit of at least $1,000 USDC gives you enough headroom to quote meaningful size across multiple levels without hitting the credit limit on every cycle. Do I need to run a keeper or rebalancer? Not unless your strategy accumulates significant directional exposure. Because maker rebates are credited in USDC, a long-running two-sided strategy should stay relatively balanced. If you are making on a highly directional market, you may want to periodically net your inventory by placing taker orders or withdrawing and redepositing. How do I get lower fees or higher credit limits? Contact the Vela team at team@monolithsystematic.com to discuss institutional tiers. Volume-based rebate schedules and higher credit limits are available for qualifying market makers.