Proliferation of private distributed energy resources (DERs) necessitates devising effective energy management frameworks. This paper aims at establishing a decentralized model for the optimal dispatch of DERs in smart grids. The objective function is to minimize expected procurement cost of demand while profit of private DER owners is not sacrificed. Unit management modules (UMMs) embedded in private DERs and a central agent are autonomous agents of the model. The approach is iterative. In each iteration, the central agent announces to UMMs its procurement strategy, which contains purchased powers and their prices. Then, UMMs optimize and send back their output power and selling price proposals in the hope of achieving higher profits. The energy service provider (ESP) gathers the bids and modifies the procurement strategy whenever bids are in line with the cost minimization objective. The service provider releases the last procurement strategy in response to which UMMs synchronously update and send back their bids. The mutual interaction between UMMs and ESP is continued to the point in which no further modification in ESP's procurement strategy is experienced. The effectiveness of the proposed algorithm is demonstrated by its implementation in a system with a few DERs from different types.