ResearchTrend.AI
  • Papers
  • Communities
  • Events
  • Blog
  • Pricing
Papers
Communities
Social Events
Terms and Conditions
Pricing
Parameter LabParameter LabTwitterGitHubLinkedInBlueskyYoutube

© 2025 ResearchTrend.AI, All rights reserved.

  1. Home
  2. Papers
  3. 2504.05509
19
0

Secure Smart Contract with Control Flow Integrity

7 April 2025
Zhiyang Chen
Sidi Mohamed Beillahi
Pasha Barahimi
Cyrus Minwalla
Han Du
A. Veneris
Fan Long
ArXivPDFHTML
Abstract

Smart contracts power decentralized financial (DeFi) services but are vulnerable to complex security exploits that can lead to significant financial losses. Existing security measures often fail to adequately protect these contracts due to the composability of DeFi protocols and the increasing sophistication of attacks. Through a large-scale empirical study of historical transactions from the 30 hacked DeFi protocols, we discovered that while benign transactions typically exhibit a limited number of unique control flows, in stark contrast, attack transactions consistently introduce novel, previously unobserved control flows. Building on these insights, we developed CrossGuard, a novel framework that enforces control flow integrity in real-time to secure smart contracts. Crucially, CrossGuard does not require prior knowledge of specific hacks; instead, it dynamically enforces control flow whitelisting policies and applies simplification heuristics at runtime. This approach monitors and prevents potential attacks by reverting all transactions that do not adhere to the established control flow whitelisting rules. Our evaluation demonstrates that CrossGuard effectively blocks 28 of the 30 analyzed attacks when configured only once prior to contract deployment, maintaining a low false positive rate of 0.28% and minimal additional gas costs. These results underscore the efficacy of applying control flow integrity to smart contracts, significantly enhancing security beyond traditional methods and addressing the evolving threat landscape in the DeFi ecosystem.

View on arXiv
@article{chen2025_2504.05509,
  title={ Secure Smart Contract with Control Flow Integrity },
  author={ Zhiyang Chen and Sidi Mohamed Beillahi and Pasha Barahimi and Cyrus Minwalla and Han Du and Andreas Veneris and Fan Long },
  journal={arXiv preprint arXiv:2504.05509},
  year={ 2025 }
}
Comments on this paper