SCF #12
Award Completed
Sorobix
by

An online IDE to compile, deploy, invoke and debug Soroban Smart Contracts on-the-fly using a browser without any local setup!

Awarded
Awarded
Budget request:
$
40,000
*
WebsiteCode

Project Stage

Development

Category

Soroban
Tools
Education & Community

Based in

Team size

3

Active since

Products & Services

What can you do with Sorobix?

  • Deploy Contracts to Futurenet using 0 compute resources of your own
  • No setup required to tryout Soroban
  • Easily write your own smart contracts on our online IDE
  • Build and test out functions written in your contract and easily debug your contract before deploying
  • Deploy contracts to the futurenet with a single click. You don't even need a wallet to deploy on testnet! (We automatically create one and provide the keys to you!)
  • Invoke existing deployed smart contracts using their Contract ID

How does this benefit Soroban/Stellar Ecosystem?

With the launch of Soroban Smart Contracts on the Stellar Network, we expect a huge influx of developers joining the ecosystem to get their hands dirty.

Setting up Rust (the language Soroban Contracts are written in) in a local environment has always been tricky. This has always been a point of friction for first-timers onboarding or trying out the Soroban ecosystem.

This is where Sorobix jumps in. With it’s online IDE capabilities users can quickly write their own smart contracts from the browser itself and also try out pre-written sample codebases provided by the community!

Soroban being at a nascent stage with its FutureNet launch last quarter, we want to scale it together using Sorobix to increase user adoption in the developer community of Soroban and benefit Stellar Network.

Before Sorobix

  • Install Rust on a local system (5mins)
  • Install the wasm32-unknown toolchain for rust (3mins)
  • Install the soroban-cli (10mins)
  • Initialise Cargo Project and Copy starter code from Docs (2mins)
  • Build the Contract (10mins)
  • Deploy/Invoke/Test the Contract (10mins) [Depends on PC Spec]

Total Time Taken: 40mins

After Sorobix

  • Click on the Try out Code Button on the Soroban Docs/Visit our website and find the starter code (1min)
  • Deploy/Invoke/Test the contract (4mins) [Superior remote build system]

Total Time Taken: 5mins

As you can see, we have made the process 8x faster for newer developers and adopters to tryout Soroban!

No items found.
Previous Project(s)
No items found.
Progress so far
Goals
To get there, we request a budget of  
$
40,000
*
  to:
Additional information

Our Vision for Sorobix

Remix → Ethereum, Sorobix → Soroban

Our vision is to make the entire ecosystem independently accessible and cloud-native. This shall allow us to take Sorobix as well as Soroban, hand-in-hand to newer heights!

With longer-term goals such as integrating this as a 1-click-and-play button in the official documentation and tutorials, we see Sorobix as a part of the core ecosystem.

With Sorobix in action, Accessing and trying out Soroban should not require anyone anything more than a Browser and Internet Access! One could essentially build contracts using any device such as an iPad while travelling, or with underpowered machines (such as a Raspberry Pi) which takes a lot of time to build Rust Based Soroban Contracts.

As our long-term goals include integrating Sorobix with Soroban Docs for developers to have a good experience, we found that the current documentation already uses Gitpod, and sorobix could provide a better value for the following reasons:

How Sorobix provides a better experience than Gitpod which exists on Soroban docs?

Gitpod is a cloud dev environment, which provisions a Cloud VM to end users. However, the provision of a custom "pod" leads to a longer wait time for the end user due to the allocation of resources, etc.

With Sorobix, we cut this down by providing the user with online IDE right through their browser, and simply one click Test, Deploy, Invoke buttons which are enough to get involved with Sorobon, our superior cloud build system and backend takes care of compiling the contract instead of relying on provision a new VM every time.

Our base MVP with the following features is ready and deployed on https://sorobix.vercel.app with the following features:

  • Account Creation on FutureNet
  • Faucet Money Deposits via FriendBot
  • Compiling Rust smart contracts on the web
  • Deploying these smart contracts on the Futurenet
  • Invoking existing deployed smart contracts using their Contract ID

Our current tech stack is:

  • Python
  • Shell
  • ReactJS
  • FastAPI
  • FutureNet
  • Soroban Tools

However, as and when the need arises, we do plan on migrating to more scalable and robust solutions with minimal third-party dependencies!

Pitch deck
No items found.
Deliverables
First Deliverable

As part of the initial deliverable, we would give users a more enhanced user experience with a revamped UI and additional features to generate personal G/S keys from the portal and import existing keys to try out functions.

Deliverables:

Research and restructure the Backend Architecture

  • We will seek inspiration from other open-source projects to build a scalable backend.
  • Backend architecture and design are essential to future scalability. Hence we will be making an internal PRD (product requirement document) that helps with quick visibility of features to be implemented.
  • We will also be scouting for the correct libraries and interacting with the community in case we need help with any doubts/errors.
  • We will move from our initial FastAPI framework to a more comprehensive one in Flask.

Allow users to store G/S keys directly from the IDE and also import existing G/S keys to test contracts

  • Currently, the user has to manually use the friendbot to generate G/S keys and navigate to and from the docs portal.
  • We aim to automate this process by manually generating an ed25519-compliant key and funding tokens from the faucet.
  • We also plan to allow users to create multiple "accounts" that can store multiple G/S keys for contract testing.
  • We plan to enable users to input their own G/S keys manually for invoking and deploying smart contracts on the stellar chain on the go.

Test functions post build to check for bugs before deploying

  • Rust uses rust_fmt, which is a CLI and can run only on desktops; we aim to provide the same experience on the browser.
  • The user should be able to format their code and ensure the code is syntax-error free before compiling or deploying their contract.
  • Once the contract is deployed, they can test the functions with their respective parameters.

Fetch Function and Argument details from existing Smart Contract to be able to invoke them from the browser IDE

  • Once the contract has been deployed, we will also provide ways to invoke the contract with function and parameters.
  • The users can invoke the contract via the generated G/S key pair or enter their pre-existing keys.

Alpha launch of Sorobix for the community, which includes a hosted frontend for everyone to try out!

  • We will build a user-friendly UI so that anyone can come and try out sorobix!
  • We will be hosting the same for easier access to developers in the ecosystem.

Reviewer instructions

A reviewer who is assumed to be a user/developer new to stellar or soroban can access the Sorobix IDE portal deployed temporarily on https://sorobix-ide.vercel.app

Once the reviewer has reached the portal, they will be presented with an IDE that allows them to do the following:

  • Be presented with a well guiding and clutter-free UI
  • Be able to write rust code on the code editor, and format the rust code with the help of the "Format Code" button
  • Be able to automatically obtain G/S keys with faucet funds without navigating away from sorobix portal.
  • Be able to have "Multiple Account" with upto 3 G/S keypairs of their own, which helps emulate multiple users and could be useful for testing smart-contracts and invoking functions on-chain
  • Be able to test if it's a valid soroban contract by clicking the "Compile" button
  • Be able to deploy smart contracts on stellar in minutes without the need to download/install anything on their local system.
  • Be able to invoke deployed and pre-deployed smart contract functions from the portal from the Functions tab

The portal also includes a quick guide/about that guides the user on the features of the portal.

Hence, the reviewer must be able to deploy contracts on the stellar chain without the hassle of setting up rust or soroban-cli/soroban-sdk

Technical Deliverables

We have achieved the above using a small microservice pattern, and the tech stack of the implementation can be found in detailed below.

All of the codebase is open-sourced under the GitHub organisation sorobix(https://github.com/sorobix).

Currently, the tech-stack consists of the following repositories:

- sorobix/sorobix (https://github.com/sorobix/sorobix): The frontend repository, written using javascript utilising the React Web Framework to create SPA (Single Page Application)

- sorobix/sorobix-api (https://github.com/sorobix/sorobix-api): The primary backend repository, written in python, utilising the soroban-cli to do the heavy loading of compiling, deploying and invoking the contracts

- sorobix/sorobix-formatter (https://github.com/sorobix/sorobix-formatter): A small microservice written in golang, that takes care of formatting rust-code that is supplied by the frontend.

- sorobix/sorobix-deployment (https://github.com/sorobix/sorobix-deployment): A go-to solution which dockerizes and containerises the whole stack so that anyone who is willing to test it out locally and contribute the project can enable the tech-stack with one command!

As soroban contracts are written in rust, which takes a lot of computing and time to compile, we ventured into compilation optimisation. When we started building the project, a contract took around 40 seconds+ to compile; with superior optimisation techniques applied at compile time and with the help of incremental caching tools like sccache, we were able to bring down the compile time to just 14 seconds on the same hardware!

We have also revamped the UI of sorobix, which provides a more clutter-free, easy on eyes feel to the user. It is also highly modular, which will support easy scaling of new features that will be added to the project without drastic changes to the look and feel of the interface provided to the end user.

Links:

Team
  • Rishabh Keshan
    Email ID: rishabhkeshan@gmail.com
    LinkedIn: https://linkedin.com/in/rishabhkeshan
    Github: https://github.com/rishabhkeshan
    Discord ID: Rishabh™#9999
    Rishabh has been in the Web3 space for the past 2 years and has worked with multiple NFT and DeFi projects as developer, marketer, strategist and a builder with the likes of Tezos, Celo, Capx.fi, Persistence and Asset Mantle. He has built a RPG game https://intotheverse.xyz along with a few other builders which is now incorporated in US, Delaware and deployed on the Celo Blockchain. He has been a Tezos Fellow 2021 where he built an asset management protocol in the Tezos ecosystem and is currently a mentor in Solana’s buildstation. Apart from this, he has won various other hackathons and loves buidling, more about his projects on https://github.com/rishabhkeshan.
  • Hemanth Krishna
    Email ID: hkpdev008@gmail.com
    LinkedIn: https://linkedin.com/in/darthbenro
    GitHub: https://github.com/DarthBenro008
    Discord ID: Benro#8541
    Hemanth is a Opensource developer who has been contributing actively in various field of technologies that makes it easier for developers to build applications. He has also made notable contributions in the field of opensource distributed systems and blockchain technologies in projects such as Lightning Network, Tezos, Decentralised Oracle Systems. He has also participated in Tezos Fellowship, Summer of Bitcoin and the Skynet Summer Devloper Program. He has always been a hack enthusiast leading to various wins with the recent-most being the Soroban-athon, where he won the first place.
  • Shubham Palriwala
    Email ID: spalriwalau@gmail.com
    LinkedIn: https://www.linkedin.com/in/shubhampalriwala/
    GitHub: https://github.com/ShubhamPalriwala
    Discord ID: LaalShaitaan#9024
    Shubham is a developer active in the fields of backend, cyber security, and networking. Being a Certified Ethical Hacker, and the open source experience, he has been a part of various open source programs such as GSoC, GSoD, LFX Mentorship, and also a couple of web3 programs such as the Summer of Bitcoin and the Skynet Summer Developer Program. He has always been a hack enthusiast leading to various wins with the recent-most being the MIT Bitcoin Hack where he won the Infrastructure Track.

Together, we took part in Hacka-Soroban-athon and gave birth to the concept and an MVP of Sorobix, a product made to reduce the friction between developers and Soroban! We, as a team believe in building products that provide real utility across any ecosystem we work in. With Sorobix, we aim to make Soroban more accessible for even a novice developer trying the Stellar ecosystem for the first time.