Skip to main content

Overview

When direct swaps between mints fail (typically due to Lightning routing issues), Sovran can automatically find intermediary mints to route the swap. This uses auditor data and your local swap history to build a routing graph.

Routing Settings

Configure routing behavior in Settings → Routing:
stores/settingsStore.ts

Default Settings

components/blocks/rebalance/routing.ts

Routing UI

Max Hops

app/settings-pages/routing.tsx

Max Fee

app/settings-pages/routing.tsx

Min Success Rate

app/settings-pages/routing.tsx

Require Last OK

app/settings-pages/routing.tsx

Trust Mode

app/settings-pages/routing.tsx

Swap Graph

The routing engine builds a directed graph from auditor and local swap history:
components/blocks/rebalance/routing.ts

Building the Graph

components/blocks/rebalance/routing.ts

Local History Integration

Local swap history supplements auditor data:
components/blocks/rebalance/routing.ts

Path Finding

BFS algorithm finds optimal intermediary path:
components/blocks/rebalance/routing.ts

Edge Filtering

components/blocks/rebalance/routing.ts

Path Scoring

components/blocks/rebalance/routing.ts

Min Transfer Threshold

Skip small transfers during rebalancing:
app/settings-pages/routing.tsx

Example Routes

Single Hop

Double Hop

Trust Mode Comparison

Trusted Only: Only uses mints you’ve already added Allow Untrusted: Can route through any mint in auditor data (temporarily trusted for swap)