Abstract-A novel distributed energy allocation mechanism for distribution system operator (DSO) market through a bilevel iterative auction is proposed. With the locational marginal price known at the substation node, the DSO runs an upper level auction with aggregators as intermediate agents competing for energy. This DSO level auction takes into account physical grid constraints such as line flows, transformer capacities and node voltage limits. This auction mechanism is a straightforward implementation of projected gradient descent on the social welfare (SW) of all home level agents. Aggregators, which serve home level agents -both buyers and sellers, implement lower level auctions in parallel, through proportional allocation of power, until market equilibrium is established. This is accomplished without asking for the agents' utility functions and generation capacities that are considered private information. The overall bilevel auction is shown to be globally efficient and weakly budget balanced.Index Terms-distribution system; agents; trading; auction; bid; social welfare I. INTRODUCTION HE proliferation of renewable energy resources (RES) at the distribution level is reshaping the market structure of distribution system operators (DSO). The electricity sector has devolved from a highly regulated system operated by vertically integrated utilities to a relatively decentralized system based more fully on market valuation and allocation mechanisms [1]. A RES owner with a surplus of energy is anticipated to participate in such mechanisms more strategically while seeking profit [2], [3]. Specifically, it sells energy with the objective of maximizing its payoff, i.e. the sum of the monetary gain from supplying an amount of energy and utility it gains from retaining any surplus energy that is not traded. In a similar manner, the payoff of an energy consumer, i.e. a buyer, is the difference between its utility gained from consuming energy and the cost of procuring that energy.DSOs on the other hand, are expected to leverage the available local resources in order to capture additional value by optimizing the system for least cost operation while maintaining the physical system operation constraints [4]. One of the key challenges for efficient energy distribution mechanisms is its design to motivate active participation of customers [5]. Without their participation, the benefits of smart grid is not fully realized [6]. Therefore, suitable mechanisms for it to operate effectively within its physical constraints, while incentivizing customer participation, are needed.The existing literature on the energy grid focuses mostly on pricing based on the distribution locational marginal price (DLMP) that is defined as the marginal cost of serving the next increment of the electrical demand at a distribution node. DLMP is typically determined in a centralized fashion by the Lagrange multiplier of the distribution node energy balance constraint [7]-[12]. It has been shown in [13] that introducing price responsive customers caus...