Skip to main content

Module mints

Module mints 

Source
Expand description

The major-mint universe shared by the reroute reports: tables of stables and priced majors, plus the helpers that classify, price, and label mints against them.

Structs§

Mint
A mint: its address, display symbol, and token decimals.

Constants§

PRICED_MAJORS
Non-stable majors priced from in-range quote medians (vs USDC/USDT/SOL).
SOL
Wrapped SOL, the mint every native-SOL leg trades as.
STABLES
USDC
USDT

Functions§

is_major
Whether the mint is one the tables name, and so can anchor another mint’s price.
parse_mint
Leg mints are resolved before a swap ever becomes reroutable (resolve_swap only emits a Reroutable swap once both mints parse), so a leg mint that still fails to parse here is corrupt wire data or an upstream bug, not a legitimate mint-less state. Panicking loudly beats defaulting: a silent default would bucket that bug’s output as an ordinary exotic leg instead of surfacing it.
priced_decimals
short_mint
The token’s symbol, or a shortened address
stable_decimals
symbol
None outside the tables, which displays as a shortened address rather than a guess.
trades_only_majors
One major against a longtail mint is not a majors pair: the longtail side is what the router misprices.