This is an advanced version of XP.network design paper. It is still a subject to minor changes.

Please read this section carefully. The below does not constitute legal, financial, business, or tax advice.
You must consult your own legal, financial, tax, or other relevant professional advisors prior to engaging in any activity in connection with XP.network.

Abstract

XP.network is a Polkadot parachain able to deploy NFT products and services to any supported blockchain including Facebook’s upcoming Diem.

Through its pioneer application editor, XP.network removes entry barriers for entrepreneurs, developers, product makers and projects by allowing the creation of NFT DApps using no-code tools.

NFTs

NFTs are tokens used to represent ownership of unique digital assets. Every NFT is linked to its owner’s account and is secured by being saved in a blockchain.

NF (Non-Fungible) stands for “non-interchangeable” for items or pieces of art, collectibles, fashion, sports, gaming, and others with unique attributes.

The “Non” in NFTs opposes it with fungible resources, which is a legal or financial term for identical, mutually replaceable items.  For example, any fiat currency (like USD, EUR, Pounds, etc.) where $1 is completely interchangeable with another $1 are examples of fungible resources.

NFTs Allow Asset Owners to Earn More

Some online platforms, who earn money from subscription plans or advertisements, do not pay the content providers at all[1]. Other platforms, who earn from sales, charge 60-85% leaving the authors only 15-40%[2] earnings on their work. On the other hand, NFT blockchains charge only the transaction fee.

NFTs Against Piracy

Copyrights have become increasingly vulnerable in the ever digitizing world. A copy of an MP3 or a PSD file is indistinguishable from the original crafted by an artist. Digital piracy reduces legal sales and causes significant harm to the creators and their sales networks. Painters, photographers, designers or illustrators often become victims of piracy. Their artworks can be copied, sold or displayed without notifying the author. The process of tracking such activity can be tedious and still does not guarantee the 100% result. It’s as simple as copy and paste. NFTs are designed to seal ownership in unique tokens, saved irreversibly in a distributed blockchain, making a digital item trackble, and linked to its original creator no matter where in the digital sea.

The Rise of NFTs

In the last year, NFTs have exploded in mainstream popularity. Beeple sold a digital art collection collage for no less than $ 69,000,000 through a Christie’s auction -  the third most expensive work from a living artist ever to be sold on auction. SOCKS, a digital “socks” token, trades for more than $89,000 and the co-founder and CEO of Twitter, Jack Dorsey sold his first tweet for $2,900,000. Mark Cuban, Gary Vaynerchuk, Lindsey Lohan, Pamela Andreson. 3LAU, Shawn Mendes, The Kings of Leon, Grimes, Paris Hilton and even Snoop Dog are all talking about (and some of them even mintin[a]g) NFTs. Recently, a partnership between the NBA and Dapper Labs focused on selling NBA “highlight videos”, backed by NFTs. Demand for these videos exploded, with hundreds of thousands of users owning at least one NFT, some of which are selling for no less than a quarter million dollars.

Facebook’s Diem

“1.7 billion adults globally remain outside of the financial system with no access to a traditional bank, even though one billion have a mobile phone and nearly half a billion have internet access.”[3] 

The idea behind Diem blockchain is an international online peer-to-peer payment system embedded in Facebook products[4]. Facebook has reached 3.14 billion active users combined in its main products: Facebook, Instagram, WhatsApp and Messenger[5]. This means that out of  7.9 billion world population[6], 40% have a Facebook related account that could potentially include a Diem wallet making Diem Association the most influential financial institution in the world.

Backing The Currency

A significant advantage is that by contrast with Bitcoin[7] or Ethereum[8], the world’s most expensive cryptocurrencies, Diem currency is backed by a reserve which will consist of cash or cash equivalents and short-term government securities denominated in that currency.[9]

Challenge

Market Barriers

On one hand, the creation of NFT applications is limited to developers or the technically-initiated. While NFTs are becoming mainstream, more non-developers are taking an interest in the market, however, acquiring the required tools and knowledge is a significant time and resource-demanding process. Most non-technical product managers and entrepreneurs would give up the effort before being able to successfully create an NFT-powered product or service. On the other hand, accessing NFT solutions also requires at the very least a basic understanding on how cryptographic assets work. These limitations are crippling not only creativity, but also adoption.

Limited Abilities

NFT applications are limited to the blockchain they’re built for. Most applications have no built-in value transfer with other chains (they lack the ability to receive or send assets to or from another blockchain). At the same time, most projects lack the ability to deploy sister-products on separate chains. While there’s an abundance of NFT-oriented solutions and products, the market still lacks NFT surgical precision tools. [b]


Dynamic Ecosystem

Blockchain technology is still in its infancy. The software changes quickly which results in a constant requirement to maintain and update DApp libraries and code, which comes with a high financial cost, sometimes too high, such as in cases where the DApp does not have a significant clear income stream or business model.

Regulation

While Diem Association collaborates with central banks[10] and financial authorities to marry Diem with the existing financial system, it becomes clear how strict and regulated Diem related application market will be. Developers will have a hard time approving their applications to the Diem live environment. It could be weeks or potentially months before their applications will get approval from the governing scrutineers due to a “congestion”. There will simply be many times more applicants than the approvers.

Apple Store - a vivid example

We could take Apple’s App Store as a close approximation of what we are to expect. Developers complain that out of 100,000 apps reviewed weekly 40% are rejected[11] for not being compliant with the strict security, source code or UI design guidelines. Remarkably, but one version of an app being approved does not guarantee automatic approval of the consecutive ones. Each version is treated as a new instance and can be rejected again and again[12].

Solution

XP.network platform consists of:

Architecture

1. Smart Contract Editor

A codeless UI tool which allows users to generate valid human readable code in Move, Solidity and Rust, resulting in  smart contracts that can be launched  on Diem, Polkadot, Ethereum, BSC and countless other blockchains.

Users select an NFT use case, business specific details and blockchains.

When all the steps are completed, the following occurs:

  1. A JSON request is sent to the server.
  2. The request is sanitized and validated.
  3. A JSON “intention” object is generated.

The “intention” object contains:

  1. The chosen blockchains’ smart contract programming languages.
  2. The NFT use case is translated to smart contracts.
  3. The business specific details are inputted as rules, functions, and variables.

The “intention” object is sent to the next platform tool called the Migration-Module.

The Migration-Module generates human readable code which can be read and edited by the user in the code tab on the UI.

This allows more experienced users to read and edit the code. The window in the code tab is listening to the user generated events. Should a user edit and save a new version of code, a request is sent to the backend and the Compliance Validator to modify the previously generated code with the new one and ensure the code is still error free.

Since user-edited code can contain errors or may contradict some chosen blockchain policies, the code is tested by the XP.network Compliance Validator tool. The code tab includes a Validation Panel which displays the results of the Code Validator’s checks and either confirms that the code is free from errors and is regulations compliant, or indicates the lines in code that contain errors alongside with suggestions of improvement.

In order to interact with the Polkadot pallet for XP.network, a user’s application must register one’s account. To ensure confidentiality and integrity, it can be done from the “Polkadot Interaction” tab of this tool.

All the data connected to this module is persisted in a database, be it user choices, errors or smart contract edited code.

2. Migration Module

The Migration-Module contains:

  1. Pre-programmed audited code templates which are populated by data from the “intention” object.
  2. Decision tree responsible for building the structure of the selected NFT use case.
  3. Human readable code generator.
  4. Bytecode compiler.

Since Move does not have a standard library for working with NFTs, XP Network’s NFT library for Move is an extension of the original standard library. Potentially other libraries and protocols could be added in the future.

3. Compliance Validator

The Compliance Validator is an automated QA tool for the generated code. It also enforces the latest regulations issued by the designated blockchains.

By default, the Migration-Module’s output is error free and regulations compliant. However, since the option to manually modify the resulting code exists, this tool is invaluable in validating and reporting errors. The Compliance Validator results can be found in the “Validation Panel” of the code tab.

For example, if a user tries to copy resources inside a smart contract in Move (which is prohibited according to the Diem policy) a regulation compliance error will pop up.

4. Application Editor

The Application Editor  generates the UI and backend of the resulting application.

Here a user can define:

  1. How the resulting application’s users and privileges will be managed.
  2. What themes and styles will be used.
  3. Select which components will be used.
  4. How will the components be placed on the pages.
  5. Connecting the components to smart contract functions.

The module builds the resulting application’s frontend, backend and database. Automated QA tools will check the resulting application’s functionality.

The resulting application will be connected to the XP.network Substrate pallet and the chosen blockchains. It will be fast, search engine optimized and secure.

5. Polkadot VM Hub

The VM Hub Layer is a Substrate pallet which allows different Virtual Machines to interact with each other. The Layer implements serialization and deserialization of data formats and shared storage between different VMs, making requests between them possible. For example, one could call a smart contract written in Solidity from a smart contract written in Move or Ink! and vice versa.

A user can choose between the following blockchains: Avalanche, Binance, Cardano, Diem, Elrond, Ethereum, Heco, Polkadot and Solana. Depending on the user’s blockchain choice, a smart contract programming language will be chosen. For example, if a user wants to interact with Ethereum, Solidity will be chosen as a target language.

This module consists of:

1. Bytecode Deserializer - it receives hexadecimal input and returns a human readable code in assembly.

2. Assembly Code Converter - it  creates the following key - value pairs:

3. Bytecode Compiler - it takes the key - value pairs generated at the previous stage as an input and generates the chosen smart contract language bytecode as its output.

4. Polkadot parathread - it uses the Relay Chain callback mechanism to communicate with the other parachains and parathreads using XP.network protocol. Since the existing mechanism is connectionless and stateless there’s no way to automatically be notified whether a message or a transaction succeeded. This is why every transaction is marked with a unique token. While waiting for the results of the transaction or to identify the incoming messages as related to the transaction the token is stored together with the transaction info.

A set of pre-programmed audited code templates are ready to be populated by the arbitrary data. Once a request is received, the templates are populated with the incoming data and are instantly compiled into transaction ready bytecode. Initially there will be a limited set of ready code templates for each platform. However, new templates will be added on a permanent regular basis. Eventually most possible use cases will be available for each bridged platform. Finally, the original smart contract bytecode will be translated directly into the target language bytecode, removing all limitations.

Since the architecture is designed for an injectable interface, we are not limited to Solidity, Move, Rust and Ink! programming languages. Any other language can implement this adapter, should its requests comply with the adaptable interface.

6. XP.network Testnet

A small network of computers with running Substrate parachains allows our users to test the resulting applications with zero costs before connecting them to the live mainnets . Other blockchain’s testnets will also become available in the near future.

Bird Eye view of the XP.network Platform

Notes:

  1. The UI consists of tabs, each responsible for a certain feature setup.
  2. The frontend and the backend of the Smart Contract Editor and the Application Editor are in fact one UI with multiple tabs. They are divided in the scheme to emphasize their different functionality and different outputs.
  3. Account settings in the Smart Contract Editor creates and manages the account for the user who builds the application. Account settings of the Application Editor define how users will be managed in the resulting application.
7. XPNET Token Utility
PoS validation

PoS is a mechanism for choosing the best suitable validators for the validator pool. The more XPNET tokens a validator stakes, the higher the chances are to be appointed for the validator pool. Validators can be backed by the nominator's stakes. A nominator can back up to 12 validators at a time.

This mechanism allows locking more tokens and makes the system more resistant to takeover attacks. A selection based on the maximum total stake mechanism will rotate the stake among the validator pool, leaving one active validator per era (24 hours). Only the active validator gets to sign blocks and gets the transaction fee. If a validator is not interested in nominators, the validator will set commission to 100%. This indicates that the nominator will get 0%.

The choice of validators must be careful. If an active validator is offline, it signs the same blocks multiple times (equivocates) or makes other mistakes.This validator and nominator's stakes can be slashed (fined for breaking the protocol). A fairly small percentage of the stake is slashed for the downtimes, however, equivocating or alternative signatures of finalized blocks can lead to 100% slashing.

To avoid the system takeover by advisories or centralization, the number of equivocating nodes is proportional to the slashing percentage. If > 33% of the nodes equivocate 100% of their stakes will be slashed. There will be 100 independent validator nodes at Genesis.

This number will gradually grow to thousands together with the growth of the XP.network ecosystem welcoming the fresh members with new opportunities for collaboration and profit.

Transactions

Every transaction is meticulously inspected by a pool of independent decentralized validators. Both internal and the bridge relay validators are awarded for their benevolent work. The transaction fee is paid by the account holders submitting the transactions.

Validator's errors, long response times, downtime or deliberate fraudulent activities are discouraged by slashing the stakes. Apart from providing income to the validators, the transaction fee ensures security and availability.

Without the fee, anyone could flood the network with useless transactions or could set up a DDoS attack. The fee makes such behavior unreasonably expensive, freeing the network for well-thought legitimate transactions. The transaction fee is paid before the transaction.

XP.network is planning to allocate up to 10% of the total token supply to stimulate the validators by subsidizing an additional 100% of the transaction fee from the treasury.

The transaction fee is currently calculated by the formula: m * size(TX) + b, where
m (multiplier) equals 0.0005 XPNET.
size(TX) is the weight of the transaction bytecode.
b is the bias set at 0.001 XPNET.

The weight of the transaction correlates with the complexity of execution and storage. The bias prevents flooding attacks.
Transaction initiators can add an optional tip to get a higher priority in the transaction queue, thus raising the transaction fee. In the future, the formula and the rates of the transaction fee will be decided by token holders through a public referendum.

Staking

Nominators and validators are the two types of major stake makers in XP.network. A nominator is either a non-technical XPNET token holder, who cannot set up a validator node or someone, who does not have enough tokens to become a validator. Nominators can earn a part of transaction fees by appointing their stakes to validators they trust.

Validators run a full node of the blockchain and take an active part in block signing and production. Validators are awarded the transaction fees, but bear the responsibility for their stakes as well as the stakes of the nominators that back them. If a validator makes mistakes or deliberately signs fraudulent transactions, it ruins one's reputation and both the validator and the nominator's stakes will be automatically slashed for doing so.

Slashing is a punitive measure for malicious, erroneous or incomplete work of the validators by withdrawing a percentage of the stake. The validators should make sure their nodes don't experience downtimes.

Cross-chain value transfer

Thanks to numerous cross-chain bridges XP.network is developing, token holders will be able to seamlessly transfer their assets to and from the bridged blockchains. The bridges are designed to be decentralized. A pool of independent relay validators ensures the integrity of assets between the blockchains so that nothing is lost or duplicated.

XPNET tokens will be available in Polkadot, Elrond, HECO, Cardano, DFINITY and many other blockchains. Once an account holder submits a request for transmitting tokens to a bridged blockchain. The bridge locks the requested amount in the smart contract in the original blockchain and broadcasts an event.

The bridge relay validators catch the event and sign the transaction. The smart contract in the target blockchain collects the signatures of the validators. Once the 2/3*n+1 signatures arrive, it releases the same amount of wrapped tokens to the designated account.

The tokens of the bridged blockchains can be transferred to XP.network the same way. XPNET can be used for buying and selling other assets (e.g. NFTs), for lending and borrowing, for saving or as collateral.

Governance

XP.network will gradually introduce a decentralized governance mechanism that will allow the XPNET token holders to make executive decisions on further network development. Once a ruling proposal is made by the council, elected by the token holders from the enthusiastic token holders, a referendum will begin.

A sophisticated stake-weighted voting system will ensure transparency and fairness of decision-making. The more tokens or a longer period the tokens are locked, the more votes will be provided to the voter. After the locking period expires, the locked tokens will be returned to the original wallets regardless of the outcome of the referendum.

If the council members voted unanimously for the necessity of the change proposal a negative turnout bias will be applied. This means, that even if less than 50% of the voters show up, the simple majority (n% * 3 / 5 + 1) will be required for passing or declining a proposal. Where n% is the percentage of winning votes.

If the council supported the voting proposal but not unanimously, over 51% of the total token holders must vote "yes" for a proposal to be accepted to guarantee the interests of all the community. If an improvement decision has been accepted during a referendum the technical committee, which was elected by the council, will upload the code implementing the changes.

References

1. https://www.flickr.com/help/terms 

2. https://submit.shutterstock.com/payouts?language=en 

3. https://www.diem.com/en-us/white-paper/#introduction 

4. https://www.novi.com 

5.  https://www.statista.com/statistics/264810/number-of-monthly-active-facebook-users-worldwide/ 

6. https://www.worldometers.info/world-population/#:~:text=The%20current%20world%20population%20is,currently%20living)%20of%20the%20world.

7. https://bitcoin.org/bitcoin.pdf 

8. https://ethereum.github.io/yellowpaper/paper.pdf 

9. https://www.diem.com/en-us/white-paper/#the-economic-and-the-libra-reserve

10. https://www.bloomberg.com/news/articles/2021-04-07/sweden-s-central-bank-reveals-first-study-of-digital-currency 

11. https://www.accc.gov.au/system/files/Apple%20Pty%20Limited%20%282%20October%202020%29.pdf 

12. https://developer.apple.com/app-store/review/guidelines/#after-you-submit; https://developer.apple.com/forums/thread/114668 

Presale Signup

amount in USD

Thank you for your interest. Our team will be in touch with you soon.