Skip to main content

FIRST_SPENT_INDEX

Constant FIRST_SPENT_INDEX 

Source
const FIRST_SPENT_INDEX: usize = 0;
Expand description

The position, in a pair of SURBs minted together, of the one the replier spends first: the first, as a replier spends its SURBs oldest first (FIFO is the only pop order, see hopr_protocol_hopr::SurbPopOrder).

Only that SURB’s lateness is down to its return path. The other is spent right after it, so it trails the first-spent one by the replier’s pace rather than by a relayer’s fault. A race opens only when the later-spent SURB is home while the first-spent one is still out.

Share-first tiers can separate a pair even so: a SURB carrying a PIX share is spent before share-less ones, whatever their ages. See SurbRoundTripRegistry::judges.