In the deregulated electricity markets, trading prices are determined by the offer-demand mechanism, and retail consumers can negotiate tariffs with their supplier of choice. For classic wholesale suppliers, the tariffs are determined by the prices of transactions performed on the wholesale market. In parallel with becoming eligible for participating in the market, the consumers use increasingly local generation sources based mostly on renewable electricity generation equipment such as Photovoltaic (PV) panels, and become prosumers. They want to be able to sell back to the market the generation surplus, in order to obtain the maximum benefits from their initial investment. This paper proposes a two-tier local market model oriented for prosumers and consumers connected in microgrids, based on the blockchain technologies and other technologies and concepts such as smart grids, crowdsourcing and energy poverty. Its goals are to improve the possibilities of local prosumers to sell electricity to local consumers and to increase their profitability, compared to the trading model often used in developing markets, of selling the surplus back to the grid via aggregators. The research aims to contribute to the sustainable development of the electricity sector using new and renewable sources of energy, state-of the art technologies and smart contracts, leading to prosumer proliferation and electricity cost reduction for consumers.