Desmos Modules Explained #2 — Subspaces

Lorenzo Menegon
Desmos Network
Published in
3 min readAug 10, 2022

What is a subspace?

In this article, we will briefly explain how the spaces dedicated to applications developed on Desmos can be managed through the subspaces module.

A subspace is a structure of Desmos Core that represents a specific dApp where content can be created. For the organization of the structure of a social network, we pursued flexibility and imposed no limits on developers’ options.

Each subspace can have its own sections, sub-sections, user groups, and permissions.

Build the subspace that perfectly suits your social network

A subspace is necessarily identified by a series of fields such as the ID, name, and description. One of the peculiar traits associated with a subspace is its own treasury, which is an address representing the wallet associated with the subspace itself.

This address can be used for various reasons, for example, to verify the authenticity of the interaction with external applications, or the payment of fees for the execution of some smart contracts.

The address that creates a subspace will initially be identified as the owner and will have access to all permissions regarding that subspace. The ownership attribute can still be transferred at any time to another address.

Sections

A section can be seen as a folder within a subspace. It can be useful to represent different types of topics, or to build forum-like social networks, allowing a better way to manage and categorize the content.

Just like folders, you can also create nested sections in order to create custom structures of more complexity.
With this structure, we offer developers total control over the application’s architecture design.

User Groups

Users who share the same permissions within a subspace form a user group. A user group is uniquely identified within a subspace, and outside of that it has no meaning.
The first example we can think of to understand user groups is that of roles within a community, such as admin, moderators, and generic users. At the same time, this subdivision can also be used to create communities and distinguish the types of members within them.

Permission sets

Each individual can also have particular permissions associated with their identity within a subspace. User permission can be used (but are not mandatory) to set individual permission within a subspace or subspace section.
This can be very handy when you want to assign permissions to a single wallet without having to form a user group (e.g. you have a smart contract that needs to have a custom permission set).
The subspace module can be considered modular: it can contain nested sections, which allow developers to model hierarchies to their liking, providing the power to create structures of high complexity.

To find out more about the interaction between subspace users, keep following us and stay updated on upcoming articles.

If you have any questions, please do not hesitate to ask in the Desmos Discord server. To know more about Desmos and stay updated, please follow:

Discord | Twitter |Telegram | Instagram | Website | GitHub | Twitch | Youtube

--

--