When we first set out to build our SDK, we had a clear goal: to make blockchain development as accessible as possible for developers, particularly those without any prior web3 experience. By abstracting away all aspects of web3, including tokens, contracts, and transaction building, we aimed to lower the barrier to entry and empower developers to build seamlessly without needing to understand the intricacies of the blockchain ecosystem. However, after working closely with early partners like Orb, open-source contributors, and a growing community of developers, we discovered something surprising: most developers using our SDK were already comfortable with foundational web3 concepts. They understood tokens, contracts, and the basics of transaction construction. This realization prompted us to reevaluate our approach and rethink our design choices.
In our initial design, we aimed to shield developers from the complexities of web3 entirely. To handle transaction-building logic, we performed numerous RPC calls to fetch details like:
Token decimals
EIP-712 version, salt, etc.
This approach worked well to simplify the process for a theoretical developer with no web3 familiarity. However, it came with significant trade-offs, particularly for mobile, which is a core focus of our SDK. In addition to the technical tradeoffs, developers without interest in web3 never proved to be a valid archetype, so the need for all web3 to be hidden was unnecessary.
Mobile environments are inherently more resource-constrained than desktop or server setups. Our reliance on RPC calls introduced several issues:
Higher Latency: Each additional RPC call increases the time it takes to construct a transaction.
Increased Failure Rates: Mobile networks are less reliable, making repeated calls more prone to timeouts or errors.
Resource Consumption: RPC calls require more bandwidth and processing power, which can be taxing for mobile devices and degrade the user experience.
While these trade-offs might be acceptable in some environments, they are particularly problematic for mobile end users, where performance and handling unreliability networks are critical.
Recognizing these challenges, we decided to pivot our approach. Instead of dynamically fetching transaction configuration details through RPC calls, we now pre-bake this data at build or compile time. By embedding necessary transaction configuration directly into the SDK, we dramatically reduced the number of required RPC calls. This shift provides several key benefits:
Improved Performance: With fewer RPC calls, transactions are constructed faster, improving the user experience.
Increased Reliability: Reducing dependency on external calls minimizes the risk of network-related failures.
Optimized for Mobile: Lower resource consumption makes our SDK more efficient for mobile devices, where every byte and millisecond counts.
Importantly, this change does not introduce additional risk. Blockchain contracts are immutable, meaning that values like token decimals or contract-specific configurations are static and will not change unexpectedly. This ensures that the pre-baked configuration remains valid across deployments.
While most developers are comfortable managing web3 configurations, we recognize that some might still need assistance. To support these users, we’ve built a suite of web tools that help generate the required configuration objects for their specific tokens, contracts, and other parameters. These tools provide the best of both worlds: enabling developers to dive deep into web3 when needed while maintaining the simplicity and efficiency of our SDK.
This journey has been an invaluable learning experience. By initially optimizing for accessibility and later iterating based on real-world feedback, we’ve refined our SDK to better serve the needs of our users. Our new approach balances simplicity with performance, ensuring that developers can build powerful mobile web3 applications without compromising on speed, reliability, or resource efficiency. We’re excited to see what the community builds with this improved SDK and look forward to continuing to iterate and evolve based on your feedback. Let us know your thoughts and how we can further enhance your development experience!
RallyProtocol is an open and permissionless onchain mobile toolkit that features embedded wallets and gasless transactions. Our mission is to enable developers to create seamless, end-to-end onchain experiences for native mobile apps while ensuring self-custody, security, and full developer sovereignty. Whether you're building an iOS or Android app in Flutter, Unity, React Native, Expo, Swift, or Kotlin, our tools empower developers to create better onchain mobile experiences quickly and easily.
Want to learn more? Dive into our developer documentation here.