Smart Contracts in Healthcare: Practical Defences Against Cross-Contract Reentrancy Attacks
摘要
This research is a comprehensive analysis of cross contract reentrancy vulnerabilities in blockchain based healthcare data management systems and their systematic mitigation through advanced security patterns. This project is a demonstration of an interoperable dual smart contract system consisting of Patient and Doctor contracts which also demonstrates successful attack scenarios where malicious Doctor contracts inject corrupted data into Patient records. This research implements and validates multiple mitigation strategies, including OpenZeppelin’s ReentrancyGuard pattern, mutex-based state management, and the Checks-Effects-Interactions pattern. A comprehensive security analysis using Slither static analysis and Mythril dynamic testing which validates the effectiveness of implemented protections, achieving prevention of reentrancy attacks while maintaining functional cross-contract interoperability. The research provides a practical insight and a reproducible framework for developing secure, healthcare solutions on decentralized platforms.