Blockchain technology can provide distributed power generation projects and power users with direct trading opportunities, thus promoting distributed power consumption and reducing transaction costs and transaction risks. This study first carries out the design of a blockchain-based distributed power direct transaction process, proposing six steps: transaction application, information sharing, transaction matching, transaction audit, transaction settlement, and transaction completion. Secondly, the smart contract design of the relevant process is carried out, combining the DE-GWO-SVR prediction model, CP-ABE attribute encryption method, k-prototype clustering algorithm, blockchain storage based on location partition, unconsumed output model, consensus group and entropy weight-TOPSIS method for the design of key smart contracts. Finally, the architecture of blockchain-based distributed power direct trading is designed, including the base layer, platform layer, service layer, user layer, and support model.