Keyword Ranking System

xendune uses a weighted ranking formula to determine product search order for each keyword. The system combines organic metrics with paid bid-based ranking.

Components

KeywordWeight Contract

Calculates organic ranking scores using four factors, each with caps to prevent gaming:

Factor Description Weight Cap
Sales Total completed orders Configurable Capped
Rating Score Positive reviews / total reviews Configurable Capped
Activity Time since last activity Configurable Capped
Arbitration History Dispute history (negative factor) Configurable Capped

The formula uses integer arithmetic (x1000 multiplier) to avoid floating-point precision issues on-chain.

KeywordAuction Contract

Manages paid ranking positions:

Ranking Calculation

For each product under a keyword:

  1. Calculate organic ranking score via KeywordWeight (4 factors)
  2. Check if product holds a bid slot in KeywordAuction
  3. Products with bid slots displayed first
  4. Organic ranking results sorted internally by weighted score

Metric Recording

Metrics are recorded automatically during normal platform operations:

Anti-Gaming Mechanisms