Autonomous Bitcoin Mining Driven by Live Electricity Markets
An event-driven platform that recalculates mining break-even economics every five minutes against Australian electricity spot prices and autonomously pauses or resumes miners within seconds.
The Problem
Bitcoin mining profitability in Australia lives at the mercy of the electricity spot market, where AEMO prices swing from negative to over $200/MWh within hours. When prices spike past the point where electricity costs exceed Bitcoin revenue, every minute of continued mining is a direct loss—and manual monitoring across multi-megawatt, multi-site operations simply cannot react fast enough.
The break-even point itself is a moving target, shifting with Bitcoin hash price, actual facility power consumption, USD/AUD exchange rates, and time-of-day power contracts. Getting the pause/resume decision right requires continuously recomputing that threshold and executing fleet-wide miner commands within seconds—at sites without staff on hand.
What We Built
We built an event-driven microservices platform spanning cloud and on-premise: a Python rules engine on Lambda recalculates real-time break-even thresholds from hashrate, power contracts, and exchange rates, while concurrent Go collectors ingest AEMO P5MIN, DISPATCH, and PREDISPATCH reports in parallel with retry logic. When the decision engine determines mining is unprofitable, an EventBridge-triggered workflow flows from decision to task controller to an on-premise Go controller running on Kubernetes, which executes bulk pause/resume commands across miner subnets via Braiins OS+ gRPC—end to end within seconds.
Supporting services include a multi-site configuration API managing site metadata, power contracts, and equipment hierarchies in DynamoDB; InfluxDB time-series storage with SNS triggers; Redis state management that prevents pause/resume oscillation; and a Python Modbus TCP fan-control service that replaced an Eaton PLC with proportional temperature-based cooling.
Live break-even calculation
The rules engine recomputes profitability thresholds every five minutes from Bitcoin hash price, real power consumption, USD/AUD rates, and time-of-day contracts—so decisions track reality, not estimates.
Seconds-level autonomous response
EventBridge workflows carry decisions from cloud to on-premise gRPC execution within seconds of an AEMO price update, pausing or resuming entire miner fleets without human intervention.
Parallel market data ingestion
Concurrent Go collectors fetch all AEMO report streams in parallel with retry logic, keeping the decision engine fed with current five-minute market data.
Full-facility automation
Beyond miners, the platform manages multi-site configuration and replaced PLC-based cooling with software-controlled proportional fan management over Modbus TCP.
How It Works in Practice
A summer demand spike sends the AEMO spot price surging past $200/MWh across a multi-site mining operation.
- 1
Detect the spike
The five-minute AEMO ingestion picks up the P5MIN price movement across parallel data streams the moment it publishes.
- 2
Recompute break-even
The rules engine evaluates the new price against the live threshold—hash price, site power consumption, exchange rate, and the site’s power contract terms.
- 3
Pause the fleet
The decision flows through EventBridge to the on-premise controller, which issues bulk pause commands across miner subnets via gRPC within seconds.
- 4
Resume when profitable
As prices fall back below threshold, the same loop resumes mining—with Redis state management preventing oscillation around the boundary.
Screenshots

Engineering Approach
Economics as the control loop
The system optimizes profit, not uptime—encoding break-even math as the automated decision-maker turns electricity volatility from a threat into a managed input.
Cloud decisions, edge execution
Lambda-based decision-making pairs with on-premise Kubernetes controllers for gRPC miner commands, keeping fleet response fast and local while logic stays centrally managed.
Stability against oscillation
Redis-backed state management stops the fleet from thrashing when prices hover near break-even—an operational detail that separates automation that works from automation that wears out hardware.
Have a similar problem?
Tell us what you're working on and we'll tell you honestly whether we can help.