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
6 stages turn a fill into a quote change
Market making prices immediacy while controlling inventory and adverse selection. A shred feed can show proposed Solana fills and pool changes before a normal RPC update reaches the quoting engine. 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.
shredstream.sh delivers raw UDP from Frankfurt to one IP and port for $100 over 30 days. The measured feed on 2026-08-31 averaged 54.3 Mbps, 5,585 packets per second, and 1,216 bytes per packet, totaling 17.6 TB over 30 days. The receiver consumes the full stream even if it quotes 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
Solana has no public mempool. A taker transaction decoded from a shred has already been included by the current leader in a proposed block. It may be visible before conventional account notifications, but it is not pending in a public queue. The maker's cancel or hedge normally targets a later execution position.
This creates a period of provisional inventory. The observed fill may survive and change position. The slot may be skipped. The transaction may fail. A fork may replace it. A later transaction in the same proposed block may offset it. 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. Program IDs and instruction discriminators identify placement, cancellation, consumption, swap, and settlement operations. Instruction data supplies side, quantity, price limits, and route parameters where the protocol encodes them.
The leader signature authenticates proposed input. 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.
A defensible latency budget
Detection through submission totals 1.65 to 14.4 milliseconds. That total is feasible for a narrow path with preallocated receive buffers, supported program parsers, incremental inventory, prepared messages, and nearby outbound routes. It is not a general promise. Landing carries a 40 to 450 millisecond planning range 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 99.98 bid and 100.02 ask for 200 units per side. Proposed inventory is flat. A shred reveals a 150-unit buy that consumes most of the ask while an external reference moves from 100.00 to 100.08.
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
Raw UDP has no ordering, retransmission, or backpressure. A missed fill can leave a stale quote live. A duplicated fill can make the engine over-skew inventory. Deduplication and state completeness are trading controls, not network housekeeping.
Group shreds by slot and FEC set. Reorder by index. Use coding shreds for recovery. Deduplicate transaction signatures. Reconcile every proposed event against a confirmed source. When a required entry is missing, widen or withdraw affected quotes according to policy rather than assuming no trade occurred.
At 5,585 mean packets per second, batching and fixed memory are practical requirements. Monitor NIC drops, 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.
Allow inbound UDP from source IP 64.130.40.90 to the purchased port. The 600-second destination challenge checks immediate reachability. It does not test 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.
When raw shreds are not the constraint
A maker with quotes held for seconds, a slow risk service, or a distant submission path may gain little from raw input. A decoded stream can reduce protocol maintenance. Confirmed data remains the authority for accounting, collateral, and customer reporting.
Frankfurt-only delivery affects placement. One IP and port is not regional redundancy. The wire provides no ordering, retransmission, or backpressure. Teams needing multiple independent feeds or receiver regions must build those properties outside this plan.
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
- leader signature, to authenticate 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?
- The fill seen in a shred is already part of a proposed block, so a new cancellation normally targets a later execution position. The observed slot can still disappear, but there is no public pending queue that lets the maker reliably insert a cancel before the transaction already shown in the shred.
- 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.