The direct purchase of electricity by large users is an important part of the reform of the electricity market, and the development of renewable energy has led to a trend of decentralization on the supply side. Blockchain, as an emerging distributed database technology, has a good application prospect in the context of the current energy Internet construction. The article first introduces the principle of blockchain technology in detail, and analyzes its application value in electricity trading. Starting from the traditional direct purchase transaction model, a framework for direct purchase of electricity for large users is proposed. Combining the characteristics of direct power purchase transactions, the distributed consensus mechanism is researched and improved, the smart contract is designed in combination with the transaction process, and the communication protocol and interaction relationship at each level are analyzed from the overall system architecture. Finally, the performance of the system in practical application is analyzed in the laboratory environment, and it provides ideas for follow-up research