Curriculum-Guided Reinforcement Learning for Synthesizing Gas-Efficient Financial Derivatives Contracts
Not on the map. Why?
Abstract (arXiv)
Smart contract-based automation of financial derivatives offers substantial efficiency gains, but its real-world adoption is constrained by the complexity of translating financial specifications into gas-efficient executable code. In particular, generating code that is both functionally correct and economically viable from high-level specifications, such as the Common Domain Model (CDM), remains a significant challenge. This paper introduces a Reinforcement Learning (RL) framework to generate functional and gas-optimized Solidity smart contracts directly from CDM specifications. We employ a Proximal Policy Optimization (PPO) agent that learns to select optimal code snippets from a pre-defined library. To manage the complex search space, a two-phase curriculum first trains the agent for functional correctness before shifting its focus to gas optimization. Our empirical results show the RL agent learns to generate contracts with significant gas savings, achieving cost reductions of up to 35.59% on unseen test data compared to unoptimized baselines. This work presents a viable methodology for the automated synthesis of reliable and economically sustainable smart contracts, bridging the gap between high-level financial agreements and efficient on-chain execution.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 7 of its 35 references that are in the map. First posted on arXiv 28 Sep 2025.
Builds on
7 of 35 references.
References · 7
- 2017Proximal Policy Optimization Algorithmscited by 14,441
- 2019Slither: A Static Analysis Framework For Smart Contractscited by 88
- 2019GASOL: Gas Analysis and Optimization for Ethereum Smart Contractscited by 5
- 2025Guiding LLM-based Smart Contract Generation with Finite State Machinecited by 5
- 2024A Reinforcement Learning Environment for Automatic Code Optimization in the MLIR Compilercited by 3
- 2024Semantic Interoperability on Blockchain by Generating Smart Contracts Based on Knowledge Graphscited by 2
- 2025AI4Contracts: LLM & RAG-Powered Encoding of Financial Derivative Contractscited by 2
Built on by
Not cited yet.