Buy or Sell? Energy Sharing of Prosumers on Constrained Networks
Abstract
The advent of intelligent agents who produce and consume energy by themselves has led the smart grid into the era of “prosumer”, offering the energy system and customers a unique opportunity to revaluate/trade their spot energy via a sharing initiative. To this end, designing an appropriate sharing mechanism is an issue with crucial importance and has captured great attention. This paper addresses the prosumers’ demand response problem via energy sharing. Under a general supplydemand function bidding scheme, a sharing market clearing procedure considering network constraints is proposed, which gives rise to a generalized Nash game. The existence and uniqueness of market equilibrium are proved in noncongested cases. When congestion occurs, infinitely much equilibrium may exist because the strategy spaces of prosumers are correlated. A priceregulation procedure is introduced in the sharing mechanism, which outcomes a unique equilibrium that is fair to all participants. Properties of the improved sharing mechanism, including the individual rational behaviors of prosumers and the components of sharing price, are revealed. When the number of prosumers increases, the proposed sharing mechanism approaches social optimum. Even with fixed number of resources, introducing competition can result in a decreasing social cost. Illustrative examples validate the theoretical results and provide more insights for the energy sharing research.
Nomenclature
a Indices and Sets

[]

Index of prosumers.

Index of resources.

Set of prosumers.

Set of resources.

Set of buses.

Set of edges.

Disutility function of prosumer .

Sharing cost of prosumer .

Total cost function of prosumer .

Action set of player , and .
B Parameters

[]

Number of prosumers.

Number of resources of each prosumer.

Fixed amount of energy prosumer consumes.

The amount of energy generates originally.

The amount of energy bought from grid by .

Required load reduction of prosumer .

Price elasticity of prosumers

Coefficients of the disutility function for prosumer .

Line flow distribution factor from bus to line .

Flowlimit for line .
C Decision Variables

[]

Output adjustment of resource for prosumer .

Sharing market clearing price for prosumer .

Sharing price for prosumer after regulation.

Willingness to pay/buy of prosumer .

Energy transaction in the sharing market.
I Introduction
The advances in distributed renewable generation technology amid the cost decline of energy storage units have led to the proliferation of utilityscale wind turbines, rooftop PV panels and energy storages [1]. Traditional customer is now transferring to the socalled “prosumer”. Except for their own needs, prosumers can even supply energy to the grid if the production is abundant, and offer great potential for enhancing the efficiency of energy utilization via energy sharing [2]. In the past decade, the sharing economy has become a heated topic in both industry and academia. Several thirdparty sharing platforms, such as Uber for ridesharing [3], AirBnB for roomsharing [4] and Upwork for workplacesharing [5] are now changing the way of life in modern society. Researchers endeavor to characterize the strength and drawback of current sharing schemes and raise more efficient ones.
Numerous empirical studies on sharing have been conducted. A review of the sharing economy was presented in [6]. Performance of typical sharing platforms is studied in [7, 8] together with their impact on social welfare. The influence of sharing prices and subsidies were revealed [9]. The key issue in energy sharing is designing a proper mechanism or business model. The desired business model should satisfy the following conditions: 1) The participant has the free choice of supply or consume; 2) The sharing market is effectively cleared, which means supply and demand are balanced while the system constraints are not violated; 3) Being fair to all participants. Above empirical studies offer the guidance for designing sharing mechanism. The existing work can be divided into three categories according to the model structure.
Stackelberg Game based Sharing. This category follows a twolevel (sequential) decisionmaking framework. In the upper level, the operator of a sharing platform announces buying and selling prices, aiming at optimizing a certain objective (e.g., profit or social welfare); In the lower level, prosumers/costumers decide the sharing profile in response to the price signal. The two levels constitute a Stackelberg game. As the operator has the priority, this scheme is called “OperatorDominant Sharing”. Researches in this line include optimal pricing [10], efficiency in matching [11] and equilibrium analysis [12], to name just a few. The pricing strategy for energy sharing among PV prosumers was investigated in [13, 14]. The existence and uniqueness of the Stackelberg Equilibrium (SE) were proved. The sharing was further categorized into direct sharing (within a single time period) and buffered sharing (across time periods) with the help of energy storage [15]. A Stackelberg game between the auctioneer and the residential units was modeled in [16] for energy storage sharing. A twosided market based sharing pricing problem among renters and owners was studied in [12]. Efficiency loss during the tradeoff between revenue and social welfare was bounded. Optimal loyalty program for sharing platform operator was investigated in [17], showing that a linear loyalty program works better than the onetime signup bonuses. For homogeneous suppliers, a linear loyalty program fits well while for heterogeneity suppliers, a set of multithreshold linear loyalty programs are implementationfriendly. In this category, sharing participants are pricetakers, and the study focuses on the profit of the platform operator to promote the business model.
Generalized Nash game based Sharing. This category follows a singlelevel (simultaneous) decisionmaking framework, and the behaviors of participants are modeled as a generalized Nash game (GNG). The sellers bid the production costs while the buyers bid the demands to the market at the same time; then the sharing market is cleared and the sharing price is given. This scheme is called “PlayerDominant Sharing”. This kind of studies has a similar structure as the traditional energy market analysis [18, 19], but the main difference is that the sharing participants can benefit from either sharing their resources or consuming it themselves. Vehicletovehicle charge sharing was analyzed in [20]. A doublesided bidding mechanism in the mobile cloud was proposed to encourage users’ participation [21]. In the above work, roles of the players (a seller or a buyer) are predetermined. With the prevalent of prosumers, it is natural that participants may change their roles over time. The behavior of networked prosumers with different price preferences on the trades with their neighbors was considered under peertopeer energy exchange [22]. The economic efficiency of energy hubs management in a multienergy system under three schemes (individual, sharing, aggregation) was compared in [23].
Coalition Game based Sharing. The above two categories of researches adopt noncooperative game theoretical frameworks, while this category employs a cooperative game model. For coalition game based sharing, a set of reallocation rules is predetermined by the sharing platform and served as prior knowledge; then each player makes his decision taking into account the reallocation he may obtain. The crucial issue in the kind of study is the proper design of the reallocation rule, such that all players are willing to cooperate, forming a coalition game. The famous VickreyClarkeGroves (VCG) mechanism is one of the examples [24]. An efficient cost allocation scheme for energy sharing was proposed in [25]. Coalitional game theory based local power exchange algorithm was designed for networked microgrids [26]. A conceptual design for the demandside energy resource was provided in [27], where the coalition surplus is distributed between aggregators and prosumers. The coalition game based sharing can achieve social optimum, but for a complex sharing system, a proper reallocation rule is difficult to obtain.
This work investigates energy sharing from the perspective of prosumers via generalized Nash game, and thus falls into the second category. It tries to set forth an efficient sharing mechanism that allows participants to choose their roles flexibly, and enhances social efficiency while maintaining system security. It possesses some salient features:
1) Sharing mechanism considering network constraints. A generic supplydemand function based sharing mechanism is proposed. It allows prosumers to choose their roles as buyers or sellers freely. Different from previous works focusing on profit maximization, the proposed sharing scheme targets at minimizing the variance of sharing prices and maintaining fairness. When the sharing market is effectively cleared, supplydemand balance and system constraints are met. The model turns out to be a generalized Nash game. The existence and uniqueness of a generalized Nash equilibrium (GNE) in noncongestion cases is proved; an improved sharing mechanism with price regulation is derived for locating a unique GNE when congestion occurs.
2) Desired properties of the sharing mechanism. It is proved that every prosumer has the motivation to take part in sharing by revealing that his cost under sharing is no worse than under individual decisionmaking. This also means a Pareto improvement is achieved among all prosumers. The sharing price is shown to have a similar structure as the locational marginal price (LMP) in power market analysis, consisting of two parts: one is related to energy balancing and the other is caused by congestion. The proposed sharing mechanism approaches social optimum with an increasing number of participants. Even with a fixed number of resources, introducing competition can help reducing the total social cost.
3) Deeper insights into the sharing mechanism. Several examples are given for a better understanding of the proposed sharing mechanism. A simple case with two prosumers is used to show that the improved sharing mechanism guarantees the existence of a unique GNE. Then, the impact of flow limits is investigated. The proposed sharing mechanism always results in a fair nodal sharing price. It is also revealed that getting more prosumers involved and introducing competition help reduce the total cost. One important factor regarding competition is the location of lines.
The rest of this paper is organized as follows. The mathematical formulations of energy prosumers and description of the intuitive energy sharing mechanism are presented in Section II; Discussions regarding the existence of GNE are given in Section III; An improved sharing mechanism is provided in Section IV to ensure the uniqueness of GNE. Properties of the improved sharing game are revealed in Section V; Some illustrative examples are given in Section VI. Finally, conclusions are summarized in Section VII.
Ii Game Model of Energy Sharing
Iia Energy Prosumers
A set of prosumers indexed by is considered and each of them possesses resources, i.e., a distributed generator (DG), indexed by . Let the underlying simple undirected graph be , where denotes the set of buses and the set of edges. The degree of a vertex of graph is defined as the number of edges incident to that vertex. Different from traditional producers or consumers, prosumers can both produce and consume energy. The selfbalancing condition of prosumer is shown below.
(1) 
where is the energy produced by itself, is the energy purchased from the grid, and is the load demand it needs to satisfy, which is fixed. We consider all these prosumers taking part in a demand response program and the required load reduction for prosumer is , which means should be reduced by . If each prosumer makes the decision individually, in other words, it can only adjust its resources output by to meet the load reduction requirement, we have . The quadratic function is adopted to depict the disutility of prosumer . According to CauchySchwarz inequality, the disutility is lower bounded by
As the disutility varies among different prosumers, the individual decisionmaking scheme may not be the most efficient one, which means the social total disutility can still be diminished. An intuitive idea is to allow them to trade with each other so that the prosumer with lower marginal disutility can reduce more and buy energy from prosumer with higher marginal disutility, resulting in a winwin game. Regarding energy sharing, there are two main concerns: (1) a proper profit allocation scheme should be designed so that every prosumer is willing to participate; (2) deploying energy transaction might violate energy flow limits of the network. To this end, an effective sharing mechanism that can motivate prosumers to get involved while maintaining system security is necessary.
Assumption 1.
The maximum degree of vertexes of graph is finite, and without loss of generality, assume the upper bound is .
IiB Generic SupplyDemand Function
A generic supplydemand function is adopted, allowing prosumers to flexibly alter his role either as a seller or a buyer. The supplydemand function for prosumer is
(2) 
where is the clearing amount of prosumer ( for buyers and for sellers); is the price sensitivity of the sharing market, which shows how the bids of prosumers influence the sharing price; is the clearing price for prosumer ; is the bid of prosumer . The sharing market is said to be cleared effectively when the following two conditions are met:
(1) The net quantity , which means
(3) 
(2) The energy transaction pattern corresponding to the market clearance is deliverable, which means there exists a feasible power flow solution given the offers and demands of prosumers. Here, direct current (DC) model is used to calculate the power flow in each line . Since power balancing is ensured by (3), we only need to impose the following flow limit constraints
(4) 
The sharing platform clears the market subject to constraints (3) and (4). In view of possible congestions, the sharing price may vary at different buses. To give a fair result, the objective of the market clearance problem is to minimize the variance of the sharing prices .
(5) 
In consideration of (3), by ignoring the constant terms, the objective function can be simplified into .
IiC Energy Sharing Mechanism
Under the settings described above, the energy sharing market considering network constraints is operated following three steps and shown in Fig. 1.
Step 1: Estimate the value of price sensitivity factor via historical data. Each prosumer submits a bid to the sharing platform, showing his willingness to buy.
Step 2: The sharing platform effectively clears the market by solving problem (6). Then the sharing price and clearing amount are sent back to prosumer .
(6a)  
(6c)  
where , , and following a colon are dual variables.
Step 3: The clearing amount of each prosumer is given by . If , he purchases energy from the sharing market and the payment is ; otherwise, if , he sells energy to the sharing market and the revenue is .
The sharing price is not neccessary to be positive. A intuitive example is that suppose all are equal and , which means the prosumers are required to produce less (or consume more). If there is no congestion, it is easy to prove that . At this time, a positive can be regarded as selling a positive load to other prosumer, and it is reasonable that it gets money from the platform.
IiD Energy Sharing as A Generalized Nash Game
Given the rule of market clearing, a prosumer can foresee the clearing result and determine the optimal bidding strategy. In particular, the problem of prosumer becomes
(7) 
where the objective function
(8) 
consisting of the disutility and the sharing cost . The constraint in (7) is the energy balancing condition and is the corresponding dual variable. is determined from the sharing market clearing problem (6).
In summary, the game among all prosumers consists of the following elements:
1) the set of prosumers ;
2) action sets ^{1}^{1}1The subscribe means all players in except ,, and strategy space ;
3) Payoff functions .
For simplicity, denote by the abstract form of the sharing game (6)(7). Because the price , which appears in the strategy set , depends on the joint action of other prosumers, the strategy sets , of individual players are correlated. Therefore, the game belongs to the category of GNG. This is different from a standard Nash game in which correlation only appears in the payoff functions.
Iii Equilibrium of the Intuitive Sharing Game
Iiia Generalized Nash Equilibrium
In this subsection, the properties of the equilibrium of the proposed sharing market are revealed. First, the definition of a GNE is given as follows.
Definition 1.
Given the energy production schedule , define
and
we have the following proposition.
Proposition 1.
If the sharing game has an isolated GNE (IGNE, which means that no other GNE exists in a small enough neighborhood of the given GNE), then it is also unique. Denote by the unique IGNE and the corresponding optimal adjustment, then , and is the unique solution of the following optimization problem:
(9a)  
(9c)  
The proof are given in Appendix A. Proposition 1 offers a convenient way to identify the IGNE, if one does exist. In what follows, we discuss the existence of the IGNE.
IiiB Existence of an Isolated Generalized Nash Equilibrium
Unlike a standard Nash game whose equilibrium exists and is unique under certain convexity assumptions, a GNG may possess infinitely much equilibrium which are nonisolated, because the flow limit constraints complicate the problem. A simple example is given below.
Example: Suppose there are two prosumers connecting to the head bus and the tail bus of a line; each of them controls one resource. Let , and then the market clearing problem is
(10a)  
(10c)  
Fix the strategy of prosumer 2, the optimal solution is a function of , which is
(11) 
The first/last one corresponds to the case in which delivered flow reaches lower/upper bound, and flow constraint is inactive in the second one. Then, we solve the equivalent problem (9) considering the following situations:
(1) The network is not congested (constraint (9c) does not influence the optimal solution). The KKT conditions of (9) stipulate
It is easy to check that , which corresponds to the second situation of (11). As a result, the equilibrium is uniquely determined. Actually, when there is no congestion, the sharing market degenerates to the case without network constraints in [28], where the existence and uniqueness of a NE have been proved.
(2) Delivered flow reaches the lower/upper bound, e.g., or , then . The optimal strategy for prosumer 1 is to choose that satisfies , which means . In addition, we can figure out the following relations from the KKT condition
Suppose an IGNE exists, we must have , which means there is no congestion. As a result, there is no IGNE.
But it is worth noting that Any that satisfies , and are GNEs of this sharing game. This observation can be generalized in more general cases.
Proposition 2.
If congestion constraint is redundant, then an IGNE for the sharing game exists; otherwise, there is none or infinitely many nonisolated GNEs.
Proposition 2 is provided in Appendix C, following the proof of Proposition 3. It confirms a negative conclusion that when the network constraints are binding, there is no IGNE. The reason is the market power of prosumers. Nonetheless, the existence of IGNE can be retrieved via a minor modification on the objective function to restrict the market power.
Iv Improved Sharing Mechanism
Before getting into details of the improved energy sharing mechanism, we first give the following lemma.
Lemma 1.
The optimal output of prosumer satisfies
(12) 
Proof.
According to CauchySchwarz Inequality, we have
The equality holds when and only when
. This completes the proof. ∎
To restrain prosumers’ market power, a price regulation procedure is included in Step 2 of the sharing procedure in Section II.C. The ultimate sharing price sent to prosumer is
(13) 
It means that the difference between the sharing price for prosumer and his marginal disutility is restricted. To be specific, when prosumer buys from the sharing market (), the price privilege () he can get from sharing is at most ; when he sells to the sharing market (), the price privilege () he can get from sharing is at most . The maximum price privilege of prosumer is related to the degree of sharing participation reflected by the sharing amount , price sensitivity factor and the number of prosumers .
Under this revamped sharing mechanism, the sharing problem of prosumer becomes
(14a)  
(14b) 
where
(15) 
The total cost is redefined as
and is the solution of problem (6). With this improved sharing mechanism, the existence and uniqueness of GNE are guaranteed by the following proposition.
Proposition 3.
The proof can be found in Appendix B. With the price regulation policy (13), the market equilibrium is well defined and inherits the properties of the original sharing game.
V Properties of the Improved Sharing Mechanism
Va Individual Rationality of Prosumers
After characterizing the GNE, now we can show that every prosumer has the incentive to share by comparing the costs associated with the individual decisionmaking and the GNE. Let be the cost of prosumer at the GNE of sharing game defined by (6) and (14), and the cost of prosumer under individual decisionmaking.
Proposition 4.
The following relation holds
(17) 
The proof can be found in Appendix D. It guarantees that with the proposed mechanism, every prosumer can benefit from sharing, such that a Pareto improvement can be achieved. This satisfies one of the two main concerns for sharing mechanism design stated in Section II.A.
VB Sharing Price
In this subsection, the relationship between the sharing price that clears the market, prosumer’s marginal disutility, and line congestion is revealed.
Proposition 5.
The proof can be found in Appendix E. We can observe that the sharing price for prosumer consists of two parts: the first term corresponds to the marginal cost of energy and is the same for all prosumers; the remaining terms reflect prosumer ’s contribution on line congestion. Such a price exhibits a structure similar to the locational marginal price [29].
Discussion: Another important issue is whether a subsidy is needed to run the platform. The sum of the sharing costs for all prosumers at the equilibrium state is
(18)  
If there is no congestion in the network, then the sum of is equal to zero, which means that the sharing market is selfbalanced economically. In the presence of congestion, after sharing, not only every prosumer is betteroff and a positive payment is given to the sharing platform, which is similar to the renown concept of financial transmission right (FTR) [29].
VC Social Efficiency
According to Proposition 4, the proposed sharing mechanism can improve the efficiency compared with individual decisionmaking. In this subsection, we show that how close is the efficiency of the proposed mechanism compared with the centralized decision making problem:
(19a)  
(19c)  
Definition 2.
(Socially Optimum) is socially optimal if is the unique optimal solution of (19).
Proposition 3 claims that the GNE of the modified sharing game always exists and can be extracted from the optimal solution of problem (16). Problems (16) and (19) seem alike except for the second term in the objective function. This term approaches zero when , and thus problem (16) is identical to the social optimal problem (19). The gap between sharing and the social optimum when is stated in the following proposition.
Proposition 6.
The proof can be found in Appendix F. It declares that the proposed sharing mechanism can approach the social optimum with an increasing number of market participants.
VD Role of Competition
We have shown that social efficiency can be enhanced by employing more prosumers, and thus more resources, without changing the resource endowment of original prosumers. In this part, we consider another situation that the total number of resource is fixed and show that introducing competition can benefit social efficiency.
Let denotes a scenario that there are prosumers and each of them possesses resources, the demand adjustment for them is . Assume that the GNE under scenario is and the corresponding optimal adjustment. We introduce competition in the following way:
The resource prosumer owns is equally distributed to prosumers ( is divisible by ) and the demand adjustment accordingly, and satisfies
After introducing competition, , and . We call the new scenario a equal partition of scenario . With this equal partition rule, we have the following proposition.
Proposition 7.
The proof can be found in Appendix G. It demonstrates that the system is the most efficient when all resources are possessed by one prosumer; otherwise, introducing competition in an equal partition way can reduce the total social cost and thus enhance the social efficiency.
Vi Illustrative Examples
In this section, numerical experiments are presented to illustrate theoretical results. First, a simple case is used to show the basic setup. Then, the impacts of several factors are analyzed, including the impact of network constraints, number of prosumers as well as the role of competition.
Via Benchmark Case
The simplest case with only two prosumers is taken as an illustrative example. Each of them owns one resource and is located at one side of a line. is the resource output of prosumer 1/2. The price sensitivity factor is and the cost coefficients are , . The required demand adjustments are and . First we let which is the case without congestion, and the best response curves of two prosumers are plotted at the left side of Fig. 2. A unique generalized Nash equilibrium and is given by the intersection of two curves. Then we decrease the flow limit and choose , creating a case with congestion. With the intuitive sharing mechanism in Section II, the best response curves are shown in the middle of Fig. 2. Two curves coincide meaning that there are infinity many GNEs but no IGNE. With the improved sharing mechanism in Section IV, the best response curves are drawn in the righthand side of Fig. 2, giving an unique GNE and .
ViB Impact of Flow Limit
In this section, the impact of flow limit is investigated. A simple network with three prosumers, each at one vertex of a triangle, is tested with and . We change the flow limit of all lines simultaneously from 1 to 3.5, the change of nodal prices under social optimal (SCO) and sharing market equilibrium (SMK) as well as the social total costs are shown in Fig. 3. Both social total costs decrease with relaxing flow limit, and their relative differences are all less than 0.008%, showing that the proposed sharing mechanism can achieve a nearoptimal solution, which is efficient. The variances of nodal prices under SCO and SMK decline with a looser restriction on energy flows. Under a specific flow limit, the variance of nodal prices under SMK is smaller than that under SCO, reducing the price discrimination among prosumers.
ViC Impact of the Number of Prosumers
We change the number of prosumers from 2 to 30. The parameters , are randomly chosen and 10 scenarios are tested. The topology of the test system is shown in Fig.4. Average cost gaps between SCO and SMK with different are given in Fig. 5. We can observe that the average total cost under sharing is always larger than that under social optimum, but the gap converges to zero with the increase of .
ViD Impact of Competition
A special case, in which all prosumers own the same number of resources and are split at the same time, is analyzed in Section V, and Proposition 7 asserts that competition helps reducing the social total cost. In this subsection, more general cases are considered. A network with 6 lines and 16 resources is tested. First, we change the flow limit to let each line to be congested onebyone, and then observe how the social total cost will change when competition is introduced to both ends of different lines. The results are shown in Fig. 6. We can find that with the introduction of competition, the total cost always becomes lower. When different lines are congested, the relative relation of introducing competition to different lines remains the same, showing that the position of a line rather than whether it is congested or not is an important factor when we choose where to add competition.
In the second case, competition is added to node sequentially. To eliminate the impact of amplitude, the change of total costs after scaling are presented in Fig.7. Results show a declining trend in the total cost when the resources are distributed among an increasing number of prosumers.
Vii Conclusion
Prosumers endowed with distributed generation facilities are becoming popular recently, inspiring a new paradigm for energy management via a sharing market. A welldesigned sharing mechanism is imperative. This paper comes up with a generic supplydemand function based sharing mechanism considering network constraints and fairness of prices. Price regulation is introduced to restrict market power, ensuring the existence of market equilibrium. Our research discloses some fundamental properties of the sharing mechanism:
1) The improved sharing mechanism can ensure the existence and uniqueness of a GNE; and a Pareto improvement is achieved among prosumers via sharing.
2) The average cost gap between SMK and SCO tends to zero when the number of prosumers approaches infinity.
3) Competition helps reducing the total social cost and one important factor regarding competition is the location of lines.
References
 [1] P. G. Da Silva, D. Ilić, and S. Karnouskos, “The impact of smart grid prosumer grouping on forecasting accuracy and its benefits for local electricity market trading,” IEEE Transactions on Smart Grid, vol. 5, no. 1, pp. 402–410, 2014.
 [2] A. D. Rathnayaka, V. M. Potdar, and S. J. Kuruppu, “An innovative approach to manage prosumers in smart grid,” in 2011 World Congress on Sustainable Technologies (WCST). IEEE, 2011, pp. 141–146.
 [3] S. Cannon and L. H. Summers, “How uber and the sharing economy can win over regulators,” Harvard business review, vol. 13, no. 10, pp. 24–28, 2014.
 [4] G. Zervas, D. Proserpio, and J. W. Byers, “The rise of the sharing economy: Estimating the impact of airbnb on the hotel industry,” Journal of marketing research, vol. 54, no. 5, pp. 687–705, 2017.
 [5] P. Munoz and B. Cohen, “Mapping out the sharing economy: A configurational approach to sharing business modeling,” Technological Forecasting and Social Change, vol. 125, pp. 21–37, 2017.
 [6] M. Cheng, “Sharing economy: A review and agenda for future research,” International Journal of Hospitality Management, vol. 57, pp. 60–70, 2016.
 [7] C. Lam and M. Liu, “More than taxis with an app: How ridehailing platforms promote market efficiency,” 2018.
 [8] Z. Li, Y. Hong, and Z. Zhang, “Do ondemand ridesharing services affect traffic congestion? evidence from uber entry,” Evidence from Uber Entry (August 30, 2016), 2016.
 [9] L. Chen, A. Mislove, and C. Wilson, “Peeking beneath the hood of uber,” in Proceedings of the 2015 Internet Measurement Conference. ACM, 2015, pp. 495–508.
 [10] S. Banerjee, D. Freund, and T. Lykouris, “Multiobjective pricing for shared vehicle systems,” arXiv preprint arXiv:1608.06819, 2016.
 [11] M. Stiglic, N. Agatz, M. Savelsbergh, and M. Gradisar, “The benefits of meeting points in ridesharing systems,” Transportation Research Part B: Methodological, vol. 82, pp. 36–53, 2015.
 [12] Z. Fang, L. Huang, and A. Wierman, “Prices and subsidies in the sharing economy,” Proceedings of the 26th International Conference on World Wide Web, pp. 53–62, 2017.
 [13] N. Liu, X. Yu, C. Wang, and J. Wang, “Energy sharing management for microgrids with PV prosumers: A stackelberg game approach,” IEEE Trans. Ind. Inform, vol. 13, pp. 1088–1098, 2017.
 [14] S. Cui, Y.W. Wang, and N. Liu, “Distributed gamebased pricing strategy for energy sharing in microgrid with pv prosumers,” IET Renewable Power Generation, vol. 12, no. 3, pp. 380–388, 2017.
 [15] N. Liu, M. Cheng, X. Yu, J. Zhong, and J. Lei, “Energy sharing provider for PV prosumer clusters: A hybrid approach using stochastic programming and stackelberg game,” IEEE Trans. Ind. Elec., vol. 65, no. 8, pp. 6740–6750, 2018.
 [16] W. Tushar, B. Chai, C. Yuen, S. Huang, D. B. Smith, H. V. Poor, and Z. Yang, “Energy storage sharing in smart grid: A modified auctionbased approach,” IEEE Transactions on Smart Grid, vol. 7, no. 3, pp. 1462–1475, 2016.
 [17] Z. Fang, L. Huang, and A. Wierman, “Loyalty programs in the sharing economy: Optimality and competition,” arXiv preprint arXiv:1805.03581, 2018.
 [18] Y. Chen, W. Wei, F. Liu, E. E. Sauma, and S. Mei, “Energy trading and market equilibrium in integrated heatpower distribution systems,” IEEE Transactions on Smart Grid, 2018.
 [19] Y. Chen, W. Wei, F. Liu, M. Shafiekhah, S. Mei, and J. P. Catalão, “Optimal contracts of energy mix in a retail market under asymmetric information,” Energy, vol. 165, pp. 634–650, 2018.
 [20] P. Dutta and A. Boulanger, “Game theoretic approach to offering participation incentives for electric vehicletovehicle charge sharing,” Transportation Electrification Conference and Expo (ITEC), 2014 IEEE, pp. 1–5, 2014.
 [21] L. Tang, S. He, and Q. Li, “Doublesided bidding mechanism for resource sharing in mobile cloud,” IEEE Transactions on Vehicular Technology, vol. 66, no. 2, pp. 1798–1809, 2017.
 [22] H. L. Cadre, P. Jacquot, C. Wan, and C. Alasseur, “Peertopeer electricity market analysis: From variational to generalized nash equilibrium,” arXiv preprint arXiv:1812.02301, 2018.
 [23] Y. Chen, W. Wei, F. Liu, Q. Wu, and S. Mei, “Analyzing and validating the economic efficiency of managing a cluster of energy hubs in multicarrier energy systems,” Applied energy, vol. 230, pp. 403–416, 2018.
 [24] L. Makowski and J. M. Ostroy, “Vickreyclarkegroves mechanisms and perfect competition,” Journal of Economic Theory, vol. 42, no. 2, pp. 244–261, 1987.
 [25] P. Chakraborty, E. Baeyens, K. Poolla, P. P. Khargonekar, and P. Varaiya, “Sharing storage in a smart grid: A coalitional game approach,” IEEE Trans. Smart Grid, early access, 2018.
 [26] J. Mei, C. Chen, J. Wang, and J. L. Kirtley, “Coalitional game theory based local power exchange algorithm for networked microgrids,” Applied Energy, vol. 239, pp. 133–141, 2019.
 [27] W. Qi, B. Shen, H. Zhang, and Z.J. M. Shen, “Sharing demandside energy resourcesa conceptual design,” Energy, vol. 135, pp. 455–465, 2017.
 [28] Y. Chen, S. Mei, F. Zhou, S. H. Low, W. Wei, and F. Liu, “An energy sharing game in prosumers based on generalized demand bidding: Model and properties,” arXiv:1904.07829 [math.OC], 2019.
 [29] S. Bose and S. H. Low, “Some emerging challenges in electricity markets,” in Smart Grid Control. Springer, 2019, pp. 29–45.
Appendix A Proof of Proposition 1
Proof.
The KKT condition of the platform’s sharing clearing problem (6) is
(A.1a)  
(A.1b)  
(A.1c)  
(A.1d)  
(A.1e)  
(A.1f) 
After replacing the lowerlevel problem with its KKT condition, the prosumer ’s problem comes down to a mathematical program with equilibrium constraints (MPEC). The sharing game (6)(7) renders an equilibrium problem with equilibrium constraints (EPEC), and is a strong stationary point of the EPEC if for each , is a strong stationary point for the MPEC for prosumer with fixed , and satisfies the following KKT conditions.
(A.2a)  
(A.2b)  
(A.2c)  
(A.2d)  
(A.2e)  
(A.2f)  
(A.2g)  
(A.2h)  
(A.2i)  
(A.2j)  
(A.2k)  
(A.2l)  
(A.2m)  
(A.2n)  
(A.2o)  
(A.2p)  
(A.2q) 
Together with the balancing constraint in (7) and (A.1). Here, the sets , , and are defined as
A stationary point of the EPEC problem (6)(7) corresponds to an isolated GNE of the sharing game. However, even though the KKT condition (A.2) is not met, it is still possible that is a GNE, but not an isolated one.
The KKT condition of problem (9) is
(A.3a)  
(A.3b)  
(A.3c)  
(A.3d) 