ABSTRACT Cooperative power-sharing (CPS) is one of the cutting-edge power management strategies the power system planners contemplate transforming from its traditional structure to a more decentralized framework as the globe prepares for a future with low carbon emissions. Cooperative microgrids are considered one of the future power system configurations where individual microgrids (MGs) can support each other through CPS. This paper introduces a decentralized energy market (DEM) to operate CPS hierarchically between MGs, groups of MGs, and the utility grid. The security of power-sharing transactions and the privacy of MGs pose challenges in terms of confidentiality and data integrity. To deal with these issues, a DEM framework based on distributed ledger technology (DLT) is proposed to ensure power transactions between cooperative MGs with a guarantee. A scheme is built on the Ethereum testnet to estimate the performance and validation of the proposed smart contracts. A case study with actual data for a group of four MGs is presented to validate the effectiveness of the proposed framework. The proposed blockchain approach results in money transactions resulting in MG1 receiving $485; while MG2 gets $525, MG3 and MG4 generates a revenue of $435 and $362.5 respectively. The numerical results demonstrate that MGs can actively share power with peers and achieve economic benefits.