Skip to main content
Reiy uses a two-stage scoring system: quotes are ranked for selection, then solutions are scored for winner determination and reward distribution.

Quote ranking

Fisherman ranks quotes per intent to select the best response. Ranking depends on the quote type. Exact-in (fixed sell amount):
CriterionDirection
Net buy amountHigher wins
Estimated feeLower wins
LatencyLower wins
Solver endpoint IDAlphabetical
Exact-out (fixed buy amount):
CriterionDirection
Sell amountLower wins
Net buy amountHigher wins
LatencyLower wins
Solver endpoint IDAlphabetical

Solve scoring

After a solution is submitted, Fisherman computes a score per intent and a total score for the allocation.

Raw surplus

For each intent IiI_i in the solution: raw_surplusi=pifloori\text{raw\_surplus}_i = p_i - \text{floor}_i Where pip_i is the actual payout and floori=max(mi(fi),bmi)\text{floor}_i = \max(m_i(f_i), \text{bm}_i) is the higher of the user’s minimum and the protocol benchmark floor.

Normalized score

scorei=value(buy_tokeni,raw_surplusi,score_time)\text{score}_i = \text{value}(\text{buy\_token}_i,\text{raw\_surplus}_i,\text{score\_time}) Normalization converts surplus into a protocol score unit (numéraire, e.g. USD-equivalent). When all surplus is in the same token, raw surplus may be used directly.

Package score

scorej=scoreifor all intents in solver Pj\text{score}_j = \sum \text{score}_i \quad \text{for all intents in solver } P_j

Allocation score

total_score=scorejfor all solvers in the allocation\text{total\_score} = \sum \text{score}_j \quad \text{for all solvers in the allocation}

Winner selection

The allocation with the highest total score wins. Ties are broken alphabetically by solver endpoint ID.

Score validity

At settlement the committed scores are checked against a tolerance: actual_scorejcommitted_scorej×score_tolerance_bps10000actual_total_scorecommitted_total_score×score_tolerance_bps10000\begin{aligned} \text{actual\_score}_j &\ge \text{committed\_score}_j \times \frac{\text{score\_tolerance\_bps}}{10\,000} \\ \text{actual\_total\_score} &\ge \text{committed\_total\_score} \times \frac{\text{score\_tolerance\_bps}}{10\,000} \end{aligned} A default tolerance of 9,500 bps (95%) is typical.

Uniform surplus ratio (EPSR)

Intents in the same directed pair should receive equal proportional improvement above their floor. Core relation: pifloorikd\frac{p_i}{\text{floor}_i} \approx k_d with the same kdk_d for all intents in the pair.

Fixed-point representation

KSCALE=1000000000K_{\text{SCALE}} = 1\,000\,000\,000 and kd=pfirst×KSCALEfloorfirstk_d = \left\lfloor \frac{p_{\text{first}} \times K_{\text{SCALE}}} {\text{floor}_{\text{first}}} \right\rfloor

Cross-multiplication check

For every subsequent intent: pi×floorfirstpfirst×flooriϵbps×floorfirst×floori10000\left| p_i \times \text{floor}_{\text{first}} - p_{\text{first}} \times \text{floor}_i \right| \le \epsilon_{\text{bps}} \times \frac{ \text{floor}_{\text{first}} \times \text{floor}_i }{10\,000} Typical ϵbps\epsilon_{\text{bps}} is 1–5 bps.

Batch-level tolerance

At settlement: kactualkcommitted×ktolerance_bps10000k_{\text{actual}} \ge k_{\text{committed}} \times \frac{k_{\text{tolerance\_bps}}}{10\,000} A typical tolerance is 9,500 bps (95%).

Fees

Protocol fee structure.

Solver Overview

Solver registration and rewards.