All news
Articlestellar.expertOrbitLens3d ago

Radically shrinking Soroban smart contract memory allocation

Every Soroban contract reserves 1 MiB of stack memory by default but rarely uses more than 1 KiB. Stellar Expert's WASM Stack Estimator tool analyzes compiled contracts to measure actual stack usage and shows how to optimize it, saving developers transaction fees and enabling deeper call chains.

Developer ToolsDevelopersSmart Contracts
Lumen Loop's take

Soroban contracts compiled from Rust allocate 1 MiB of stack by default, yet analysis of real contracts shows they typically need less than 1 KiB. The WASM Stack Estimator, built by Stellar Expert, reads compiled contracts and measures peak stack usage, revealing how much developers are overpaying in transaction fees for unused memory. The tool runs in the browser and from the command line, providing a detailed breakdown of which functions use the most stack and suggesting an optimized allocation. For developers, this means shipping more efficient contracts: instead of 17 memory pages per invocation, optimized contracts fit into a single 64 KiB page, dramatically reducing per-call costs and enabling more subinvocations without hitting resource limits.

Mentioned projects
2 projects linked
S
Stellar ExpertInfrastructure & Services
Block ExplorerAnalytics

StellarExpert is a comprehensive block explorer and analytics platform for the Stellar Network, providing detailed statistics, p…

View →
X
XOXNOFinancial Protocols
SCF
DeFiLending & BorrowingBridge

XOXNO is an enterprise-grade decentralized lending protocol built on Stellar's Soroban smart contract platform. It opens up adva…

View →