From 730fbeff6cf664b162a9e14c32eb212c3807f510 Mon Sep 17 00:00:00 2001 From: brain-marchine <152466993+brain-marchine@users.noreply.github.com> Date: Sun, 12 Jul 2026 17:33:47 +0800 Subject: [PATCH] docs: document multi-hop route discovery Fixes #3 --- docs/multi-hop-routing.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 docs/multi-hop-routing.md diff --git a/docs/multi-hop-routing.md b/docs/multi-hop-routing.md new file mode 100644 index 0000000..f6ba743 --- /dev/null +++ b/docs/multi-hop-routing.md @@ -0,0 +1,14 @@ +# Multi-hop route discovery + +StableRoute discovers indirect paths when no direct pair exists between +source and destination assets. The engine walks the registered pair graph +to find feasible hops while respecting per-pair fees and liquidity ceilings. + +Operational notes: + +1. Register intermediate pairs before expecting multi-hop quotes. +2. Each hop applies its own `feeBps` and amount bounds. +3. Failed discovery returns `404 not_found` rather than a partial quote. + +Implementation lives in the quote handler within `src/index.ts`; extend +`docs/pricing.md` when changing hop selection heuristics.