Routing
Routing
How the routing engine absorbs gas costs into the route.
Every hop in a candidate route carries a gas estimate, produced by the HopEstimator alongside the bridge fee and latency. Each HopEstimate exposes estimatedGasCost and estimatedBridgeFee, both denominated in the native asset of the network the hop crosses. The RoutingEngine folds these into the Route's total cost, so gas is part of the optimization the RouteScorer evaluates rather than a surprise surfaced after a path is chosen.
Because gas is an input to selection, a cheaper-but-slower path and a faster-but-costlier one are compared on the same terms as every other dimension. The user never has to reason about acquiring or spending native gas on each constituent network to compare routes.
Gas abstraction means the routing engine resolves and accounts for gas on the user's behalf — it does not mean gas ceases to exist. The cost reflected in a quote is the real cost incurred across the path, surfaced honestly. What is abstracted away is the operational burden of acquiring, managing, and spending native gas on every network involved in a multi-hop route.
The default estimator derives gas cost heuristically from the bridge profile and the edge's liquidity, which is sufficient for simulation and for quoting when no live gas oracle is configured. A production deployment supplies an estimator that reads live gas prices per chain, so the absorbed cost reflects current network conditions at the moment of routing.