The Stellar community is buzzing about the launch of the Soroban smart contracts platform, a milestone that marks a new era for the Stellar ecosystem.
The phased rollout details the integration of smart contracts, promising to revolutionize the way we engage with the Stellar network.
In the wake of this thrilling development with Soroban, my curiosity was piqued to explore the interplay between classic Stellar assets and the emergent smart contract-based tokens.
Classic assets, which form the cornerstone of the Stellar network, are now poised for enhanced utility through Stellar Asset Contracts (SAC).
This innovative SAC framework, as elaborated in the Soroban documentation, enables the integration of classic assets into the Soroban environment. This integration not only boosts their flexibility and application but also allows these assets to retain all their inherent benefits while operating within a more advanced and versatile framework.
With Soroban set to enhance Stellar capabilities, our team was motivated to experiment. We aimed to assess and compare the performance of classic assets, once wrapped into the SAC, against pure smart contract tokens designed for the Soroban platform.
This wasn’t merely a comparison of efficiency; it was a deep dive into the potential that Soroban holds for the Stellar ecosystem.
The Experiment: Profiling Stellar Classic and Smart Contract Tokens
To gain a deeper understanding of the performance differences between classic Stellar assets and smart contract tokens, we conducted a detailed profiling test.
This test was centered around a freshly wrapped Stellar Asset Contract (SAC) token and a newly deployed token implementation, designed to provide a direct performance comparison.
We employed Stellar Plus v0.4.2 for this experiment, a beta release of an all-in-one library we’re developing at Cheesecake Labs, to help developers build solutions in the Stellar ecosystem with ease, including the new Soroban use cases.
This tool was crucial in ensuring seamless testing and profiling, demonstrating its effectiveness in real-world application scenarios.
Experiment details:
Number of different users: 5 unique user accounts
Total Number of Transactions: Over 600
Environment: Testnet
Types of Transactions: Mint, Burn, and Transfer
Fee management: All network fees are redirected and covered by a central account
For those interested in the technical details, our experiment’s code is open source and available on GitHub.
Additionally, a comprehensive report dashboard on Looker Studio provides a deeper dive into our findings, which can be accessed here.
This experiment was not just a test of efficiency but a practical exploration into the potential synergies and capabilities of classic and smart contract-based tokens within the Stellar ecosystem, utilizing the latest tools and technologies.
Our experiment begins by setting up all necessary accounts from scratch, ensuring a clean and unbiased starting point.
We then proceeded to create a classic token and wrap it into a Stellar Asset Contract (SAC). Additionally, a pure Soroban token was deployed to serve as a comparative asset in our test.
The core of our experiment involved running 100 transactions of each type (Mint, Burn, and Transfer) for both the SAC-wrapped classic token and the pure Soroban token.
During these transactions, we meticulously collected data on resource consumption, duration, and fees charged.
This comprehensive approach allowed us to gain a holistic view of the performance and efficiency of each token type under identical conditions. Also, with the reference implementation mentioned above, it is possible to run the same experiment while applying different parameters.
Using Validation Cloud’s API
An important aspect of our experiment was the use of ValidationCloud’s API as our Remote Procedure Call (RPC) provider.
This choice was pivotal because ValidationCloud is fully integrated into the Stellar Plus library, offering an alternative to the Stellar Development Foundation‘s (SDF) public RPC.
By utilizing ValidationCloud’s API, we were able to ensure a high level of efficiency and reliability in our transaction processing and data collection, further enhancing the robustness of our experimental results.
More information about ValidationCloud can be found here.
Findings: SAC Tokens vs. Pure Soroban Tokens
The results of our experiment were quite revealing. SAC tokens showed a remarkable level of resource efficiency when compared to Soroban tokens.
To illustrate, in terms of CPU instructions, SAC tokens consumed only about 2.19% of the resources that Soroban tokens did. This trend of increased efficiency with SAC tokens was consistent across various metrics, highlighting their potential as a more resource-conscious option in applications.
The standout figures from the test were truly impressive:
97% Less CPU Usage: SAC tokens required significantly less CPU power.
98% Less RAM: They also consumed far less RAM.
47% Lower Fees: The transaction fees for SAC tokens were considerably lower.
Even though the processing time for SAC tokens was on average slightly longer (approx. 5%) the observed slight increase in processing time for SAC tokens, was not indicative of inherent inefficiency but rather a result of network load variations during our tests.
This temporary discrepancy highlighted the importance of test conditions rather than a fundamental difference in performance between Stellar Classic assets wrapped in SAC and pure Soroban tokens.
In reality, when accounting for network conditions, both types of tokens are expected to perform with almost identical efficiency and speed.
The difference in processing time seems to be caused by fluctuations in the load faced by the testnet during the time of the testing. Further testing scenarios will be executed to continue this comparison series and further dive into this kind of results.
Regarding the reduction in resource consumption by the Soroban layer, we can observe that it directly impacts the fees metering system, resulting in even lower fees.
Further testings
This efficiency could have significant implications for developers and users within the Stellar ecosystem, pointing towards a more sustainable and economical use of resources.
Also, the mechanics behind the SAC approach to wrap classic assets ensure the underlying behavior of a classic asset is maintained while adding the flexibility to extend their capabilities to smart contract-based dApps.
This approach underlines Stellar’s unique ability to blend the proven reliability and efficiency of classic assets with the innovative, programmable potential of Soroban smart contracts.
Classic assets are the bedrock of the Stellar network, facilitating a wide range of financial operations with unparalleled stability.
By seamlessly integrating these assets into Soroban through SAC, the ecosystem enhances their utility without compromising on their core advantages, paving the way for their use in more complex, smart contract-driven applications.
The true power of the Stellar ecosystem lies in this synergy between classic assets and Soroban smart contracts. It equips developers with a comprehensive toolkit, combining the best of Stellar’s robust infrastructure with the advanced functionalities of smart contracts.
This harmonious integration not only preserves the integrity and efficiency of classic assets but also leverages Soroban’s cutting-edge capabilities to expand the horizon of possible applications.
Embracing the complementary nature of classic assets and Soroban smart contracts signifies a pivotal evolution for the Stellar ecosystem. It enables a dynamic, flexible development environment that can cater to traditional financial use cases while embracing the complexities of decentralized applications.
As the Stellar network continues to evolve, this integrated approach is expected to spur innovation, offering developers and users alike a richer, more versatile platform.
The fusion of classic assets with Soroban’s smart contract technology heralds a new era of blockchain development within the Stellar ecosystem, promising to unlock exciting opportunities for innovation and growth.
This strategic combination is poised to reinforce Stellar’s position as a leading platform for developing blockchain solutions that are both sophisticated and practical, catering to the ever-expanding needs of the digital economy.
Looking Ahead: The Future of Soroban and Stellar
This experiment marks just the beginning of a fascinating journey into the capabilities of Soroban within the Stellar ecosystem.
As we move through 2024, we expect to witness the Soroban ecosystem mature and evolve, bringing with it new opportunities and advancements.
We’re excited to see how these developments unfold and the impact they will have on the Stellar community. This is a time of significant potential and innovation, and we look forward to being a part of this transformative journey.
With several years of experience in customer services, my background goes through several areas of technical support, from incident handling and real-time support to on-site service delivery and Knowledge Management through the KCS Methodology, as well as project and product management.