Unleashing the Power of Desmos Network: Empowering Web2 Developers at AppWorks School Bootcamp

Lorenzo Menegon
Desmos Network
Published in
7 min readAug 9, 2023

Diary of an immersion inside Desmos Network

Hello dear Desmots! We are thrilled to share some exciting news from our team at Desmos Network. Our talented software engineer, @ddm_kilem (Paul from now on), recently had the honor of attending an enriching event hosted by AppWorks. The event was dedicated to guiding developers who graduated from the esteemed AppWorks School Bootcamp on how to easily develop an application using the Desmos Network protocol.

Desmos Network software engineer @ddm_kilem showcasing a snippet of code.

The workshop led by Paul covered a wide range of topics, beginning with an insightful introduction to blockchain technology. Paul provided a comprehensive overview, making sure everyone had a solid foundation before delving into the fascinating world of Desmos.

Let us together make a summary of the topics covered 👇

Introduction To Blockchain

First up, we explored the concept of block concatenation through hashes. The process of linking blocks in a blockchain using cryptographic hashes was explained in a clear and engaging manner. It is essential to understand how each block’s hash includes the previous block’s hash, creating an unbroken chain of information.

The talk also shed light on the significance of transactions in the blockchain network. From financial transactions to data storage, the blockchain enables secure and transparent record-keeping. Transactions are grouped into blocks, and through the magic of hashing, these blocks become immutable and resistant to tampering.

A transaction represents a single action or operation that alters the state of the blockchain. It can be as simple as transferring digital assets (e.g., cryptocurrencies) from one user to another or more complex, involving the execution of smart contracts or recording other types of data.

To make the features of blockchain well understood, concepts such as decentralization, transparency, tamper-proof, and consensus mechanisms were briefly explained before proceeding.

Blocks concatenation process.

Achieving Consistency

Next, the speech captivated the audience with a detailed explanation of the CAP theorem by Eric Brewer, also known as Brewer’s theorem, stating that it is impossible for a distributed data system to simultaneously achieve all three of the following properties: Consistency, Availability, and Partition tolerance.

According to Brewer, a distributed system can achieve any two of these properties but not all three simultaneously. In other words, you can prioritize either Consistency and Availability (CP systems) or Availability and Partition tolerance (AP systems).

Achieving perfect consistency across all nodes in an AP system like blockchain is challenging because ensuring that all nodes have the exact same data at all times requires constant synchronization (same initial state, and same sequence of operations). This synchronization can be expensive in terms of performance and may lead to increased latency, especially in scenarios where the network is not reliable or experiences partitions.

Talking about block construction, hash ensures that the state and order of operations are consistent. Hashing plays a vital role in maintaining the order of transactions within a block. To efficiently handle the transactions and maintain their order, a Merkle tree (or hash tree) data structure is used. In a Merkle tree, individual transactions are hashed first. Then, pairs of hashed transactions are combined and hashed together, creating a new set of hashes. This process continues until there is a single root hash at the top of the tree.

Using hashes in the process of constructing a Merkle tree.

Consensus mechanisms in the web3

After discussing the basic notions, Paul addressed concepts such as consensus mechanism and abstraction layer, to make it clear what the problems and advantages of a blockchain might be based on the characteristics with which it is designed.

A consensus mechanism refers to the selection of nodes that have the power to write data, whom we will call Leader from now on. Among the various consensus mechanisms, the best known are the following:
- Single Leader Writes Data: Replica Pattern.
- Multiple Leaders compete with each other to write data: Bitcoin Proof of Work.
- Choose who is the Leader before writing data: Proof of Stake.

When we talk about decentralized social networks, we have to take into account the fact that we need an architecture that brings a benefit, and at the same time we have to be careful not to introduce dangers.

Process of selecting transactions within a pool.

For example, a single architecture with write access means that when nodes can choose which data can be written. In the case of social blockchains it leads to the possibility of speech censorship where leaders can decide which content to make valid and which not to make valid.

Therefore, the architecture of the blockchain and its components are a key choice based on the ultimate goal to be achieved.

When we deal with a blockchain we can distinguish the different layers from which it is designed:
- Application layer: Smart contract, Bank system, Social network.
- Consensus layer: PoW, PoS, PoH, PoA, etc.
- Data layer: LevelDB, RockDb, etc.

After making a brief summary of what a blockchain is and its main features, Paul proceeded explaining the main features we decided to implement to best meet the challenge of decentralized social networks.

Introducing Desmos Network

As a member of the core team for several years now, Paul then explained how in a world where traditional social media platforms can exercise considerable control over content and user interactions, the concept of a decentralized social network powered by blockchain technology promises a more open and censorship-resistant environment.

Desmos set out to address the challenges of content censorship, data ownership and control faced by centralized social media platforms leveraging blockchain features.

One of the main ideas to start this complex journey was to provide a robust and developer-friendly infrastructure that accelerates the development of decentralized social applications.

Blockchain offers a powerful weapon against censorship fighting, as an open history allows us to defend freedom of speech with an unbiased historical record.

In the realm of centralized social networks, prevalent issues include worldwide censorship, limited customizations options, unjust revenue distribution, and algorithmic dominance that wields full authority over user interactions and content exposure. Presently, social media platforms capitalize on user preferences and shared content for profit, while content creators suffer from underpayment due to the centralized corporate structures.

Desmos Network was born as a new proposal to deal with all these critical issues related to centralized social networks.

Desmos Network macro architecture.

Talking about tools

Many of the features built so far, such as Pre-Built Social Networking Modules, Customizable Smart Contracts and JS libraries dedicated to interacting with the chain, have been developed to make this technology as attractive as possible to any kind of developer.

We can imagine Desmos Core as a series of composable modules representing the different social features found within social networks. From profile creation to posting, there is a module for any operation a developer wants to integrate within a specific decentralized application.

The core modules contain smart contracts previously developed by the Desmos team to make the developers work as easy as possible, but they are by no means a limitation, as Desmos Bindings are packages that allow interaction with the blockchain via custom smart contracts. In this way, anyone will be free to introduce new features within their application.

Other tools specially developed for developers include DesmJS, a TypeScript library that allows interaction with the Desmos blockchain, and DJuno, a chain parser that allows to query data from the blockchain using GraphQL endpoints.

After an overview of all the available tools, Paul moved on to a small demonstration of how to implement some of these features within a web application using Desmos Network.

Demo Time

The final part of the talk then saw Paul performing a demonstration on how to use DesmJS on the frontend side to simply interact with the Desmos blockchain explaining the few differences present with classic web2 development. The demo process also involved the audience because through the use of QR codes linked to a grant system to get some DSM on their personal wallet, the developers were able to post live content within the application showcased live by Paul.

Are you interested in getting more information about it? We are waiting for you inside our Discord server!

Final Considerations

After a day in contact with a new generation of developers, we had the opportunity to reflect on some essential points for the whole web3 community.

With the Desmos Network protocol now fully developed and operational, an exciting opportunity emerges to usher in a new wave of developer onboarding, even for those without prior blockchain experience.

The Desmos protocol architecture was designed to prioritize accessibility and ease of use, ensuring that developers from various backgrounds can seamlessly transition into the decentralized ecosystem.

By providing accessible tools, fostering a collaborative environment, and championing principles like anti-censorship and decentralized content ownership, Desmos mission is to positions itself as an ideal platform for both seasoned blockchain developers and newcomers alike. This presents an exciting prospect for innovation and growth within the decentralized ecosystem.

Continuing to promote the development of decentralized applications that benefit users, the Desmos team will surprise you with an August full of news.

See you soon! 😏

To know more about Desmos and stay updated, please follow:

Discord | Twitter |Telegram | Instagram | Website | GitHub

--

--