Automated Mechanism to Support Trade Transactions in Smart Contracts with Upgrade and Repair
Smart contracts often suffer from execution interruptions due to unforeseen events, undermining reliability and availability in decentralized trade applications. Method: This paper proposes a maintainable trade contract framework supporting dynamic hot upgrades and fault-driven automatic repair. It integrates the proxy pattern (EVM-compatible chains), formal verification (Certora), runtime state snapshotting, and differential patch injection to enable atomic, non-disruptive updates and precise repairs. Contribution/Results: To the best of our knowledge, this is the first work to jointly integrate dynamic hot upgrading and fault-aware automatic repair within trade contract systems—ensuring backward compatibility and transactional consistency. Evaluation on the Ethereum testnet shows a 99.98% transaction success rate, upgrade latency under 1.2 seconds, average repair time of 3.7 seconds, and zero-downtime remediation of 12 representative vulnerabilities—significantly enhancing security, robustness, and continuous availability of on-chain trade contracts.