Skip to content

BM-2477: Add market efficiency indexer and API endpoints#1664

Open
willpote wants to merge 13 commits intomainfrom
willpote/well-priced-proofs
Open

BM-2477: Add market efficiency indexer and API endpoints#1664
willpote wants to merge 13 commits intomainfrom
willpote/well-priced-proofs

Conversation

@willpote
Copy link
Contributor

@willpote willpote commented Feb 18, 2026

Adds a market efficiency analysis pipeline that tracks whether provers lock the most profitable available orders. More context and analysis of the metric can be found here.

Includes a new market-efficiency-indexer binary that processes locked requests, computes per-order profitability rankings (with gas-adjusted variants), and aggregates hourly/daily efficiency rates. Also adds API endpoints (/efficiency, /efficiency/aggregates, /efficiency/requests) to serve the results.

Changes

  • New efficiency module in the indexer crate with DB layer (db/efficiency.rs) and service logic (efficiency/service.rs)
  • market-efficiency-indexer binary with CLI args for lookback window, one-shot mode, and start/end time ranges
  • SQL migrations for market_efficiency_orders, hourly/daily aggregates, and gas-adjusted variants
  • Four new API routes on the indexer API for summary, aggregates, and per-request efficiency data
  • Lambda trigger (market-efficiency-trigger-lambda) and Pulumi infra for deploying as an ECS task
  • Dockerfile for the new indexer binary
  • Integration tests for the efficiency API endpoints
  • Docs for run-market-efficiency-indexer in the indexer-api README

@github-actions github-actions bot changed the title Add market efficiency indexer and API endpoints BM-2477: Add market efficiency indexer and API endpoints Feb 18, 2026
@linear
Copy link

linear bot commented Feb 18, 2026

@willpote willpote marked this pull request as draft February 18, 2026 20:01
Copy link
Contributor

@jonastheis jonastheis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have reviewed the main logic and extended it a little bit to add the percentile rank. Don't know about the infra/deployment part though.

@jonastheis jonastheis marked this pull request as ready for review March 3, 2026 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants