Driven by the widespread deployment of distributed energy resources, local energy markets (LEMs) have emerged as a promising approach for enabling direct trades among prosumers and consumers to balance intermittent generation and demand locally. However, LEMs involve processing sensitive participant data, which, if not protected, poses privacy risks. At the same time, since electricity is exchanged over the physical power network, market mechanisms should consider physical constraints and network-related costs. Existing work typically addresses these issues separately, either by incorporating grid-related aspects or by providing privacy protection. To address this gap, we propose a privacy-preserving protocol for LEMs, with consideration of network fees that can incite participants to respect physical limits. The protocol is based on a double-auction mechanism adapted from prior work to enable more efficient application of our privacy-preserving approach. To protect participants' data, we use secure multiparty computation. In addition, Schnorr's identification protocol is employed with multiparty verification to ensure authenticated participation without compromising privacy. We further optimise the protocol to reduce communication and round complexity. We prove that the protocol meets its security requirements and show through experimentation its feasibility at a typical LEM scale: a market with 5,000 participants can be cleared in 4.17 minutes.
Alex: Welcome to another episode of ResearchPod. Sam, what paper are we diving into today?
Sam: This is a study by Eman Alqahtani and Mustafa Mustafa on privacy-preserving local energy trading that also accounts for network fees. The central puzzle it tackles is how to let households trade extra solar power directly with neighbors—balancing supply and demand locally—without exposing personal energy habits or ignoring the costs of using the shared power grid.
Alex: So the core problem is that these local energy markets sound useful for renewables, but they risk privacy leaks and grid overloads if not handled right?
Sam: Exactly. People with solar panels—called prosumers—generate surplus electricity on sunny days and want to sell it nearby instead of sending it far away at low fixed prices. But running these trades over the physical grid means dealing with real limits, like not overloading wires, and charging fees for that wear and tear—what researchers call network fees based on electrical distance between traders.
Alex: Right, so without those fees, trades might damage the grid, and without privacy protections, bad actors could spy on your home life from your power use patterns.
Sam: That's the gap. Past work either adds grid fees—which often needs the grid operator involved every time, slowing things down—or protects privacy with tricks like adding noise to data or special math, but not both. This paper bridges that by designing a market system where participants pick potential trade partners upfront using pre-set fee info from the grid operator, then run the whole matching privately.
Alex: And they do this privately how? Without anyone seeing the bids or who trades with whom?
Sam: They use a setup where multiple computers—run by market servers—work together on everyone's private data, like bids and prices, to find matches and set prices without ever revealing the inputs to each other or outsiders. It's called secure multiparty computation, but think of it as a group of friends pooling money for a group gift without anyone knowing who chipped in what—the total comes out right, secrets stay safe. They also add a way to prove you're a real participant without showing your identity details.
Alex: Huh. So it handles both the privacy fears that keep people from joining and the grid costs that make trades fairer.
Sam: Yes, and experiments show it scales: servers across Europe cleared a mock market of 5,000 households in about 4 minutes, respecting grid rules all along. The paper suggests this makes local trading practical without the usual trade-offs.
Alex: That scaling to thousands in minutes is notable—especially with privacy intact. But how do the servers actually match buyers and sellers without seeing who wants what?
Sam: The key starts with users picking potential trade partners ahead of time. Each household gets a list from the grid operator—called the DSO—of signed fee details for every possible pair in the market, showing costs based on electrical distance without revealing much else. Users then choose a shortlist of affordable peers, say the top 20 with lowest fees, and submit those masked indexes privately. This cuts down pairings from everyone-to-everyone to just a few per user, speeding things up a lot—like switching from checking every kid in school for a partner to just your shortlist of friends.
Alex: Masked indexes—meaning they hide the actual user IDs while still letting matches happen?
Sam: Yes. The three market servers—run by different groups to prevent cheating—take these lists and use joint math to check matches without learning identities. Imagine dancers at a masked ball handing organizers lists of preferred partners by disguised name tags; the organizers privately test if tags match across lists, pair them up, and shuffle the order so no one sees who got who.
Alex: So they sort bids greedily—highest buy over lowest sell first—while shuffling to hide the sequence?
Sam: They do, by breaking numbers into bits and using shared secrets across servers—each holds pieces, none the whole. For sorting, they repeatedly shuffle and position items bit by bit, like organizing cards face-down by suit without peeking. This keeps rounds low, enabling that quick clear time.
Alex: So pre-picking peers with fixed fees avoids grid involvement mid-market, and the masked matching plus shuffling protects privacy during allocation.
Sam: Precisely. They verify users upfront with a proof system where you show you control your ID's secret without revealing it—prover sends a random point, verifier challenges, prover responds correctly. Batched across users, servers confirm everyone legitimately without learning keys.
Alex: Okay, so authentication checks out upfront. But walk me through the actual market clearance—how do the servers figure out who trades with whom and how much, all privately?
Sam: First, they sort the bids: sellers from lowest price to highest, buyers highest to lowest. Then they compute the trading price as the average of all offers. From there, it's about checking mutual interest—did both sides pick each other as affordable peers? The servers run peer index mappings, creating a private grid of yes/no matches using secure equality tests: each server holds shares of the IDs, compares bit by bit without revealing, and only the match flag comes out shared—like scanning lists for overlaps without showing the lists.
Alex: Like teachers checking if two kids both named each other as project partners, but with locked envelopes.
Sam: A good way to picture it. With those mappings, they pair sellers and buyers in price order, compute the minimum volume either can trade—using secure comparisons on shared bits—then only assign if both mappings say yes for that specific peer slot. Volumes update sequentially: subtract what's traded from remaining amounts, repeat until nothing left. Outputs are private accepted volumes per peer, plus totals for billing.
Alex: So the pre-selection shrinks the search space hugely—from checking every pair to just dozens per user—and the MPC handles the rest without leaks.
Sam: Yes, and the paper notes this drops computation from quadratic to near-linear in participants. Their tests cleared a 5,000-user market in 4.17 minutes over distributed servers, grid-safe and private.
Alex: Huh, so batch masking reveals safe checklists, conditional mins allocate greedily, shuffle anonymizes outputs. The paper claims solid security for this?
Sam: Yes, they prove it under a framework called universal composability—meaning the real protocol acts indistinguishable from an ideal trusted box that computes mappings privately, leaks only what's allowed to adversaries, then outputs results correctly.
Alex: And in practice?
Sam: Experiments on European cloud servers scaled from 1,000 to 5,000 even-split users, hitting 4.17 minutes for the largest. Theoretical costs match: near-linear rounds and communication in peers per user, making it viable for real local grids. The paper positions this as a practical advance for fee-aware private trading.
Alex: But are there limits to how it scales further, say if people pick more peers?
Sam: Yes, a key limit is how the runtime grows with the number of peers each user selects upfront. While participant count scales near-linearly if that stays small—like a few dozen per person—the matching and allocation steps inside grow quadratically with those selections, due to repeated secure checks across pairs. It assumes most servers follow rules honestly, with at most one dishonest, and relies on fixed precomputed fees—which work if grid costs don't change mid-market. There's also a risk of linking trades over time from reusing the same fee details for pairs.
Alex: Those are fair caveats—keeps it realistic. Still, for neighborhoods trading solar excess, this seems like a solid step: private, grid-aware, and quick enough to use.
Sam: Precisely. It shows peer-to-peer energy markets can incorporate real costs and privacy without slowing to a crawl, paving the way for regulatory adoption in microgrids where trades optimize flows and cover infrastructure naturally. The evidence points to practicality for typical setups today.
Alex: That's a coherent advance—balancing trade-offs thoughtfully. Thanks, Sam, for breaking it down.
Sam: My pleasure, Alex.
Alex: That's our look at this privacy-preserving approach to local energy markets. Thanks for listening to ResearchPod.