What is the Hyperverse from a Developer POV?
Tags: web3, blockchain, webdev, javascript
Published: 2022-05-31 04:48:55

You might be wondering exactly how are we onboarding these new Web Developers? We’re making this possible by implementing our “Smart Modules.” All Smart Modules on the Hyperverse have already had their smart contracts developed, so Web Developers do not need to know how they were written to interact with them. You can think of it as a similar environment to the [npm](https://www.npmjs.com/) modules we use for everyday Web2 development, but an ecosystem of modules for building decentralized applications tied to different blockchains.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/904dpujhvy891roomttt.png)

The Hyperverse community contains a number of roles focused on providing the most secure and accessible experience for all Hyperverse Smart Modules.

- **Smart Contract Developers: **Build Smart Modules single-purpose on-chain contracts with a per-transaction revenue model.
- **Hyperverse Registrars:** Validate Smart Module packages and discovery metadata, then approve for publishing.
- **Hyperverse Auditors:** Auditors in the community verify the code and stake their tokens, indicating their confidence in the model. The stake acts as an insurance layer for Smart Modules.
- **JavaScript Developers:** Use JavaScript to build Web3 apps just by connecting Smart Modules

This blog post will primarily focus on the first and last roles.

## Three-tier Model

For **JavaScript Developers**, the Hyperverse can be broken up into a three-tier model comprised of a top, middle, and bottom layer. Let’s dive in to get a better understanding.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/plfbzq86j1rvls1ckxln.png)

1/ The topmost layer is simply the Hyperverse module that initializes the entire environment in a single command and is also our composability feature. Web Developers can easily wire up different APIs to create decentralized applications.

2/ After setting up the development environment, you will then be able to choose which blockchain you’d like to use your Smart Modules on and build with.

**The Hyperverse currently supports the Algorand, Ethereum, Flow, and Metis blockchains.**

3/ Lastly is the bottom layer, where developers choose which Smart Modules they would like to implement using their blockchain of choice. The Hyperverse consists of a few modules like Tribes, Token, ERC-721, and Random Pick. These are great project examples for developers to use for Ethereum that will help get them familiar with the environment. The [Hyperverse Monorepo](https://github.com/decentology/hyperverse-mono) contains code packages and applications for the Hyperverse.

- [packages](https://github.com/decentology/hyperverse-mono/tree/main/packages): Blockchain implementations and smart modules.
- [apps](https://github.com/decentology/hyperverse-mono/tree/main/apps): Example applications organized by blockchain.

You can hook up your application to the Hyperverse to start building your Dapp and importing Smart Modules to use in just three steps.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g4onoyhsm4lry1x4qwie.jpeg)

After selecting your Smart Module of choice, you can then use your knowledge of React to build decentralized applications with all the functionalities of that module. This makes development much more accessible because your development process has eliminated the frustrations of understanding smart contract code.

It is also at the bottom layer where the multi-tenancy component of the Hyperverse becomes important. Every Web Developer has a unique Tenant ID generated for them. The tenant ID is tied to the blockchain of your choice (different blockchains generate tenant IDs differently), which is then utilized in your module(s). The ID is your record in the database that will separate your module’s data from another web developer’s.

[Here](https://www.youtube.com/watch?v=XAF3kTQcJ0A) is an excellent HyperBites video that explains this concept with an example using the Tribes Smart Module.

## Smart Module

**Smart Contract Developers** would be building Smart Modules on the Hyperverse using the Builder Kit (a composable starter kit for Smart Contract Developers to build Smart Modules).

A Smart Module is a package containing a smart contract, metadata, unit tests, and documentation at a minimum. It can optionally include a user interface test harness and sample code. The smart contract will typically implement a blockchain application primitive — one feature that provides discrete functionality. For example, a Subscription Smart Module makes it simple for an application to check if the calling account is an active subscriber for a specific feature.

An important characteristic of Smart Modules is their multi-tenancy, as mentioned previously. This structure models SaaS applications in Web2 that are typically single applications serving many different users. Smart Modules do this by separating the smart contract logic (which resides on-chain in the Hyperverse-deployed smart contract) from the associated data (which also resides on-chain but in the account of the calling smart contract). This is a unique feature of Hyperverse Smart Modules and is designed to address many scenarios where it is necessary for calling applications to use composable smart contract rules but store data in their own account space.

Below is an example of the TribesFactory smart contract used for the Tribes Smart Module. This contract shows the power of composability and the multi-tenancy architecture. You can find the Tribes Smart Module code [here](https://github.com/decentology/hyperverse-mono/tree/main/packages/hyperverse-evm-tribes).

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dqw1ityvmqgjmpfnr0wy.png)

[Here](https://www.youtube.com/watch?v=E9WrvKwUnpg) is a great tutorial on building your Smart Module on the Hyperverse.

## Revenue Model

While using pre-developed Smart Modules is a huge aspect of the Hyperverse, it is also a space for you to develop your own. Since our tool operates as a marketplace, the approved modules for public usage can generate income for whoever created them when other web developers utilize them.


As the Hyperverse grows and more Smart Modules are developed, the possibilities of what you can implement in your decentralized applications will expand.

In short, for Web2 Developers, the Hyperverse allows you to

- Build blockchain applications without writing smart contracts
- Access well-written, reviewed, and audited smart contract code
- Get support from a growing community of enthusiastic developers

It’s time to find your place to settle as an aspiring Web3 Developer. We want to help make your dreams of building decentralized applications a reality and join our mission to onboard 10 million Web Developers to Web3.

Check out our [docs](https://docs.hyperverse.dev/) for more information, join our community on [Discord](https://discord.gg/decentology), and start building right away. LFG! 🚀