Find the Highest-Value Route Across Payment Rails and Chains

Last updated: November 29, 2026

Quick Overview

Given rails and bridges between money locations (ACH, wire, USDC on Ethereum, USDC on Solana, SPEI and so on), each with a basis-point fee, a fixed fee and a minimum amount, find the path that delivers the most value from a source to a target for a given send amount.

Bridge
Coding & Algorithms
Software Engineer
Bridge
November 29, 2026
Software Engineer
Onsite
Coding & Algorithms
Hard

0

0

0 solved


Given rails and bridges between money locations (ACH, wire, USDC on Ethereum, USDC on Solana, SPEI and so on), each with a basis-point fee, a fixed fee and a minimum amount, find the path that delivers the most value from a source to a target for a given send amount.

Bridge's orchestration product chooses how to get dollars from where they are to where they need to go, mixing bank rails and stablecoin chains with different cost structures. The interviewer wants to see you notice that fixed plus percentage fees are not additive weights, and still justify a Dijkstra-style algorithm.

What the Interviewer Expects
  • Recognize that path cost depends on the amount, so plain shortest-path on fees is wrong
  • Argue why a max-amount best-first search is correct (monotone, non-increasing hop functions)
  • Respect per-edge minimums and drop hops whose output is not positive
  • Use exact arithmetic for amounts
  • Reconstruct and return the path, not just the value
Key Topics to Cover
graph algorithms
Dijkstra correctness
fee modeling
routing
exact arithmetic
How to Approach This
  1. Clarify input constraints and edge cases before writing code.
  2. Walk through your approach verbally and confirm with the interviewer before coding.
  3. Start with a brute force solution, then optimize. Mention time and space complexity.
  4. Test your solution with examples, including edge cases like empty input or duplicates.
  5. Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
  • What breaks if an edge can increase value, for example an FX conversion with a favorable rate?
  • How would you add a constraint on maximum settlement time?
  • Fees change throughout the day. How would you cache or precompute routes?
  • How would you split one large payment across two routes because of per-rail limits?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice DSA Problems
Sample Answer
Requirements

Nodes are locations of value, all denominated in USD value. An edge applies out = in * (1 - bps/10000) - fixed and is usable only if in >= min_amount. Find the maximum amount that can arrive at th...

High-Level Design

Summing fees fails: a 25wirebeatsa0.825 wire beats a 0.8% crypto hop for 100,000 but loses badly for $1,000, so the best path depends on the amount. Each hop function is non-decreasing in its input (more in never ...


Submit Your Answer
Markdown supported

Related Questions