# Cross-Exchange Execution: Microstructure Challenges

{% hint style="info" %}
Operator and jurisdiction: BASIS is operated by BASIS DIGITAL INFRASTRUCTURE LTD, a Seychelles IBC (LEI: [254900IX2F2KCWNSSS64](https://lei.bloomberg.com/leis/view/254900IX2F2KCWNSSS64)).

Research Partner: Base58 Labs contributes execution research, systems modeling, and risk design.
{% endhint %}

{% hint style="warning" %}
Display convention: dashboard values may be shown in USDT as an internal accounting unit. USDT is not a depositable or withdrawable asset on BASIS.

Funding is available in native assets only: BTC, ETH, SOL, and PAXG.
{% endhint %}

Spotting a cross-venue price gap is easy. Capturing it in the live order book is the challenge. This page describes the microstructure failure modes behind structural alpha capture and how BHLE manages them through deterministic execution, math constraints, and state machine risk controls.

***

## ⚠️ The leg risk problem

Cross-venue execution requires two fills close in time:

* Leg 1: buy on the lower-priced venue
* Leg 2: sell on the higher-priced venue

Leg risk appears when one leg fills and the other leg fails or fills materially worse. If only Leg 1 fills, the system temporarily holds directional exposure. That breaks the intended market-neutral profile.

```
Ideal fill: BUY Venue A ($30,000) + SELL Venue B ($30,050) -> profit $50
Degraded fill: BUY Venue A ($30,000) + SELL Venue B ($30,005) -> profit $5
Failed hedge: BUY Venue A ($30,000) + SELL Venue B FAILS -> unhedged long exposure
```

{% hint style="danger" %}
The visible spread is not the realizable spread. Realized outcome depends on queue position, depth quality, cancellation intensity, and round-trip latency.
{% endhint %}

***

## 📉 Why visible spread disappears

| Factor                   | What happens in live books                                | Execution consequence                                         |
| ------------------------ | --------------------------------------------------------- | ------------------------------------------------------------- |
| Market impact (Kyle's λ) | Larger orders move the book against the executor          | Per-unit edge decays as order size approaches available depth |
| Quote flickering         | Market makers cancel and repost quotes in milliseconds    | Visible liquidity can disappear before both legs complete     |
| Latency asymmetry        | Slower participants lose queue priority to faster routers | Spread capture can compress from profitable to flat           |
| Partial fills            | Only a fraction of the intended size executes             | Residual exposure remains unhedged                            |
| Venue instability        | API delay, stale acknowledgements, or timeout bursts      | Fill certainty falls even when quoted spread looks attractive |

Kyle (1985) models price impact as proportional to order flow imbalance. Cont, Kukanov, and Stoikov (2014) show that limit order book impact is nonlinear and path-dependent. In practice, this means structural alpha capture is constrained by order book state, not by the displayed mid-price alone.

***

## ⚙️ BHLE execution model

BHLE reduces leg risk through synchronized cross-venue submission with deterministic state transitions.

{% stepper %}
{% step %}
Signal validation

The opportunity must exceed a pre-trade threshold after estimated impact, venue fees, and a slippage guard are applied.
{% endstep %}

{% step %}
Constraint check

BHLE checks whether both venues can support the required quantity inside the configured slippage bound of 0.30%.
{% endstep %}

{% step %}
Simultaneous submission

Both legs are submitted at the same time through proprietary routing infrastructure with synchronized order identifiers.
{% endstep %}

{% step %}
Fill reconciliation

The engine reconciles acknowledgements and fills within a tightly bounded latency window.
{% endstep %}

{% step %}
Abort or offset

If the hedge leg fails, BHLE cancels or offsets the filled leg immediately. The system accepts a small bounded loss rather than hold open directional exposure.
{% endstep %}
{% endstepper %}

```
Signal detected (gap = $50, T = 0)
├── T+0μs Pre-calculate both legs and validate against 0.30% slippage bound
├── T+10μs Submit orders to Venue A and Venue B simultaneously
├── T+40μs Receive fill confirmation from both venues
│ -> Trade complete
└── Fallback
  -> If one venue does not confirm inside tolerance, cancel or offset
  -> Preserve neutrality and keep loss bounded
```

### Control principles

| Control                     | Purpose                                                               |
| --------------------------- | --------------------------------------------------------------------- |
| Sub-50μs latency budget     | Keeps routing inside the effective lifetime of short-lived price gaps |
| 100K+ OPS throughput        | Maintains stable handling of burst traffic during volatility          |
| Deterministic state machine | Prevents discretionary drift during live execution                    |
| Slippage bound of 0.30%     | Rejects trades when the fill cannot remain inside defined tolerance   |
| Pre-trade depth validation  | Avoids routing size into insufficient liquidity                       |
| Circuit-breaker logic       | Temporarily disables unstable venues after repeated failures          |

{% hint style="info" %}
BHLE is designed to preserve execution precision first. If the hedge cannot be completed within constraints, the trade is rejected or neutralized.
{% endhint %}

***

## 🧪 Worked example

Scenario: BTC spread of $45 between Venue A and Venue B.

{% tabs %}
{% tab title="Slow executor" %}

| Time    | Event                                                                                               |
| ------- | --------------------------------------------------------------------------------------------------- |
| T=0ms   | Gap detected: Venue A $30,000, Venue B $30,045                                                      |
| T=500ms | Orders submitted after internal processing delay                                                    |
| T=501ms | Venue A fills at $30,002                                                                            |
| T=502ms | Venue B has moved to $30,018 as other fast participants close the gap                               |
| Result  | Gross spread captured: $16. Assumed execution and network costs: $15. Net result: approximately $1. |

This outcome is operationally flat even though the original quote looked attractive.
{% endtab %}

{% tab title="BHLE path" %}

| Time   | Event                                                                                                |
| ------ | ---------------------------------------------------------------------------------------------------- |
| T=0μs  | Gap detected: Venue A $30,000, Venue B $30,045                                                       |
| T=12μs | Both orders submitted simultaneously                                                                 |
| T=47μs | Both legs confirmed                                                                                  |
| Result | Gross spread captured: $45. Assumed execution and network costs: $15. Net result: approximately $30. |

The difference is execution precision, not signal quality.
{% endtab %}
{% endtabs %}

***

## 🌪️ Routing under stress

When volatility rises, BHLE shifts from opportunity maximization to constraint enforcement.

| Stress condition        | BHLE response                                                                    |
| ----------------------- | -------------------------------------------------------------------------------- |
| Thin order books        | Reduce size to remain inside validated depth                                     |
| Quote flickering burst  | Require stronger pre-trade fill probability before routing                       |
| Venue API degradation   | Trigger circuit breaker after repeated failures and temporarily remove the venue |
| Correlated venue stress | Pause new structural alpha capture and preserve capital                          |
| Partial fill sequence   | Offset residual exposure immediately through the state machine                   |

### What this means operationally

* Do not chase spread that sits outside validated depth
* Do not rely on top-of-book alone
* Do not hold a one-sided fill if the hedge leg is impaired
* Do not continue routing to a venue that has entered a degraded state

***

## 🔒 Why this matters for BASIS

BASIS execution infrastructure is built around deterministic routing, bounded loss logic, and strict neutrality enforcement. The objective is not just to detect price differences. It is to realize structural alpha under real exchange constraints.

This design philosophy supports:

* deterministic execution over discretionary handling
* math-constrained order admission
* state machine risk controls
* bounded response to venue instability
* consistent execution precision across market regimes

***

## 📚 References

* Kyle, A. S. (1985). "Continuous Auctions and Insider Trading." Econometrica, 53(6), 1315-1335.
* Cont, R., Kukanov, A., and Stoikov, S. (2014). "The Price Impact of Order Book Events." Journal of Financial Econometrics, 12(1), 47-88.
* Alexander, A. (2025). "Latency Arbitrage in Cryptocurrency Markets." SSRN 5143158.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.basis.pro/research-library-deep-dives/cross-exchange-execution.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
