With the increasing popularity of renewable energy, its inherent uncertainty makes the development of energy storage technology in power system inevitable. At present, the value of energy storage has not been fully released due to the following two problems: 1) unreasonable allocation of energy storage demands and resources; 2) lack of energy storage sharing mechanism. In view of the above limitations, this paper designs a blockchain-based energy storage sharing mechanism. A bidding model is established to optimize the bidding strategy of energy storage equipment in the joint market of energy, frequency and flexible slope products. On this basis, a peer-to-peer (P2P) sharing energy storage mechanism based on blockchain is proposed to realize trusted and transparent transactions. In addition, this paper involves a smart contract to automatically verify the ability of each trading entity to provide sufficient energy storage services. The simulation results on the Substrate private blockchain verify the effectiveness of the proposed mechanism.