Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
aac227e
refactor(book-feeds)!: name the off-chain book venues `book:{venue}`
die-herdplatte Oct 6, 2026
eeb9d81
refactor(book-feeds)!: port the five venues onto the snapshot feed layer
die-herdplatte Oct 6, 2026
9504d47
refactor(book-feeds): leave the five venues under `rfq:{venue}`
die-herdplatte Oct 8, 2026
7c8bde2
Merge branch 'main' into hp/refactor/book-feeds-port
die-herdplatte Oct 8, 2026
3cfcb06
style(book-feeds): report the venue clients' deadlines as durations
die-herdplatte Oct 8, 2026
ec65d48
refactor(book-feeds): read the book feeds through the book-typed names
die-herdplatte Oct 8, 2026
d5c3a82
docs(book-feeds): name the venues' prefix `rfq:` where it is described
die-herdplatte Oct 8, 2026
c6565c4
docs(book-feeds): say which feed defaults a venue starts from
die-herdplatte Oct 8, 2026
b68b92e
fix(book-feeds): drop the entry a venue got wrong, not the response
die-herdplatte Oct 9, 2026
300a9dc
fix(book-feeds): let each venue say which chains it prices
die-herdplatte Oct 9, 2026
e3dee33
refactor(book-feeds): give each client its own endpoints
die-herdplatte Oct 9, 2026
a3f684f
test(book-feeds): authenticate the Metric state's live request
die-herdplatte Oct 9, 2026
5326f36
fix(book-feeds): give each Hashflow market maker its own book
die-herdplatte Oct 9, 2026
ad61fec
fix(book-feeds): let a declined quote leave the component quotable
die-herdplatte Oct 9, 2026
95d8c9b
fix(book-feeds): classify the quote failures the venues actually send
die-herdplatte Oct 9, 2026
9d62a4d
fix(book-feeds): read Hashflow's below-minimum refusal as a decline
die-herdplatte Oct 9, 2026
93387c9
fix(book-feeds): hold a Bebop trade to the dollar the venue quotes above
die-herdplatte Oct 9, 2026
042b019
refactor(book-feeds): build a book from the state that prices it
die-herdplatte Oct 9, 2026
dee2be8
refactor(book-feeds): take out three single-use indirections
die-herdplatte Oct 9, 2026
a698cd1
fix(book-feeds): one answer per reason a swap cannot be served
die-herdplatte Oct 9, 2026
3165ee1
test(book-feeds): keep every venue's credentials out of its recordings
die-herdplatte Oct 9, 2026
1e9518d
test(book-feeds): stop asserting what the test just built
die-herdplatte Oct 9, 2026
243b4ec
docs(book-feeds): describe the code that is there
die-herdplatte Oct 9, 2026
235e7b0
Merge branch 'main' into hp/refactor/book-feeds-port
die-herdplatte Oct 9, 2026
5707260
fix(book-feeds): name the maker in Liquorice's quote request
die-herdplatte Oct 9, 2026
863c89e
feat(book-feeds): one component for a venue's pairs, with quote reuse…
die-herdplatte Oct 9, 2026
c6e2270
feat(integration-test): simulate the directions a component advertises
die-herdplatte Oct 9, 2026
50c393f
docs(book-feeds): the venue-wide component layout
die-herdplatte Oct 9, 2026
eee6d4f
fix(book-feeds): choose a venue's limits and floor as #1501 does
die-herdplatte Oct 12, 2026
1092996
feat(book-feeds): hold a maker venue's route to a quote rule
die-herdplatte Oct 12, 2026
575a5b2
Merge remote-tracking branch 'origin/main' into hp/refactor/book-feed…
die-herdplatte Oct 12, 2026
a5bffbe
fix(book-feeds): name a Hashflow minimum the book can fill
die-herdplatte Oct 12, 2026
b281832
chore(integration-test): name the feed flags after their venue family
die-herdplatte Oct 15, 2026
1bf592c
fix(book-feeds): answer an empty Bebop side with no liquidity
die-herdplatte Oct 15, 2026
41802db
fix(book-feeds): report a mismatched Native quote as fatal
die-herdplatte Oct 15, 2026
638cfa9
fix(pamm): fail a Metric poll that loses every pool
die-herdplatte Oct 15, 2026
5f2d23a
fix(book-feeds): take a venue's directions from the books that price …
die-herdplatte Oct 15, 2026
f86ef58
fix(book-feeds): give each Liquorice maker its own book
die-herdplatte Oct 15, 2026
e67b682
refactor(book-feeds): keep the quoting client out of a serialized state
die-herdplatte Oct 15, 2026
cf459dc
refactor(book-feeds): derive a venue's endpoints from one base URL
die-herdplatte Oct 15, 2026
5450f21
docs(book-feeds): say how many components a venue publishes
die-herdplatte Oct 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ tycho-execution = { path = "crates/tycho-execution", version = "0.
# --- Serialization/Deserialization ---
serde = { version = "1.0.204", features = ["rc", "derive"] }
serde_json = "1.0.120"
serde_with = "3.16.1"
toml = "0.8"
typetag = "0.2.21"
uuid = { version = "1.4.1", features = ["serde", "macro-diagnostics"] }
Expand All @@ -57,7 +58,7 @@ futures = "0.3.31"
futures03 = { package = "futures", version = "0.3.31", features = ["compat"] }
async-trait = "0.1.88"
async-stream = "0.3.6"
# Pinned at 0.20 for tycho-client; simulation's rfq feature uses 0.28 directly (separate semver)
# Pinned at 0.20 for tycho-client; simulation's book-feeds feature uses 0.28 directly (separate semver)
tokio-tungstenite = { version = "0.20.0", features = ["native-tls"] }
tokio-stream = { version = "0.1", features = ["sync"] }

Expand Down
2 changes: 1 addition & 1 deletion crates/tycho-ethereum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ unicode-segmentation.workspace = true
futures = "0.3"
backoff = { version = "0.4.0", features = ["tokio"], default-features = false }
num-bigint = { version = "0.4", features = ["serde"] }
serde_with = "3.16.1"
serde_with = { workspace = true }

# Required dependencies
alloy = { workspace = true, default-features = false, features = [
Expand Down
3 changes: 2 additions & 1 deletion crates/tycho-execution/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,8 @@ flags) into packed bytes. Each encoder holds its executor address.

**SwapEncoderRegistry** (`swap_encoder_registry.rs`): Creates encoders by protocol system name. Reads executor addresses
from `config/executor_addresses.json`. Protocol name prefixes: `vm:` (simulation-backed,
e.g. `vm:balancer_v2`, `vm:curve`), `rfq:` (request-for-quote, e.g. `rfq:bebop`), bare (on-chain,
e.g. `vm:balancer_v2`, `vm:curve`), `rfq:` (off-chain book feeds — the RFQ venues and Metric,
e.g. `rfq:bebop`, `rfq:metric`), bare (on-chain,
e.g. `uniswap_v2`, `fluid_v1`), and `pricelevelstream:` (Titan pAMM price level stream, suffixed
with the protocol name or, for auto-detected pAMMs, the protocol address). Price-level-stream protocols
resolve generically: a single `pricelevelstream` config entry serves the whole family via a
Expand Down
6 changes: 3 additions & 3 deletions crates/tycho-integration-test/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cargo run -p tycho-integration-test -- \
--tvl-threshold 100
```

Key optional flags: `--no-tls`, `--disable-onchain`, `--disable-rfq`,
Key optional flags: `--no-tls`, `--disable-onchain`, `--disable-rfq`, `--disable-pamm`,
`--disable-price-level-stream`, `--disable-execution`, `--protocols uniswap_v2,curve`,
`--max-blocks 100`, `--parallel-simulations 5`, `--always-test-components <id,...>`,
`--price-level-stream-block-interval 1`, `--price-level-stream-stale-threshold-secs 10`,
Expand All @@ -51,8 +51,8 @@ shows up as a failure.
- **`stream_processor/`**:
- `protocol_stream_processor.rs`: Handles on-chain protocol updates — applies deltas to
`ProtocolSim` instances, runs `get_amount_out` simulations, validates via RPC execution
- `rfq_stream_processor.rs`: Handles RFQ protocol updates — fetches live quotes, compares
against simulation
- `book_stream_processor.rs`: Handles the off-chain book feeds (the RFQ venues and Metric) —
fetches live quotes, compares against simulation
- `price_level_stream_processor.rs`: Handles Titan pAMM price level stream updates (Ethereum
only) — emits one sampled update per `--price-level-stream-block-interval` blocks, holding a
chosen block's latest snapshot back until the stream moves to the next block (least drift to
Expand Down
1 change: 1 addition & 0 deletions crates/tycho-integration-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ num-bigint = { workspace = true }
num-traits = { workspace = true }
rand = "0.9.2"
tokio = { workspace = true, features = ["signal"] }
chrono = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
tycho-client = { workspace = true }
Expand Down
6 changes: 4 additions & 2 deletions crates/tycho-integration-test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ This test runs continuously in the cluster but it can also be run locally for de
| `--tvl-threshold` | `100.0` | TVL threshold in native tokens for filtering |
| `--metrics-port` | `9898` | Port for Prometheus metrics server |
| `--disable-onchain` | `false` | Skip on-chain protocol testing |
| `--disable-rfq` | `false` | Skip RFQ protocol testing |
| `--disable-rfq` | `false` | Skip the RFQ book feeds (Bebop, Hashflow, Liquorice, Native) |
| `--disable-pamm` | `false` | Skip the pAMM book feeds (Metric) |
| `--disable-price-level-stream` | `false` | Skip Titan pAMM price level stream testing (only active on Ethereum) |
| `--price-level-stream-block-interval` | `1` | Emit one sampled price level update per this many blocks |
| `--price-level-stream-stale-threshold-secs` | `10` | Seconds without a Titan message before marking served pAMMs stale in metrics (0 disables) |
| `--skip-messages-duration` | `600` | RFQ stream skip duration (seconds) after processing a message |
| `--skip-messages-duration` | `600` | Book stream skip duration (seconds) after processing a message |
| `--block-wait-time` | `12` | Time to wait (seconds) for block N+1 before executing debug_traceCall |
| `--always-test-components` | - | Comma-separated list of component IDs to test every block |
| `--max-blocks` | `0` | Maximum number of blocks to process before exiting (0 = run indefinitely). When set, prints a summary at the end |
Expand All @@ -66,6 +67,7 @@ cargo run --package tycho-integration-test
cargo run --package tycho-integration-test -- \
--chain ethereum \
--disable-rfq \
--disable-pamm \
--protocols uniswap_v2 \
--max-simulations 20 \
--parallel-simulations 10
Expand Down
Loading
Loading