Pathfinding searches the gossip graph (plus hints) for a path that can deliver an amount under fee and timelock constraints, even with incomplete liquidity knowledge.
Complete Step 1 // Required reading in the study plan above, then continue here.
Step 2 — Core idea: search, attempt, learn, retry
Dijkstra-with-fees is only the start. Production routers track historical failures and prefer reliable edges.
Analogy: GPS with imperfect live traffic. You pick a route, hit a jam (insufficient balance), then reroute using what you learned.
Loading diagram…
type Edge = { from: string; to: string; feeBase: number; feeProportional: number };
// cost ≈ base + amount * proportional / million + riskPenaltyDone when: You can explain why the first path often fails and retries are normal.
Step 3 — Weight sketch (lab)
Write a simple edge cost. Describe the learn → retry loop after a temporary imbalance failure.
Done when: Lab evidence (weight sketch + retry sentence + source) is complete.
Next lesson
Multipath Payments — split when one path cannot carry the full amount.