The proliferation of Internet of Things (IoT) devices generates vast amounts of data, traditionally stored, processed, and analyzed using centralized systems, making them susceptible to attacks. Blockchain offers a solution by storing and securing IoT data in a distributed manner. However, the low performance and poor scalability of blockchain technology pose significant challenges for its application in IoT networks. The primary obstacle is the distributed consensus protocol, while ensuring data transparency, integrity, and immutability in a decentralized and untrusted circumstances which often compromises scalability. To address this issue, this paper introduces the use of the Delegated Proof of Stake (DPoS) consensus algorithm and sharding techniques to enhance scalability in blockchain-based IoT networks. Experimental results indicate that system throughput increases synchronously with the test load. Our findings reveal a tradeoff between throughput, latency, and up-downstream time on the Inter Planetary File System (IPFS). Given the critical importance of latency and throughput in IoT networks, the results demonstrate that DPoS offers high throughput, parallel processing, and robust security while efficiently scaling the network. Furthermore, at a test load of 500 Transactions Per Second (TPS), the system achieves a maximum throughput of approximately 11.094 ms. However, when the test load exceeds 2000 TPS, the total processing time for transactions extends to 11.205 ms. This method is particularly suitable for constrained IoT networks. Compared to previous edge computing-based approaches, our scheme demonstrates superior throughput performance.