Context
The SubTrackr Soroban smart contracts handle high-frequency subscription operations where gas costs directly impact user transaction fees and contract sustainability. Currently, there is no automated mechanism to detect gas regressions or visualize gas cost trends per contract function across commits.
\
\
Current Limitation
\
- No CI gate for gas cost regressions in contract deploys
\
- Gas profiles are manually checked during audit only
\
- No per-function gas attribution or historical trending
\
- Gas-intensive operations (batch billing, proration) lack optimization benchmarks
\
\
Expected Outcome
An automated gas profiling pipeline integrated into CI that benchmarks each contract function, tracks historical gas trends, flags regressions exceeding configurable thresholds, and generates stratified call trees identifying optimization opportunities.
\
\
Acceptance Criteria
\
\
Technical Scope
\
- Files:
contracts/subscription/src/ (all contract modules), contracts/Cargo.toml, .github/workflows/ci.yml, scripts/gas-benchmark.sh
\
- APIs: Soroban SDK cost_utils, Stellar RPC simulateTransaction
\
- Edge cases: Gas cost variance across different Stellar network conditions, large batch operations vs single operations, storage access pattern optimization
Context
The SubTrackr Soroban smart contracts handle high-frequency subscription operations where gas costs directly impact user transaction fees and contract sustainability. Currently, there is no automated mechanism to detect gas regressions or visualize gas cost trends per contract function across commits.
\
\
Current Limitation
\
\
\
\
\
\
Expected Outcome
An automated gas profiling pipeline integrated into CI that benchmarks each contract function, tracks historical gas trends, flags regressions exceeding configurable thresholds, and generates stratified call trees identifying optimization opportunities.
\
\
Acceptance Criteria
\
\
\
\
\
\
\
\
\
Technical Scope
\
contracts/subscription/src/(all contract modules),contracts/Cargo.toml,.github/workflows/ci.yml,scripts/gas-benchmark.sh\
\