Description
PaymentGraphChecker validates the structure of payment graphs but does not detect edges with negative weights (amounts). A negative-weight edge can cause unbounded fund extraction when the graph is traversed greedily.
Acceptance Criteria
Context
- Target file:
src/graph/PaymentGraphChecker.ts
- Zero-weight edges are allowed (they represent pass-through hops)
Description
PaymentGraphCheckervalidates the structure of payment graphs but does not detect edges with negative weights (amounts). A negative-weight edge can cause unbounded fund extraction when the graph is traversed greedily.Acceptance Criteria
checkGraph(graph)returns a validation failure when any edge hasweight < 0Context
src/graph/PaymentGraphChecker.ts