Skip to content
All use cases
Solutions

Solana shred feeds for market makers

A latency budget for turning proposed Solana fills into inventory-aware quote changes without confusing early observation with execution certainty.

Where the milliseconds go

StageBudgetNotes
Detection0.2 to 0.9 msRoute fills and pool mutations that touch the maker's markets or inventory accounts.
Decode0.4 to 2.0 msReconstruct the relevant entry and extract side, size, price inputs, and account changes.
Decision0.2 to 1.2 msReprice prepared quotes from inventory, volatility, adverse-selection, and stale-state rules.
Signing0.05 to 0.30 msSign a cancel, replace, or hedge message with a local key.
Submission0.8 to 10 msSend over warm connections to the relevant leader or venue path.
Land40 to 450 msWait for quote change or hedge execution while old exposure may remain live.

6 stages turn a fill into a quote change

Market making prices immediacy while controlling inventory and adverse selection. Proposed Solana fills and pool changes can reach the quoting engine through shreds ahead of normal RPC updates. The remaining problem is harder: decide what changed, remove or reprice exposed orders, and land the response before another informed trade uses the old quote.

A maker can route the complete Frankfurt packet stream into a colocated box at the desk's registered socket. A $100 term covers 30 days and undercuts all published standalone raw-delivery prices, even when the desk quotes only one market.

Input latency is one part of a maker's loss function. Quote placement, cancel semantics, account contention, venue design, inventory hedge routes, and the next leader determine whether an early signal becomes lower adverse selection.

The fill is proposed, not settled

Market makers do not receive a public Solana pending queue. A taker transaction appears in shred data after the current leader includes it in a candidate block. This may precede conventional account notifications, yet the maker's cancel or hedge seeks a subsequent position.

This creates provisional inventory. The observed fill may survive and change position. Skipped-slot, failed-transaction, and losing-fork outcomes remain possible, as does an offsetting instruction later in the candidate block. The quote engine needs a fork-aware inventory view rather than one mutable balance labeled current.

Maintain at least confirmed inventory, proposed inventory by fork, and reserved inventory for sent but unconfirmed responses. Quoting from confirmed inventory alone is stale. Treating every proposed fill as settled can overreact. A bounded risk policy chooses how much weight each state receives.

Fields support inventory attribution

Slot, shred index, entry index, and transaction order preserve the sequence. That sequence matters when one transaction fills a quote and another cancels or settles it. The FEC set index bounds reassembly and recovery. Completion flags let the decoder release entry ranges without waiting for slot completion.

Transaction account keys are the first business filter. They identify supported market programs, pool accounts, open-orders accounts, maker authorities, vaults, and inventory accounts. Each program identifier plus its instruction discriminator distinguishes placement, cancellation, consumption, swap, and settlement operations. Instruction data supplies side, quantity, price limits, and encoded route parameters.

Authenticate proposed input with its leader signature. Transaction signatures deduplicate the same event across packet paths and join the observation to confirmed results. Token balance effects may require executing the supported instruction model rather than reading one instruction field. Unknown program versions should not change quotes.

Protect inventory within a measured budget

StageTargetWhat the number assumes
Detection0.2 to 0.9 msFixed account maps route only relevant transactions to each market.
Decode0.4 to 2.0 msNeeded fragments are available or recovered in a bounded wait.
Decision0.2 to 1.2 msQuote curves, inventory bands, and hedge prices are already in memory.
Signing0.05 to 0.30 msA local signer handles a prepared cancel, replace, or hedge message.
Submission0.8 to 10 msVenue connections and leader routes are warm.
Land40 to 450 msThe response gains an execution position while the old quote remains at risk.

The maker's local route uses 1.65 to 14.4 milliseconds from fill detection until send. That is feasible for a narrow path with preallocated receive buffers, supported parsers, incremental inventory, prepared messages, and nearby outbound routes. Planned landing spans 40 through 450 milliseconds and can run longer during skipped slots or degraded submission paths.

Detection is account routing, not full trade interpretation. The receiver can hash account keys into venue and maker subscriptions, then send candidate references to the right state shard. This avoids running every parser on every transaction.

Decode time must distinguish clean and recovered input. One transaction can cross shred boundaries. A missing data shred can hold the fill while later data arrives. Coding shreds can recover missing material when enough symbols are present. The deadline should be stated in microseconds or milliseconds, after which the quote engine marks that fork incomplete.

Decision remains short because the maker prepares quote curves before the event. A fill changes inventory, reference price, or toxicity estimates. The engine updates only affected levels. A remote database query, full portfolio recomputation, or synchronous risk-service call cannot fit this range.

Signing assumes local custody. A hardware or remote signer adds a deliberate security cost. Use the measured tail for the chosen design. Submission assumes established sessions and a current target map. Connection setup during a fill is avoidable delay.

Work an adverse-selection example

Assume a maker quotes a pool-linked market at 100.98 bid and 101.02 ask for 200 units per side. Proposed inventory is flat. A shred reveals a 150-unit buy consuming most of the ask while an external reference moves from 101.00 to 101.09.

The proposed fill leaves the maker short 150 units if it survives. A static spread would continue offering at 100.02 below the new external reference. The decision engine applies three changes: shift fair value to 100.08, add a 3 basis point adverse-selection reserve, and skew prices to attract buys less and sells more until inventory returns toward zero.

The next ask might become 100.13 and the bid 100.04 under the desk's curve. Those values are illustrative outputs of the stated inputs, not universal settings. A cancel or replace message is already templated. The maker signs and sends it.

The old ask can still be executed before the replacement lands. The observed buy can disappear on a fork. The external reference can reverse. The expected improvement is therefore measured over many events: loss avoided on stale quotes minus unnecessary cancels, missed spread, fees, and hedge cost.

Cancel latency is exposure time

A cancellation is a transaction, not an immediate local action. Sending it does not erase an order. Until it lands, the old order may remain executable under venue rules. The quote engine should model open exposure through the expected landing distribution rather than marking an order canceled at send time.

Replace behavior varies by program. Some designs update on-chain order state. Others quote through transactions against pools or market-maker programs. Account locks, compute limits, and transaction validity differ. The latency table is a pipeline frame, and each venue needs measured numbers.

Priority fees can influence scheduling but cannot guarantee inclusion. An aggressive fee on every small adjustment may consume the spread. A maker should set fee policy from expected adverse-selection cost and opportunity lifetime, then compare predicted value with actual landing outcomes.

Hedging has a separate clock

A maker may hedge on another Solana venue or an external exchange. An on-chain hedge faces the same leader and account constraints. An external hedge can execute sooner but creates basis, transfer, custody, and partial-fill risk. The incoming shred timestamp should remain distinct from the hedge venue acknowledgement and fill timestamp.

Suppose the expected stale-quote loss is 8 basis points on 150 units, while an immediate external hedge costs 4 basis points and has a 90 percent fill probability. The choice depends on residual inventory in the other 10 percent, not the 4 basis point headline alone. Raw input improves the start time of that calculation. It does not settle the hedge.

Inventory across venues should use explicit confidence levels. Confirmed on-chain, proposed on-chain, sent hedge, acknowledged hedge, and filled hedge are different states. Collapsing them can create duplicate hedges when a fork or delayed acknowledgement appears.

UDP loss can create a toxic quote

The maker's raw UDP lane provides no sequence guarantee, gap retransmission, or backpressure. A missed fill can leave stale quotes live, while a duplicated fill can make the engine over-skew inventory. Deduplication and completeness are trading controls, not network housekeeping.

Partition quote inputs with slot and FEC-set identities. Restore index order, recover through coding shreds, and deduplicate transaction signatures. Reconcile every proposed event as commitment advances. When a required entry is missing, widen or withdraw affected quotes under policy instead of assuming no trade occurred.

During busy packet bursts, batching and fixed memory become practical requirements. Monitor driver loss, kernel receive errors, application queue drops, missing shred indexes, recovery delay, decoder delay, quote decision delay, and order age. Bound every queue. A growing queue turns a fast feed into stale state.

The maker's firewall names 203.23.178.228, scoped to its purchased UDP socket. Verification has a 600-second window and checks immediate reachability, not sustained throughput, burst loss, decoder correctness, or venue cancellation.

Measure the full maker outcome

Record the first shred timestamp, entry-ready timestamp, fill-decoded timestamp, inventory-update timestamp, sign interval, send interval, venue acknowledgement, landed slot, and confirmed result. Join those to quote age and markout at 50, 100, 250, and 1,000 milliseconds.

The useful question is whether earlier detection improves markout after fees. A lower decoder median with an unchanged p99 cancel time may not help. A system that cancels more often can lower adverse selection while losing spread capture. Both sides belong in the experiment.

Replay testing should include duplicates, packet gaps, late coding shreds, fork replacement, unsupported instructions, external price jumps, and signer delay. Shadow quote decisions before they reach production keys. Compare the shadow action with what the canonical block later showed.

Carry the latency edge through quoting

Millisecond quote lifetimes, risk decisions, and submission paths extract the strongest maker edge from raw shreds. Keep risk state local and quote updates prepared so decoding remains a small, bounded stage. Use canonical state for accounting, collateral, and customer reporting.

Frankfurt-origin delivery terminates at the maker's configured address and port. Raw UDP does not restore packet order, resend gaps, or slow under receiver pressure, and no regional redundancy is included. Locate the receiver and define quote withdrawal, recovery, and completeness around those properties.

Acceptance is a markout experiment

Run the shred-driven quote engine in shadow beside the current source. For each proposed fill, record both decisions and the first execution slot available to each. Calculate simulated quote age, cancel arrival, hedge price, and markout under the same inventory rules. Do not compare one path's real fills with the other path's theoretical midpoints.

Inject a fork loss after a large apparent fill. The proposed inventory branch should retract without corrupting confirmed inventory or creating a second hedge. Inject a missing entry before the fill and verify that the affected market widens or withdraws according to policy.

Production acceptance should report stale-quote fills, unnecessary cancels, spread captured, hedge cost, failed fees, inventory variance, and p99 exposure time. Segment by venue and leader. A lower detection median is useful only when these economic outcomes improve after costs.

Market-making edge is the measured reduction in adverse selection after the whole response path. Shreds can move observation forward. Prepared decisions can keep local work under 15 milliseconds. Landing still determines how long the old quote remains exposed.

What this desk reads

  • slot, shred index, and entry order, to maintain the proposed sequence of fills and book changes
  • FEC set index and completion flags, to release usable entries without waiting for the complete slot
  • producer-authentication result, to validate proposed changes before inventory moves
  • transaction account keys, to select the maker's venues, open orders, vaults, and inventory accounts
  • program ID and instruction data, to derive fill side, amount, limit, cancel, and settlement effects
  • transaction signature, to deduplicate updates and reconcile them against canonical execution
  • slot completion state, to retire provisional branches and measure fork exposure

Questions

Can a market maker cancel before an observed fill lands?
A fill becomes visible in shred data after entering a candidate block, so a new cancellation normally seeks a later position. The observed slot can still disappear, but no public pending queue lets the maker reliably insert a cancel before the transaction already shown.
Which latency metric matters most for stale quotes?
Quote exposure lasts from the state-changing observation until the cancel or replacement actually executes. Detection and local decision time matter, but landing usually has the wider distribution. Measure markout against landed quote changes, not send acknowledgements, and include unnecessary cancels caused by forks or incomplete state.
How should packet loss affect quoting?
Missing data should lower confidence for the affected market or fork. The maker can attempt FEC recovery, then widen or withdraw quotes when required entries remain incomplete. It should not treat absence of a decoded fill as proof that no fill occurred. Confirmed data later repairs the inventory record.