EnleashedEnleashed
Fix the energy market
Published

Fair Play Automatic Market Maker (FP-AMM)

A continuously clearing market architecture for coordinating distributed energy resources across the electricity system. FP-AMM combines an Automatic Market Maker, holarchical coordination, stateful fairness and Shapley-based settlement to deliver reliable, economically coherent and transparent operation of modern power systems.

Solution section

Mathematical Properties

Mathematical Foundations

Overview

The previous sections described Fair Play conceptually.

This section presents the mathematical framework that underpins the allocation mechanism.

The objective of the model is to satisfy four requirements simultaneously:

  • respect contractual Service Levels,
  • preserve physical feasibility,
  • balance fairness over repeated interactions,
  • remain computationally efficient for continuous market operation.

Rather than replacing economic optimisation, the mathematical formulation operates as a fairness layer that resolves allocation decisions only after economically efficient and physically feasible schedules have been identified.


Allocation Problem

During periods of scarcity or surplus, multiple feasible allocation decisions may exist.

Let

  • Q\mathcal{Q} denote the set of eligible requests,
  • S\mathcal{S} denote the available Service Levels,
  • iQi \in \mathcal{Q} denote an individual participant.

The objective is not to optimise dispatch.

Dispatch has already been determined by the Automatic Market Maker.

Instead, Fair Play determines which participants within the feasible allocation set should receive service (or curtailment).


Service Level Sampling

Eligible requests are first partitioned according to their contractual Service Level.

Each Service Level ss is assigned a non-negative priority weight

ws0.w_s \ge 0.

The probability of selecting Service Level ss is

P(s)=wskSwk.P(s) = \frac{w_s} {\sum_{k \in \mathcal{S}} w_k}.

Higher Service Levels therefore receive proportionally greater opportunity for allocation while preserving probabilistic scheduling.


Fairness State

Each participant maintains a continuously updated fairness state.

For consumers this represents the cumulative proportion of requested service successfully delivered.

For generators it represents the cumulative proportion of available generation accepted by the market.

Conceptually,

fi[0,1]f_i \in [0,1]

where

  • 0 indicates the participant has historically received very little service,
  • 1 indicates the participant has historically received almost complete service.

The fairness state evolves continuously throughout market operation.


Inverse Fairness Weighting

Within the selected Service Level, Fair Play assigns each participant an allocation weight based upon their accumulated fairness state.

One possible formulation is

wi(f)={w0,history unavailable,wmax,fi=0,1fi,otherwise.w_i^{(f)} = \begin{cases} w_0, & \text{history unavailable},\\[1ex] w_{\max}, & f_i=0,\\[1ex] \dfrac{1}{f_i}, & \text{otherwise}. \end{cases}

Participants that have historically received less favourable outcomes therefore obtain larger allocation weights.

Conversely, participants with consistently favourable outcomes receive proportionally smaller weights.

The weighting introduces negative feedback into the allocation process.


Allocation Probability

The probability of selecting participant ii becomes

P(i)=wi(f)jQwj(f).P(i) = \frac{w_i^{(f)}} {\sum_{j\in Q}w_j^{(f)}}.

Selection therefore depends only upon

  • Service Level,
  • Fairness State,
  • current feasible allocation set.

No global participant ordering is required.


Probabilistic Selection

Once probabilities have been calculated, a participant is sampled using weighted random selection.

Unlike deterministic queues,

  • every eligible participant remains selectable,
  • probabilities continuously evolve,
  • historical imbalance is progressively corrected.

The market therefore remains adaptive while avoiding permanent queue positions.


State Update

Following every completed allocation, the participant's fairness state is updated.

For consumers,

fi=Delivered EnergyRequested Energy.f_i = \frac{\text{Delivered Energy}} {\text{Requested Energy}}.

For generators,

fi=Accepted GenerationAvailable Generation.f_i = \frac{\text{Accepted Generation}} {\text{Available Generation}}.

These quantities accumulate over repeated market intervals, allowing fairness to be evaluated longitudinally rather than instantaneously.


Negative Feedback

The allocation mechanism forms a closed feedback system.

Fairness State

      ↓

Allocation Weights

      ↓

Selection Probability

      ↓

Market Outcome

      ↓

Updated Fairness State

Participants that have received comparatively little service become increasingly likely to receive future allocations.

Participants that have consistently benefited become increasingly likely to contribute flexibility during subsequent scarcity events.

This negative feedback prevents persistent allocation imbalance while preserving contractual priorities.


Preservation of Economic Dispatch

Fair Play never replaces the economic optimisation performed by the Automatic Market Maker.

Instead, the sequence of operation is

  1. Determine economically efficient dispatch.
  2. Verify physical feasibility.
  3. Identify equivalent feasible allocation choices.
  4. Apply Fair Play to resolve remaining ambiguity.

Consequently,

  • prices determine efficient operation,
  • physics determines feasibility,
  • Fair Play determines fair allocation.

Computational Complexity

Each allocation decision depends only upon

  • Service Level,
  • Fairness State,
  • local feasible participants.

No global optimisation of participant ordering is required.

The mechanism therefore scales naturally with distributed market architectures and supports continuous market operation involving millions of participants.


Theoretical Properties

The mathematical formulation possesses several desirable properties.

Stateful

Allocation decisions depend upon accumulated market history rather than individual market intervals.


Fair

Repeated disadvantage produces increasing allocation priority, creating bounded long-term deprivation.


Contract Consistent

Service Levels always take precedence over fairness adjustments.

Fairness operates within contractual commitments rather than replacing them.


Physically Feasible

Allocation decisions are only applied to participants already verified by the network feasibility layer.


Economically Efficient

Fair Play never changes least-cost dispatch.

It resolves only those allocation decisions left ambiguous after economic optimisation.


Stochastic

Probabilistic allocation avoids deterministic queue effects while ensuring that fairness emerges statistically over repeated market interactions.


Summary

Fair Play transforms fairness from a static optimisation objective into a continuously evolving state variable.

Rather than attempting to make every individual market interval perfectly fair, the mechanism continuously adjusts allocation probabilities using historical outcomes.

The result is a stateful allocation process that combines:

  • contractual Service Levels,
  • probabilistic scheduling,
  • historical fairness,
  • economic optimisation,
  • physical feasibility,

into a single mathematically coherent framework suitable for continuously operating electricity markets.