{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,6,3]],"date-time":"2026-06-03T15:41:30Z","timestamp":1780501290239,"version":"3.54.1"},"reference-count":36,"publisher":"Frontiers Media SA","license":[{"start":{"date-parts":[[2026,1,8]],"date-time":"2026-01-08T00:00:00Z","timestamp":1767830400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":["frontiersin.org"],"crossmark-restriction":true},"short-container-title":["Front. Blockchain"],"abstract":"<jats:p>The static and hard-coded logic of smart contracts in Decentralized Finance (DeFi) platforms significantly limits their adaptability in dynamic and volatile market environments. To address this challenge, we propose a novel hyper-heuristic driven framework that enables real-time rule optimization within smart contracts, thereby enhancing responsiveness, gas efficiency, and operational robustness. The framework features a two-layer architecture: a reinforcement learning-based high-level controller selects appropriate low-level rule heuristics from a domain-specific library based on evolving transaction contexts and on-chain data. Implemented and evaluated on Uniswap v2 and Aave v3 protocols, the system dynamically optimizes parameters such as slippage tolerance, gas usage thresholds, and loan-to-value ratios. Experimental results on real-world datasets show significant performance improvements, including a 45.6% increase in transaction success rate, 28.3% reduction in average gas consumption, and 38.4% drop in liquidation events under market stress scenarios. This research demonstrates the feasibility and advantages of embedding intelligent, adaptive decision-making mechanisms within DeFi smart contracts, opening new pathways toward autonomous, resilient, and regulation-aligned blockchain systems.<\/jats:p>","DOI":"10.3389\/fbloc.2025.1730114","type":"journal-article","created":{"date-parts":[[2026,1,8]],"date-time":"2026-01-08T06:37:15Z","timestamp":1767854235000},"update-policy":"https:\/\/doi.org\/10.3389\/crossmark-policy","source":"Crossref","is-referenced-by-count":1,"title":["Hyper-heuristic driven smart contracts for DeFi: a framework for dynamic rule optimization and adaptive executions"],"prefix":"10.3389","volume":"8","author":[{"given":"Kassem","family":"Danach","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Hassan","family":"Rkein","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Ahmad","family":"Farroukh","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Ziad E. L.","family":"Balaa","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Samir","family":"Haddad","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1965","published-online":{"date-parts":[[2026,1,8]]},"reference":[{"key":"B1","doi-asserted-by":"publisher","first-page":"125","DOI":"10.5121\/csit.2017.71011","article-title":"Blockchain\u2013based smart contracts: a systematic mapping study,\u201d in Proceeding 4th International Conference Computer Science & Information Technology (CS & IT)","author":"Alharby","year":"2017"},{"key":"B2","doi-asserted-by":"publisher","first-page":"81234","DOI":"10.1109\/ACCESS.2023.3299803","article-title":"A deep reinforcement learning hyper-heuristic framework for energy-aware task scheduling in iot-edge environments","volume":"11","author":"Alzamili","year":"2023","journal-title":"IEEE Access"},{"key":"B3","first-page":"164","article-title":"A survey of attacks on ethereum smart contracts (sok)","author":"Atzei","year":"2017"},{"key":"B4","unstructured":"Chainlink 2.0: next steps in the evolution of decentralized oracle networks\n          \n          \n            \n              Breidenbach\n              B.\n            \n            \n              Nazarov\n              S.\n            \n            \n              Ellis\n              A. J.\n            \n          \n          \n          2021"},{"key":"B5","doi-asserted-by":"publisher","first-page":"1695","DOI":"10.1057\/jors.2013.71","article-title":"Hyper-heuristics: a survey of the state of the art","volume":"64","author":"Burke","year":"2013","journal-title":"J. Operational Res. Soc."},{"key":"B6","doi-asserted-by":"publisher","first-page":"e0231192","DOI":"10.1371\/journal.pone.0231192","article-title":"Topics and trends in artificial intelligence assisted human brain research. PLoS ONE","volume":"15","author":"Chen","year":"2020"},{"key":"B7","first-page":"457","article-title":"Hyperheuristics: an emerging direction in modern search technology","volume-title":"Handbook of metaheuristics","author":"Cowling","year":"2001"},{"key":"B8","volume-title":"Hyperheuristics in logistics","author":"Danach","year":"2016"},{"key":"B9","doi-asserted-by":"publisher","DOI":"10.1109\/dapps49028.2020.00001","article-title":"\u201cTokens, types, and standards: Identification and utilization in Ethereum,\u201d in Proceedingd 2020 IEEE International Conference Decentralized Applications and Infrastructures (DAPPS), Oxford, UK, 1","author":"Di Angelo","year":"2020"},{"key":"B10","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.1702.08780","article-title":"Security analysis of smart contract programming languages","author":"Dika","year":"2017","journal-title":"arXiv Preprint arXiv:1702.08780"},{"key":"B11","article-title":"A survey of vulnerabilities in ethereum smart contracts","author":"Dingman","year":"2019"},{"key":"B12","first-page":"530","article-title":"Empirical review of automated analysis tools on 47,587 ethereum smart contracts","author":"Durieux","year":"2020"},{"key":"B13","article-title":"Solidifi: a framework for evaluating the performance of smart contract static analysis tools","author":"Ghaleb","year":"2022"},{"key":"B14","doi-asserted-by":"publisher","DOI":"10.1016\/j.frl.2022.103204","article-title":"Defi risk management: incentive-aligned insurance using on-chain metrics","author":"Ghosh","year":"2022","journal-title":"Finance Res. Lett."},{"key":"B15","doi-asserted-by":"publisher","first-page":"243","DOI":"10.1007\/978-3-319-89722-6_10","article-title":"A semantic framework for the security analysis of ethereum smart contracts","author":"Grishchenko","year":"2018","journal-title":"Princ. Secur. Trust (POST)"},{"key":"B16","article-title":"Decentralized governance in defi: principles and challenges","author":"Gudgeon","year":"2020"},{"key":"B17","article-title":"A survey on smart contract security: vulnerabilities, countermeasures and tools","author":"Huang","year":"2019"},{"key":"B18","doi-asserted-by":"publisher","DOI":"10.2139\/ssrn.4126056","article-title":"The collapse of terra-luna: algorithmic stablecoins and market vulnerabilities","author":"Kang","year":"2023","journal-title":"J. Financial Risk Manag."},{"key":"B19","doi-asserted-by":"publisher","first-page":"841","DOI":"10.1016\/j.future.2017.08.020","article-title":"A survey on the security of blockchain systems","volume":"107","author":"Li","year":"2020","journal-title":"Future Gener. Comput. Syst."},{"key":"B20","first-page":"254","article-title":"Making smart contracts smarter","author":"Luu","year":"2016"},{"key":"B21","doi-asserted-by":"publisher","first-page":"2337","DOI":"10.1016\/j.tele.2018.10.004","article-title":"Smart contract applications within blockchain technology: a systematic mapping study","volume":"35","author":"Macrinici","year":"2018","journal-title":"Telematics Informatics"},{"key":"B22","first-page":"173","article-title":"Security analysis of smart contract-based blockchain systems: a systematic literature review","author":"Praitheeshan","year":"2019"},{"key":"B23","first-page":"3","article-title":"Attacking the defi ecosystem with flash loans for fun and profit","author":"Qin","year":"2021"},{"key":"B24","article-title":"A systematic literature review of smart contract security vulnerabilities and analysis methods","author":"Rameder","year":"2021"},{"key":"B25","doi-asserted-by":"publisher","DOI":"10.28924\/jcaa\/33-2024-6","article-title":"Decentralized finance (defi) risk management using explainable ai and blockchain transparency","volume":"33","author":"Rkein","year":"2024","journal-title":"J. Comput. Analysis and Appl."},{"key":"B26","doi-asserted-by":"publisher","first-page":"1977","DOI":"10.1109\/COMST.2020.2975999","article-title":"Exploring the attack surface of blockchain: a comprehensive survey","volume":"22","author":"Saad","year":"2020","journal-title":"IEEE Commun. Surv. and Tutorials"},{"key":"B27","doi-asserted-by":"publisher","first-page":"24416","DOI":"10.1109\/access.2020.2970495","article-title":"Smart contract: attacks and protections","volume":"8","author":"Sayeed","year":"2019","journal-title":"IEEE Access"},{"key":"B28","doi-asserted-by":"publisher","first-page":"153","DOI":"10.20955\/r.103.153-74","article-title":"Decentralized finance: on blockchain-and smart contract-based financial markets","volume":"103","author":"Sch\u00e4r","year":"2021","journal-title":"Fed. Reserve Bank St. Louis Rev."},{"key":"B29","doi-asserted-by":"publisher","first-page":"22929","DOI":"10.1109\/ACCESS.2021.3055262","article-title":"Smart contract vulnerability detection: a survey","volume":"9","author":"Tang","year":"2021","journal-title":"IEEE Access"},{"key":"B30","first-page":"12","article-title":"Vulnerability detection in ethereum smart contracts using ensemble learning","author":"Tantikul","year":"2020"},{"key":"B31","doi-asserted-by":"publisher","first-page":"1","DOI":"10.1007\/s10479-020-03625-5","article-title":"Swarm intelligence-based hyper-heuristic for the vehicle routing problem with prioritized customers","volume":"308","author":"Tarhini","year":"2022","journal-title":"Ann. Operations Res."},{"key":"B32","doi-asserted-by":"publisher","first-page":"2825","DOI":"10.1109\/access.2020.2970495","article-title":"Learning to adapt smart contract parameters in defi protocols","volume":"19","author":"Wang","year":"2022","journal-title":"IEEE Trans. Netw. Serv. Manag."},{"key":"B33","article-title":"Sok: decentralized finance (defi)","author":"Werner","year":"2021"},{"key":"B34","doi-asserted-by":"publisher","first-page":"100362","DOI":"10.1016\/j.cosrev.2021.100362","article-title":"Smart contract applications within blockchain technology: a systematic mapping study","volume":"39","author":"Xu","year":"2021","journal-title":"Comput. Sci. Rev."},{"key":"B35","first-page":"270","article-title":"Town crier: an authenticated data feed for smart contracts","author":"Zhang","year":"2020"},{"key":"B36","doi-asserted-by":"publisher","first-page":"54441","DOI":"10.1109\/ACCESS.2020.2987807","article-title":"A comprehensive survey of smart contract security: issues, vulnerabilities and solutions","volume":"8","author":"Zhu","year":"2020","journal-title":"IEEE Access"}],"container-title":["Frontiers in Blockchain"],"original-title":[],"link":[{"URL":"https:\/\/www.frontiersin.org\/articles\/10.3389\/fbloc.2025.1730114\/full","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,1,8]],"date-time":"2026-01-08T06:37:25Z","timestamp":1767854245000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.frontiersin.org\/articles\/10.3389\/fbloc.2025.1730114\/full"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,1,8]]},"references-count":36,"alternative-id":["10.3389\/fbloc.2025.1730114"],"URL":"https:\/\/doi.org\/10.3389\/fbloc.2025.1730114","relation":{},"ISSN":["2624-7852"],"issn-type":[{"value":"2624-7852","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,1,8]]},"article-number":"1730114"}}