April 31 Blockchain Wrap-up Update

This technical document outlines the challenges encountered in the design of blockchain subnets, proposed solutions, & the optimal subnets structure for enhancing TPS. Test results are also included.

Dione

Overview

Dione Protocol Blockchain is a fork of the Avalanche Network, which uses Snowman consensus (PoS). Avalanche combines three separate blockchain networks to achieve superior scalability and functionality. The protocol operates as a frictionless payment system, cryptocurrency, and DeFi ecosystem. The three blockchains - X-chain, C-chain, and P-chain - all serve different roles in the network.

X-Chain

The X-chain is responsible for the issuance of new digital assets. This network supports the creation of new tokens, NFTs (non-fungible tokens), stablecoins, and more.

C-Chain

The C-chain is designed to improve Ethereum developer onboarding. The developers describe this network as a conversion chain.

P-Chain

The P-chain serves as a platform for launching and customizing subnets, where users can create their unique rules and parameters.

In Dione Protocol Blockchain, we need to have similar chains to handle these roles. In addition, we should handle communication between Energy distribution units (Grid Operation, Distributor, Power Supplier, and Power Consumer).

Problem: Communication between units

Communication between energy distribution units must be frictionless, and over time, it will require more gas and space to keep communication frictionless. In other words, if we handle this communication in the Primary network (C-Chain), it will consume most of the resources and gas in the primary network, thus affecting network speed. Also, we need KYC/Certificates for these units to add them to our network and reward them based on their work. This cannot be handled by the primary network.

Solutions: Off-Chain Solution

Communication between units can be handled off-chain, which has the following Pros and Cons:

Pros

  • High Speed

  • Private communication

  • Cheaper communication between the units (No gas needed)

Cons

  • Less security

  • Centralized

  • Communication is not transparent

  • Harder to manage rewarding (off-chain rewarding)

Solutions: On-Chain Solution

Pros

  • Decentralized

  • More secure

  • We can implement KYC/Certificate to access to network

  • We can have access control on transaction types

  • We can handle rewarding to the units by blockchain itself based on their transactions

  • Transparent Communication

Cons

  • Lower speed than Off-chain solution

  • Unit transfers cost more than Off-chain solution (need to pay gas for each transaction)

As mentioned above, the on-chain solution will fix most of the Cons of the off-chain solution. With Subnets, we’re able to develop a network with KYC/Certificate requirements to access and make transactions on the network and keep everything decentralized at the same time.

Marketplace (V2 features)

As mentioned in Dione documentations, in the marketplace we should able to handle these functionalities:

  1. Manage distribution contracts

  2. Manage Sell orders

  3. Smart Meter Management

  4. Revenue/Invoice Management

  5. Discounts Managements

  6. Rewards Management

  7. Certificate management

Part of this relates to administrator privileges, while another part relates to Distributors, Suppliers, Consumers, etc. Additionally, the functionalities are split into two sections:

  1. Private functions (Like administrator functions)

  2. Transparent functions

Our solutions would be different for these categories.

Solutions: advantages of concurrent Off-chain and On-chain usage

For managing marketplace functionality we need both Off-chain and On-chain advantages.

With off-chain we will handle these functionalities:

  1. Track supplied units

  2. Track consumed units

  3. Handle off-chain authentication/registration process

  4. Analytics and statistics

  5. A few administrative functions related to requests and contracts

  6. Handle ads

  7. Etc.

And on-chain can handle these parts:

  1. Manage Certificate for a wallet to be a distributor/supplier/consumer

  2. Manage distributors/suppliers/consumers list

  3. Manage rewarding

  4. Manage discounts

  5. Manage sell/buy orders

  6. Etc.

By using on-chain solution for managing these functions, we are able to have the following Pros and Cons:

Pros

  1. Decentralized

  2. More secure

  3. Transparency

  4. We can implement KYC/Certificate to access to network

  5. We can implement access control on transaction types

  6. We can handle rewarding to the units by blockchain itself based on the transactions

Cons

  1. Transaction cost more than Off-chain solution (need to pay gas for each transaction)

As well as our solution for Units Communication, we can make the marketplace subnet private for sensitive data.

Dione Chain Subnets Structure

By using the solutions which mentioned above, Dione Blockchain Subnets structure would be as following:

X-chain

The X-chain is the network that is responsible for the issuance of new digital assets. This network supports the creation of new tokens, NFTs Non-fungible tokens, stablecoins, and more.

C-chain

The C-chain is designed to improve Ethereum developer onboarding. The developers describe this network as a conversion chain.

P-chain

The P-chain is responsible for monitoring and validating the state of subnets. These Avalanche-powered blockchains can be set up to meet nearly any need. P-chain is also responsible for hosting many of the network’s DeFi features such as its staking protocols.

S-chain (optional - in the case we continue with on-chain solution)

The S-chain is the network which is designed to handle communications between Energy distribution units. It’ll be protected with KYC/Certificate requirements. This network can be public or private based on the data will be shared between units.

M-chain (v2 features)

The M-chain is responsible for marketplace functionalities which mentioned in the Marketplace section. This network can be private or public based on the data on the network.

Blockchain TPS

Dione Protocol Blockchain is a fork of Avalanche Network. Currently, Avalanche network is able to handle 4,500 Transactions per second (TPS) (Base on their documentation - Avalanche Documentation). Our goal is to increase this number to 20,000+ TPS.

Solutions: Design Subnets structure

The most important way to increase Dione Blockchain Transactional throughput is to split transactions based on their functionality and design an efficient structure. The structure is shared at the Blockchain Subnets Structure section.

Solutions: Optimize consensus

Our secondary solution for increasing "Transactional Throughput" is optimizing network consensus. Avalanche uses Snowman consensus (As mentioned in their documentation) which is blazing fast, efficient, and optimized and we couldn’t apply significant effect (we increased the TPS to 5,300+) on this for now, but we will continue working on this over the next milestones.

Chain TPS: Test results

As mentioned in Blockchain TPS section, Avalanche Provides 4,500+ TPS for each subnets.

With splitting unit communication, marketplace, and primary network we are able to reach to this number in each subnet.

  • TPS Test before applying change (Avalanche base code)

    • Total Transactions: 1,815,373

    • Max Transactions per Second: 4,157

    • Avg Transactions per Second: 3,838

  • TPS Test after applying consensus changes

    • Total Transactions: 1,351,978

    • Max Transactions per Second: 5,207

    • Avg Transactions per Second: 4,662

  • TPS Test after changing subnets structures (Primary network)

    • Total Transactions: 1,710,993

    • Max Transactions per Second: 5,113

    • Avg Transactions per Second: 4,766

  • TPS Test after changing subnets structures (Communication network)

    • Total Transactions: 1,928,614

    • Max Transactions per Second: 4,537

    • Avg Transactions per Second: 3,912

  • TPS Test after changing subnets structures (Marketplace network)

    • Total Transactions: 2,141,491

    • Max Transactions per Second: 4,603

    • Avg Transactions per Second: 2,803

  • Total TPS for all subnets

    • Avg Transactions per Second: 11,481

Last updated