HydraChain: A Cooperative MAPPO Architecture for Load Balancing in IoT Sharding Blockchain

Juncheng Ma, Xiulong Liu, Hao Xu, Dengcheng Hu, Gaowei Shi, Liyuan Ma, Keqiu Li · IEEE Internet of Things Journal · 2025

Sharding has become a significant approach to enhance blockchain scalability. However, existing sharding techniques applied in IoT scenarios suffer from transaction congestion due to imbalanced distribution of transactions across shards, which hinders intra-shard transaction processing capacity. To overcome the above problems, this paper proposes HydraChain for IoT scenarios, the first multi-agent reinforcement learning based sharding blockchain system with account graph relationships, for a throughput improvement of shards under realtime load balancing. Agents collaborate by sharing information and jointly optimizing decisions, enhancing the accuracy and efficiency of the decision-making process. We first construct a sharding blockchain environment integrated with an embedded graph encoder. Concurrently, we propose a SG-MAPPO multiagent model with decoder, which enables agents to cooperatively learn to optimize account allocation strategies based on real-time shard load and global system information. When implementing HydraChain, we address two technical challenges: (i) to extract granular behavioral features from accounts with diverse and time-varying patterns, we design a graph data encoder, which constructs a graph network based on transactional relationship; and (ii) to ensure real-time load balancing under the constraints of dynamic transaction patterns, we propose a multi-agent model (SG-MAPPO), which matches graph encoding features within the environment. Our approach leverages the ability of multi-agent model to collaborate and adapt to the changing environment, enabling efficient resource allocation and improved system performance. Moreover, we implement HydraChain and conduct experiments on a high-performance server equipped with 48 cores and 125GB of memory. Our comprehensive experiments, comparing HydraChain with DQN-Based, SAC-Based and SPRING, reveal that our solution outperforms state-of-theart solutions by achieving a notable 22% increase in transaction throughput and a 5.2% reduction in workload imbalance across shards.

Read the paper · More papers on PaperTik