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:
|
With Homebrew:
With cargo-binstall (pre-built binary):
Or build from source with cargo (requires cmake and C++ compiler):
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:
[]
= "polymarket"
= "polygon"
[]
= "PRIVATE_KEY"
[]
= 100
= 1000
= 0.50
[]
= true
= 0.05
[]
= true
= "TELEGRAM_BOT_TOKEN"
= "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:
See docs/strategies/overview.md.
License
Licensed under either of Apache License, Version 2.0 or MIT License at your option.