Reference / Trade execution

The wrapper every strategy sits behind

Every strategy is wrapped as the start builds it, and the wrapper makes a lock no other strategy's shares.

Contents

It refuses anything that is not a strategy, and the name it answers to is the wrapped strategy's own, so the wrapper adds a lock and nothing else.

What the lock holds out

Each of the eight ways in takes that lock and holds it across the call into the strategy, so a strategy reached through its wrapper is asked one thing at a time.

What it does not hold out

The lock belongs to the wrapper, and there is a wrapper for each name, so the lock one strategy is held under is not the lock another is held under.

Source evidence
---
row: N10-01
baseline: 49aa659
created: 2026-11-07 04:30 UTC
modified: 2026-11-08 14:58 UTC
evidence:
  - claim: "Each strategy is wrapped as the start builds it, and the wrapper makes a lock of its own"
    source: "`nexus/startup/sequencer.py` 511-512, the wrapper making that lock at `nexus/strategy/executor.py` 33"
  - claim: "The wrapper refuses anything that is not a strategy"
    source: "`nexus/strategy/executor.py` 28-30"
  - claim: "The name it answers to is the wrapped strategy's own"
    source: "`nexus/strategy/executor.py` 39"
  - claim: "Every one of the eight ways in takes that lock and holds it across the call into the strategy"
    source: "`nexus/strategy/executor.py` 56-57, 76-77, 96-97, 116-117, 134-135, 144-145, 154-155 and 164-165"
  - claim: "The thing that routes to a strategy holds one wrapper per name"
    source: "`nexus/strategy/runner.py` 52, filled per name at 50"
---

Edit this sourceCheckout revision · 7381aa49
Reference / keep your place
Find a passage