## 2 Local Energy Markets  
The current understanding of the LEM diverges somewhat from the expectations held by researchers in the early 2000s. At that time, LEMs were envisioned to encompass large regions or even entire countries, such as California [17], Poland [18], Slovenia [19], and Denmark [20]. The differentiation between local and national energy markets was primarily based on technical factors like power grid capacity and voltage levels, rather than on market participants' benefits, stakeholder involvement, or market designs. Recently, LEMs have been characterized as decentralized, contrasting with traditional top-down and centralized markets [21]. Today, LEMs are viewed as decentralized, horizontally scaled markets confined to smaller communities. In these markets, energy trading is dynamic due to the variability of local renewable energy sources (RES), with small energy prosumers selling surplus energy as available, which renders long-term energy trading contracts less practical. In any market design, each participant has specific roles and objectives, which may differ from those of other players. In an LEM, the key players include (i) local energy suppliers or sellers, (ii) local energy consumers or buyers, and (iii) local energy intermediaries. A critical aspect of market operations is how these players interact with one another to buy and sell energy and services, not only for their own benefit but also to contribute to market stability. Figure 5 illustrates the interactions among these participants in the LEM. Figure 4: Papers reviewed in terms of the type of energy market. * Local Sellers: In LEMs, local sellers are players who provide the energy by dispatching their distributed generator units (DGs) and/or energy storage systems (EESs). Local sellers within the market can include individuals, households, businesses, co-generation units, or community-based organizations that have integrated energy sources (renewables and/or conventional). They actively sell their surplus energy to local buyers or electricity retailers with the aim of reducing overall energy costs and maximizing their profits through optimal dispatch of energy sources. * Local Buyers: In LEMs, local buyers represent consumers seeking energy from local generation resources. These consumers encompass households, businesses, and institutions, serving as the ultimate end-users of energy. They procure energy either directly from local producers or through electricity retailers. It is worth mentioning that LEMs offer consumers the opportunity to directly source energy from prosumers, thereby eliminating intermediaries within the energy supply chain. This direct interaction empowers consumers to access energy at a potentially lower cost, while prosumers can generate additional revenue by selling their surplus energy. * Local Energy Mediators: All the other players except local sellers and buyers in the LEMs are the local energy mediators, i.e., operators, auctioneers, aggregators, and regulators. The LEM's operator can be a local energy system (LES), which will be responsible for collecting and matching the energy trading requests/demands from buyers and sellers within the local premises and broadcasting and publishing the trading prices in a defined time window, as shown in Figure 6. Every LES must have an advanced metering unit as an energy consumption data-reading server, energy transaction server, account database, and energy transaction database. The meter-reading server collects power generation or consumption data from smart meters (SMs). The transaction server is responsible for collecting trading requests from buyers and sellers, matching the trading requests, and publishing the price in defined time windows. An energy transaction meter is responsible for recording and measuring information on energy transactions between energy sellers and buyers. Modern energy transaction meters are equipped with data logging capabilities. They record data over time, allowing for historical analysis of energy consumption or production patterns.