Blockchain technology can provide inherent anonymity to all parties to a transaction; in other words, the nodes in the blockchain are all peers. The use of hash-value addresses as unique identifiers on the blockchain, while ensuring privacy, may pose challenges in facilitating seamless data flow between these parties. Decentralized Identifiers (DIDs) have emerged as a crucial solution to address identity concerns within decentralized blockchain systems [9]. DIDs play a pivotal role in minimizing the risk of user credential exposure by furnishing relevant contextual information based on the specific information that needs to be disclosed. In our innovative solution, DIDs are employed to establish and verify both user and data identities. In order to offer greater flexibility, users have the option to deploy smart contracts for the transaction of data rights and reduce the need for direct data delivery. This forward-thinking approach, facilitated by federated learning [10], introduces a dynamic paradigm for the exchange of data rights. The blockchain serves as a comprehensive repository, where all transaction and storage information can be seamlessly queried, contributing to the overall traceability of IoT data [11]. This not only fortifies transparency but also establishes a foundation for building trust within the intricate ecosystem of IoT data transactions. Building upon prior research findings, we present an innovative framework dedicated to the secure management and transaction of IoT data based on blockchain technology. Our platform is designed to capitalize on the distinctive features of blockchain, creating an IoTdata trading system that facilitates transactions involving data sourced from the IoT devices and sensors. Our system empowers individuals to acquire data from diverse IoT sources, ensuring both the secure transmission of data and the execution of payments through peer-to-peer (P2P) transactions. The proposed system is able to allow users to upload summaries of data to the blockchain, providing them with a way to generate revenue. According to the relevant mechanisms of blockchain technology, the integrity of transaction data is guaranteed, and trust and reliability are promoted. The addition of smart contracts further improves the efficiency of transactions on the blockchain, simplifying the process and enhancing the user experience. The following sections of this article are as follows: First, we introduce the technologies involved in the system we designed, including analyzing the inherent advantages and disadvantages of these technologies to understand their implications. Next, we explained our system design, including the overall architecture, the blockchain composite layer, and the complex data transaction process. Following that, the practical implementation of our proposed system is introduced, along with the testing of relevant parameters. It also includes discussion and analysis of the survey results. Finally, a summary of this paper is provided, along with suggestions for future research. This systematic approach ensures a structured and informative exploration of our technical efforts, system design, implementation, and future avenues of exploration.