edgelord 0.0.6

A prediction market arbitrage detection and execution CLI.
Documentation

I built this to test arbitrage conditions on Polymarket, but it doubled as an experiment in pure hexagonal architecture. The three strategies do work (the combinatorial solver uses Frank-Wolfe, which has been proven effective for this). Arbitrage is hard (latency, liquidity, market selection all matter), but the math is sound. Run this against 1,000+ markets concurrently and you'll find opportunities. If you're curious about the mechanics, I wrote up how each strategy works. If this makes you money, just know the real edge is that I wrote it.


Highlights

  • Real-time arbitrage detection across binary and multi-outcome markets
  • Three strategies out of the box: single-condition, market rebalancing, combinatorial
  • LLM-powered inference for cross-market constraint discovery
  • Risk management with position limits, exposure caps, and circuit breakers
  • Telegram notifications for trades, opportunities, and alerts
  • SQLite persistence for statistics, trades, and historical analysis

Installation

With the standalone installer:

curl -LsSf https://raw.githubusercontent.com/usealtoal/edgelord/main/scripts/install.sh | sh

With Homebrew:

brew install usealtoal/tap/edgelord

With cargo-binstall (pre-built binary):

cargo binstall edgelord

Or build from source with cargo (requires cmake and C++ compiler):

cargo install edgelord

Quick Start

$ edgelord init
$ edgelord check config
$ edgelord check live
$ edgelord run

Strategies

Strategy Signal Typical Edge
single_condition YES + NO < $1 2–5%
market_rebalancing sum(outcomes) < $1 1–3%
combinatorial cross-market constraints <1%
$ edgelord strategies list
$ edgelord strategies explain single_condition

Commands

$ edgelord init                  # Setup wizard
$ edgelord run                   # Start trading
$ edgelord status                # Current state and today's P&L
$ edgelord statistics today      # Today's statistics
$ edgelord statistics week       # 7-day summary
$ edgelord check config          # Validate configuration
$ edgelord check live            # Live readiness checks
$ edgelord wallet status         # Token approvals
$ edgelord wallet approve 1000   # Approve $1000 for trading

See edgelord --help for all commands.

Configuration

Create a config file with edgelord init or manually:

[exchange]
provider = "polymarket"
network = "polygon"

[wallet]
private_key_env = "PRIVATE_KEY"

[risk]
max_position_per_market = 100
max_total_exposure = 1000
min_profit_threshold = 0.50

[strategies.single_condition]
enabled = true
min_edge = 0.05

[telegram]
enabled = true
bot_token_env = "TELEGRAM_BOT_TOKEN"
chat_id_env = "TELEGRAM_CHAT_ID"

See docs/configuration.md for full reference.

Architecture

domain/         Pure types, no external dependencies
port/           Inbound and outbound contracts
adapter/        CLI, exchange integrations, notifications
application/    Use-case orchestration
infrastructure/ Config, bootstrap, runtime wiring

Hexagonal architecture with clean separation between domain logic and external integrations.

Extending

Implement port::inbound::strategy::Strategy to add custom strategies:

impl Strategy for MyStrategy {
    fn detect(&self, ctx: &StrategyContext) -> Vec<Opportunity> {
        // Your detection logic
    }
}

See docs/strategies/overview.md.

License

Licensed under either of Apache License, Version 2.0 or MIT License at your option.