# Welcome

The HUB to start your QANplatform journey.

<figure><img src="/files/dvwyXjL6IK1YEJS03BfA" alt=""><figcaption></figcaption></figure>

#### Welcome to the QANplatform HUB 👋&#x20;

{% hint style="info" %}
**QANplatform** /ˈkwɑːn ˈplætfɔːrm/ or **QAN blockchain platform**

**QANX** /ˈkwɑːnˈeks/ the utility token of QANplatform
{% endhint %}

#### **QANplatform is the quantum-resistant Layer 1 hybrid blockchain platform that will allow developers and enterprises to build quantum-resistant:** smart contract, DApp, DeFi, DAO, token, CBDC, NFT, Metaverse, and Web3 solutions **on top of the QAN blockchain platform in any programming language.**

{% embed url="<https://youtu.be/WtS-OQinhGw>" %}

Let's start your QANplatform journey! 👇

### For Newcomers

{% content-ref url="/pages/Vj6ZSvrIARS9Dp6KRRdR" %}
[Intro to QANplatform](/technology/intro-to-qanplatform)
{% endcontent-ref %}

{% content-ref url="/pages/iVNER7FfVUWWR7bYkBvW" %}
[Technology Features](/technology/technology-features)
{% endcontent-ref %}

{% embed url="<https://learn.qanplatform.com/developers/roadmap>" %}

### For Developers

{% embed url="<https://docs.qanplatform.com/testnet/what-is-the-qan-testnet>" %}

### For QANX Token Holders

{% content-ref url="/pages/JyCKRh4rhBh1Vc2echaw" %}
[What is QANX? ](/qanx-token/what-is-qanx)
{% endcontent-ref %}

{% content-ref url="/pages/l3dTauakeRDHCUHU1uB3" %}
[How to Buy QANX?](/qanx-token/how-to-buy-qanx)
{% endcontent-ref %}

### For Validators and Node Providers

{% content-ref url="/pages/hTmGr81wFCBGKOtrQvM2" %}
[Validators](/developers/validators)
{% endcontent-ref %}

{% content-ref url="/pages/EbomsuIg0PgwqJ15IBu6" %}
[Node Providers](/developers/node-providers)
{% endcontent-ref %}


# Social media

The QAN Army is waiting for you!

## Join the rapidly growing QAN community!

### Twitter (X)&#x20;

Follow QANplatform on [Twitter](https://twitter.com/QANplatform) (X)!

{% embed url="<https://twitter.com/QANplatform>" %}

### Telegram

{% embed url="<https://t.me/QANplatform_ANN>" %}
Announcement Channel
{% endembed %}

{% embed url="<https://t.me/QANplatform>" %}
Community chat in English
{% endembed %}

{% hint style="danger" %}
Be aware of scammers! The team and our moderators will never DM you. We will never ask for funds or wallet key phrases!&#x20;
{% endhint %}

### Discord&#x20;

{% embed url="<https://discord.gg/PYBxQsudTE>" %}
Join our Discord server for community and developer discussion!
{% endembed %}

### GitHub

{% embed url="<https://github.com/QANplatform>" %}
Follow us on Github!
{% endembed %}

{% hint style="warning" %}
The QAN team is working in a private GitLab. The code will be open source and published on GitHub after the QAN MainNet launch.&#x20;
{% endhint %}

### YouTube

{% embed url="<https://www.youtube.com/channel/UCgR1kfc0AwqSc3WSGGk-dMQ>" %}

### LinkedIn

{% embed url="<https://linkedin.com/company/qanplatform>" %}


# Newsletter

Join the QANplatform mailing list! QAN Newsletter

{% embed url="<https://forms.gle/qtdZqJoAJirzxqdZ9>" %}


# Intro to QANplatform

Quick introduction to QANplatform

Why QANplatform?&#x20;

{% hint style="info" %}
**QANplatform** /ˈkwɑːn ˈplætfɔːrm/ or **QAN blockchain platform**

**QANX** /ˈkwɑːnˈeks/ the utility token of QANplatform
{% endhint %}

{% hint style="info" %}
**Vision:** A world where real and helpful use-cases are built on the blockchain.&#x20;

**Mission:** Empowering anyone to build rapidly and securely on the blockchain.&#x20;
{% endhint %}

{% embed url="<https://youtu.be/WtS-OQinhGw>" %}

#### **QANplatform is the quantum-resistant Layer 1 hybrid blockchain platform that will allow developers and enterprises to build quantum-resistant:** smart contract, DApp, DeFi, DAO, token, CBDC, NFT, Metaverse, and Web3 solutions **on top of the QAN blockchain platform in any programming language.**

**QANplatform will tackle fast adoption** by building [integrations](/technology/technology-features/integrations) to existing and widely used and loved [programming languages](/technology/technology-features/multi-language-smart-contracts-or-hyperpolyglot) *(all Linux Kernel compatible languages)*, DevOps technologies *(Docker, Kubernetes)*, major cloud platforms *(Amazon AWS, Microsoft Azure, Google Cloud Platform...)*,  Oracle APIs *(Chainlink, Band Protocol)*.&#x20;

QANplatform is [Ethereum EVM compatible](/technology/technology-features/ethereum-evm-compatibility). All of the projects currently running on Ethereum, like DEXes, NFTs, DeFi solutions can migrate easily to the [Quantum-resistant](/technology/technology-features/quantum-resistant-security) QANplatform.&#x20;

QANplatform is the [first Layer 1 blockchain that rewards developers](/technology/technology-features/developer-royalty-fees) after each new smart-contract deployment and each public blockchain (MainNet) transaction for a lifetime when their code part is reused by other developers or their smart contract is being interacted with.&#x20;

**QANplatform has 4 IPs (Intellectual Properties)** that were developed by the QAN team besides the many technological and economical innovations:

1. QANplatform's unique [Multi-language Smart-Contract Engine (QVM) ](/technology/technology-features/multi-language-smart-contracts-or-hyperpolyglot)makes QANplatform usable to 20M programmers by letting them code in any programming language.&#x20;
2. QANplatform's unique [quantum-resistant](/technology/technology-features/quantum-resistant-security) cross-signer, QAN XLINK utilizes CRYSTALS-Dilithium, the NIST approved primary post-quantum algorithm. QAN XLINK is responsible for ensuring a 100% successful migration path when quantum computing attacks will affect elliptic curve cryptography.
3. QANplatform's unique [Proof-of-Randomness (PoR)](/technology/technology-features/proof-of-randomness-por-consensus-algorithm) algorithm.&#x20;
4. QANplatform’s unique [Rapid cloud platform deployment](/technology/technology-features/integrations) lets users deploy the QAN blockchain platform to major cloud platforms like Amazon AWS in less than 5 minutes that making QANplatform the fastest blockchain to deploy on the market.

## What's next for QANplatform

{% content-ref url="/pages/YKUl7Nfo3VcopQszugkW" %}
[Roadmap](/about-us/roadmap)
{% endcontent-ref %}

## For Developers

{% embed url="<https://docs.qanplatform.com/testnet/what-is-the-qan-testnet>" %}

{% embed url="<https://youtu.be/Hm4cBuUd3N0>" %}

{% embed url="<https://youtu.be/AYe33k4TUrM>" %}


# Technology Features

QANplatform Technology Features

<figure><img src="/files/rWyce5COEIVXFNvm5wkw" alt=""><figcaption></figcaption></figure>

## Highlighted technology features of QANplatform (QAN blockchain platform)

{% hint style="info" %}
**FAQ:** All technology features and the entire ecosystem will be gradually released after the launch of the QAN public blockchain (MainNet).
{% endhint %}

{% hint style="success" %}

### **QANplatform, the blockchain platform for forward thinkers**&#x20;

**The 4 unique developments (IPs) by QANplatform make this Layer 1 outstanding besides the many technological and economical innovations.**

1. QANplatform's unique Multi-language Smart-Contract Engine (QVM) makes QANplatform usable to 20M programmers by letting them code in any programming language.
2. QANplatform's unique quantum-resistant cross-signer, QAN XLINK utilizes ML-DSA (Module-Lattice-Based Digital Signature Standard, FIPS 204), the NIST approved primary post-quantum algorithm. QAN XLINK is responsible for ensuring a 100% successful migration path when quantum computing attacks will affect elliptic curve cryptography.
3. QANplatform's unique Proof-of-Randomness (PoR) algorithm will make the QAN public blockchain the greenest blockchain on the market yet remain decentralized.&#x20;
4. QANplatform’s unique Rapid cloud platform deployment lets anyone deploy QAN blockchain platform to major cloud platforms like Amazon AWS in less than 5 minutes that making QANplatform the fastest blockchain to deploy on the market.

{% endhint %}

{% content-ref url="/pages/n1OI6XkVz7n7Go9T4gfo" %}
[Hybrid blockchain](/technology/technology-features/hybrid-blockchain)
{% endcontent-ref %}

{% content-ref url="/pages/zvxAV3VvQSAtbkYuCoHX" %}
[Multi-language Smart Contracts | Hyperpolyglot](/technology/technology-features/multi-language-smart-contracts-or-hyperpolyglot)
{% endcontent-ref %}

{% content-ref url="/pages/D8Ktcr0LL1DhbmpphZuI" %}
[Ethereum EVM Compatibility](/technology/technology-features/ethereum-evm-compatibility)
{% endcontent-ref %}

{% content-ref url="/pages/emVCbqZ91cwyzHV7kOf0" %}
[Integrations](/technology/technology-features/integrations)
{% endcontent-ref %}

{% content-ref url="/pages/daF9vnj57BQ7qmoezaob" %}
[Proof-of-Randomness (PoR) consensus algorithm](/technology/technology-features/proof-of-randomness-por-consensus-algorithm)
{% endcontent-ref %}

{% content-ref url="/pages/3ENWo595zqXYJfwkgVfB" %}
[Transaction per second (TPS)](/technology/technology-features/transaction-per-second-tps)
{% endcontent-ref %}

{% content-ref url="/pages/JTIQc35htR2k67zbn6Vb" %}
[Developer Royalty Fees](/technology/technology-features/developer-royalty-fees)
{% endcontent-ref %}

{% content-ref url="/pages/2o5ushejnMSDObM0QHKv" %}
[Mobile Phone Validation](/technology/technology-features/mobile-phone-validation)
{% endcontent-ref %}

{% content-ref url="/pages/REypkcpp2QPp9S6SRaR1" %}
[Low-cost fixed transaction fees](/technology/technology-features/low-cost-fixed-transaction-fees)
{% endcontent-ref %}

{% content-ref url="/pages/Fr46aA1gYkrF5fLB5IL4" %}
[Quantum-resistant Security](/technology/technology-features/quantum-resistant-security)
{% endcontent-ref %}

{% embed url="<https://youtu.be/AYe33k4TUrM>" %}


# Hybrid blockchain

QANplatform, the hybrid blockchain platform

<figure><img src="/files/qIY83evggoTEIIGx23jQ" alt=""><figcaption></figcaption></figure>

## QANplatform is a hybrid blockchain

{% hint style="info" %}
💡\[Definition] **Hybrid blockchain**

A hybrid blockchain is best defined as a solution that combines the best technical properties of a private blockchain and a public blockchain.&#x20;
{% endhint %}

{% hint style="warning" %}
\[Market problem]: **Lack of hybrid blockchain platforms**

Most blockchains are either public or private. There is currently a lack of hybrid blockchain solutions, which is a must for facilitating enterprise mass adoption.
{% endhint %}

### Use QANplatform as a hybrid blockchain

QANplatform can be used as a **private blockchain** like *Corda* or *Hyperledger*, and also as a **public blockchain** like *Solana, Cardano, and Polkadot*. &#x20;

Transparency and data security are high priorities for modern businesses. Enterprises can define which parts of their data should be stored privately since QANplatform can be used as a hybrid blockchain.

{% hint style="success" %}
**Key Takeaways — \[Hybrid blockchain]:**

* QANplatform can be used as a hybrid blockchain.
* QANplatform will have a private blockchain and a public blockchain part as well.
* Users can decide which data is stored on the private blockchain and what should be anchored to the public blockchain.&#x20;
  {% endhint %}


# Multi-language Smart Contracts | Hyperpolyglot

20 Million developers will be able to enter the blockchain space thanks to QANplatform

{% embed url="<https://medium.com/qanplatform/qanplatforms-core-innovation-the-qvm-passes-security-audit-e6dad138207e>" %}

<figure><img src="/files/jD0Qy1wDG8YFUvXFWHyf" alt=""><figcaption></figcaption></figure>

## Code in ANY programming language on QANplatform!

{% hint style="info" %}
💡\[Definition] **Multi-language** — **Hyperpolyglot:**&#x20;

A hyperpolyglot is someone who is a gifted language accumulator. They possess a particular neurological trait that’s well-suited for learning languages very quickly and using them adeptly.
{% endhint %}

{% hint style="warning" %}
\[Market problem]: **Developers can't use their favored programming language**

Most of the currently existing blockchain platforms offer only 2-3 programming languages for developers to choose from to develop smart-contracts (DApps). There are also chains that are forcing developers to learn a new language, which can only be used for that specific blockchain like Solidity (Ethereum) or Teal (Algorand). This fundamentally limits mass adoption of blockchain technology because of the high entry barrier.&#x20;
{% endhint %}

{% embed url="<https://youtu.be/Hm4cBuUd3N0>" %}

## 20 million developers will be able to enter the blockchain space thanks to QANplatform

{% hint style="info" %}
**QANplatform's Vision:**&#x20;

A world where real and helpful use-cases are built on the blockchain.&#x20;

**QANplatform's Mission:** \
Empowering anyone to build rapidly and securely on the blockchain.&#x20;
{% endhint %}

A new initiative started by next-generation blockchains to allow developers to code in different languages by utilizing WASM (WebAssembly) is a great step forward, but there are better solutions.

QANplatform as a forward-thinking blockchain platform developed a new Multi-language smart contract mechanism. QANplatform's QVM (QAN Virtual Machine) will let developers run any kind of application, which would be able to run on a Linux Kernel.

> Thanks to the Multi-language Smart Contract development feature of QANplatform, 20 million developers will be able to enter the blockchain world and develop their first DApp on the blockchain, and this blockchain will be QANplatform.&#x20;

By lowering the entry barriers for the developer community letting them code in any programming language — but more importantly, in a language they have mastered and used for several years — will lead to blockchain mass adoption and completely new blockchain use cases which we have never dreamed about.&#x20;

\
QANplatform's multi-language movement leads to two other important benefits that support a better blockchain world:

1. From an enterprise perspective; companies who struggle to recruit the right talent for smart contract development can use their existing team or hire from a larger pool, reducing setup and maintenance costs.&#x20;
2. From a security perspective; the Decentralized Finance (DeFi) ecosystem will be more secure since developers won't be experimenting with new programming languages that handle millions of dollars. Instead, they will build and audit code in a programming language that they have already mastered for years.&#x20;

{% hint style="success" %}
**Key Takeaways — \[Multi-language Smart Contracts | Hyperpolyglot]:**&#x20;

* The requirement to learn a new programming language like Solidity or Teal limits the mass adoption of blockchain technology.&#x20;
* A new initiative started with WASM, but QANplatform's unique development takes it one level up: QANplatform's QVM will let developers run any kind of application, which would be able to run on a Linux Kernel.
* 20 million developers will be able to enter the blockchain space thanks to QANplatform.
* QANplatform's Multi-language feature will lead finally to blockchain mass adoption and completely new blockchain use cases which we never dreamed about.&#x20;
* It makes talent acquisitions, development, and codebase maintenance easier and cost-efficient for enterprises.&#x20;
* Decentralized Finance (DeFi) ecosystem will be more secure since developers are not experimenting with new programming languages that handle millions of dollars.
  {% endhint %}


# Ethereum EVM Compatibility

QANplatform, the Ethereum EVM compatible blockchain

<figure><img src="/files/gpOVL2J1o5CdmGMadO8b" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
💡\[Definition] **Ethereum EVM**

The Ethereum Virtual Machine (EVM) is a computation engine that acts like a decentralized computer with millions of executable applications called smart contracts. It is part of the Ethereum blockchain on which smart contracts can be deployed and executed.
{% endhint %}

{% hint style="warning" %}
\[Market problem]: **Most of the new blockchains are not Ethereum EVM compatible**

Projects currently running on the Ethereum network can only leave Ethereum at significant compromises for a more reliable, cost-predictable, cost-efficient, and secure blockchain platform alternative, since they would need to rewrite all their smart contracts in a different programming language resulting in a re-audit requirement as well.&#x20;
{% endhint %}

## **QANplatform will be Ethereum EVM compatible**

The whole blockchain ecosystem owes a lot to the Ethereum team, as Ethereum was the first smart contract platform to run decentralized applications (DApps). As the smart contract pioneer, Ethereum took a market advantage which is still held, since most blockchain projects and solutions are running on Ethereum.

90% of current enterprise blockchain platform implementations will require replacement within 18 months to remain competitive, secure, and avoid obsolescence, according to [Gartner](https://www.gartner.com/en/newsroom/press-releases/2019-07-03-gartner-predicts-90--of-current-enterprise-blockchain). There are signs that projects are already leaving first-generation blockchain platforms are already visible. Many projects are realising that Ethereum Layer 2 solutions are not the cure to all problems. However projects currently running on the Ethereum network could only leave Ethereum at significant compromises for a more reliable, cost-predictable, cost-efficient, and secure blockchain platform alternative.&#x20;

### **Move your code from Ethereum to QANplatform**

Thanks to QANplatform’s Ethereum EVM (Ethereum Virtual Machine) compatibility, developers can write, deploy, and run smart contracts as they would on Ethereum, but on top of that they and their users can enjoy all the benefits of QANplatform, such as the [Quantum-resistant security](/technology/technology-features/quantum-resistant-security), Proof-of-Randomness (PoR) consensus mechanism, Multi-language smart contract development, Developer Royalty Fees, Low and predictable transaction costs fixed in USD — to name a few.&#x20;

{% hint style="success" %}
**Key Takeaways — \[Ethereum EVM Compatibility]:**&#x20;

* QANplatform is Ethereum EVM compatible blockchain.
* Projects currently running on the Ethereum network can move their operation to QANplatform.&#x20;
* Thanks to Ethereum EVM compatibility, the QANplatform can win market share from Ethereum.
* Also all tooling like wallets, SDKs, etc. people already use with Ethereum remain compatible not forcing users to leave their favored toolkit behind.&#x20;
  {% endhint %}


# Integrations

QANplatform fits into your existing infrastructure. ‍

<figure><img src="/files/GsIG3IPnizNw3qGJqmpj" alt=""><figcaption></figcaption></figure>

## Build fast on QANplatform with integrations

{% hint style="warning" %}
\[Market problem]: **Unpredictable Time-To-Implementation**

Unlike with widely-used enterprise software solutions, there is a lack of compatible programming languages, automated workflow integration possibilities at existing blockchain platforms. These challenges are hindering blockchain mass adoption.&#x20;
{% endhint %}

{% hint style="info" %}
**FAQ:** All technology features and the entire ecosystem will be gradually released after the launch of the QAN public blockchain (MainNet).&#x20;
{% endhint %}

## QANplatform fits into your existing infrastructure ‍&#x20;

* Automatic Rapid Cloud Platform Deployment&#x20;
* Ethereum EVM Compatibility
* Multi-language Smart Contracts
* Private and Public blockchain (Hybrid blockchain)
* Deployment integrations
* Virtualized machine integrations
* Official support for selected bare-metal models&#x20;
* Oracle APIs&#x20;

QANplatform's mission is to empower anyone to build rapidly and securely on the blockchain. Quantum-resistant security is our unique selling point (USP), but we take one step back and focus on lowering the entry barrier for the developer community. This is to empower startups and enterprises to build their Proof-of-Concepts (PoC) and Minimum Viable Products (MVP) as fast as possible to reach time-to-market and mass adoption of QANplatform.&#x20;

QANplatform solves this issue by building integrations to existing, widely used and loved programming languages (TypeScript, Rust), DevOps technologies (Docker, Kubernetes), and Cloud Platforms (Amazon AWS, Microsoft Azure).

![](/files/4HNRnvgmaKye4PVdQbbZ)

## Rapid Cloud Platform Deployment

{% hint style="info" %}
Amazon AWS, Microsoft Azure, Google Cloud Platform, DigitalOcean, or Linode
{% endhint %}

Cloud computing and blockchain technology are two of the top strategic technology trends in the past five years. Both technologies gained even more focus and criticality after the COVID-19 pandemic because of their distributed and privacy-enhanced characteristics.

Thanks to the automated Rapid Cloud Platform Deployment feature developed by QANplatform, developers can deploy the QAN private blockchain in less than 5 minutes to major cloud platforms like Amazon AWS, Microsoft Azure, Google Cloud Platform, DigitalOcean, or Linode.&#x20;

> Smart contract developers can cut the deployment time by 80% compared to installing other blockchains like Ethereum, Polkadot or Algorand.

{% embed url="<https://finance.yahoo.com/news/qanplatform-presents-80-faster-cloud-134000566.html>" %}

## **Ethereum EVM Compatibility**&#x20;

{% hint style="info" %}
Projects running currently on Ethereum can move easily to QANplatform thanks to Ethereum EVM compatibility.&#x20;
{% endhint %}

Developers will be able to move their existing codebase which they wrote in Solidity and used in Ethereum since [QANplatform is fully Ethereum EVM compatible](/technology/technology-features/ethereum-evm-compatibility).&#x20;

## **Limitless programming language compatibility**

{% hint style="info" %}
QANplatform's QVM will let developers run any kind of application, which would be able to run on a Linux Kernel.

Developers will be able to code smart contracts in: JavaScript, Go, Java, TypeScript, Python, Rust, C#, PHP, C, Scala, ObjectiveC ...
{% endhint %}

One of QANplatform's IP is the unique [Multi-language Smart Contract methodology (Hyperpolyglot)](/technology/technology-features/multi-language-smart-contracts-or-hyperpolyglot). Thanks to this approach developers are not forced to learn a new programming language (like Solidity) to write smart contracts for it. Developers can use their most loved programming language to build on QANplatform.&#x20;

## Get started quickly&#x20;

{% hint style="info" %}
Docker, Kubernetes, Single-Host
{% endhint %}

Developers don't need to waste hours setting up the environment. Use Docker to get all the packages and libraries needed for setting up your QAN private blockchain in minutes. Easily deploy your QAN private blockchain with these systems (Docker, Kubernetes, Single-Host) and define later which of your data will be published on the QAN public blockchain.

## Run it on virtualized machines

{% hint style="info" %}
VMware, Xen, Microsoft Hyper-V, VirtualBox, KVM
{% endhint %}

Run your QAN private blockchain on your preferred virtualized machine.

## Run it on bare-metal

{% hint style="info" %}
Apple, HP, Dell
{% endhint %}

Run your QAN private blockchain on your preferred bare-metal server.

## Connect smart-contracts with Oracle APIs&#x20;

{% hint style="info" %}
Chainlink, Band Protocol
{% endhint %}

Connect smart contracts to the data sources and APIs they need to fulfill their tasks.

{% hint style="success" %}
**Key Takeaway — \[Integrations]:**

* Automatic Rapid Cloud Platform Deployment (Amazon AWS, Microsoft Azure...)
* Ethereum EVM Compatibility
* Programming language integration with Linux Kernel compatible languages
* Deployment integrations (Docker, Kubernetes, Single-Host)
* Virtualized machine integrations (VMware, Xen, Microsoft Hyper-V, VirtualBox, KVM)
* Bare-metal integrations (Apple, HP, Dell)
* Oracle APIs (Chainlink, Band Protocol)
  {% endhint %}


# Proof-of-Randomness (PoR) consensus algorithm

Proof-of-Randomness (PoR) consensus algorithm developed by QANplatform

<figure><img src="/files/2bcFc86EGB3oRHwJLQDf" alt=""><figcaption></figcaption></figure>

## PoR makes QANplatform eco-friendly, democratic, and fast

{% hint style="info" %}
💡\[Definition] **Consensus algorithm (or consensus mechanism)**

*A consensus algorithm refers to various methodologies used to achieve agreement, trust, and security across a decentralized computer network.*
{% endhint %}

{% hint style="info" %}
Did you know?&#x20;

The consensus algorithm is the key to high transaction per second (TPS) numbers. But always keep in mind; the fastest blockchains achieve a high TPS figure by giving up on blockchain technology's key mission: decentralization.
{% endhint %}

{% hint style="warning" %}
\[Market problem]: **Current consensus algorithms are solving only one problem**

Proof-of-Work (PoW) and Proof-of-Stake (PoS) are two of the most used consensus mechanisms. PoW, also known as mining, consumes a tremendous amount of energy and requires unnecessary hardware. While the other solution, Proof-of-Stake (PoS), does not use significant energy, it is not as democratic.&#x20;
{% endhint %}

### **Proof-of-Randomness (PoR) developed by QANplatform**

**New transparent technology such as blockchain technology must not waste our precious environmental resources. It is important to create and participate in technologies that lessen the burden on the earth and its resources.** **QANplatform developed a new consensus algorithm that consumes considerably less energy and yet remains democratic.**

> Thanks to the PoR consensus algorithm, validation ("mining") can be done by anyone, even with just a mobile phone or Raspberry Pi.

QANplatform leverages the Proof-of-Randomness (PoR) consensus protocol which possesses inherent verifiable pseudorandomness. As a result of its streamlined consensus protocol, there is no need for complex mathematical computations that require large amounts of energy.&#x20;

> With QANplatform there are no unnecessary computing undertakings and thus no large amounts of electrical energy are needed, so the operation is eco-friendly.

Within the QAN public blockchain (MainNet), block proposers are not selected based on the value of the stakes they committed. They are elected amongst themselves in a verifiably random manner, all without the possibility of tampering and manipulation. All validators have an equal opportunity to validate a block at any given point, based on a deposit paid in the QANX Token.&#x20;

> All validators have an equal opportunity to validate a block at any given point.

By moving the validation process away from mathematical equations and towards random choice,  the important benefit of scalability is almost immediately granted. Blocks' validators are selected by randomness,  and their validation choice is re-evaluated by the rest making sure tampering is impossible.

> This makes transactions per second (TPS) significantly higher.

{% hint style="success" %}
**Key Takeaways — \[QAN Proof-of-Randomness (PoR) consensus algorithm]**

* Proof-of-Randomness (PoR) is a new consensus algorithm developed by QANplatform.
* Proof-of-Randomness (PoR) combines the best parts of Proof-of-Work (PoW) and Proof-of-Stake (PoS).
* Proof-of-Randomness (PoR) is decentralized, eco-friendly, and fast.
* The QAN public blockchain (MainNet) will be powered by Proof-of-Randomness (PoR).
* Thanks to the PoR consensus algorithm, validation ("mining") can be done even with a mobile phone or Raspberry Pi.&#x20;
* Thanks to the PoR consensus algorithm QANplatform can achieve high TPS.&#x20;
  {% endhint %}

{% hint style="info" %}
**Why PoS instead PoR?** \
Proof-of-Randomness (PoR) is a highly experimental concept that requires extensive technological and economic modeling, testing, and auditing. Due to its experimental nature and the time-consuming testing and quality assurance period, we will launch the QAN MainNet Beta with Proof-of-Stake (PoS) to facilitate the QAN Ecosystem's growth as soon as possible. If users of the QAN MainNet Beta request PoR to be integrated into the MainNet, we will continue its development.
{% endhint %}


# Transaction per second (TPS)

QANplatform, the high TPS yet decentralized blockchain

<figure><img src="/files/tlsJjQXOlHSF26H3iYe5" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
💡\[Definition] **Transaction per second (TPS)**&#x20;

Transactions per second (TPS) is a measurement that represents the average number of transactions completed per second by a blockchain platform.
{% endhint %}

{% hint style="warning" %}
\[Market problem]: **High TPS vs. Decentralization**

The fastest blockchains achieve a high TPS number by giving up blockchain technology's key mission: decentralization.
{% endhint %}

## QANplatform: enterprise-ready high TPS yet decentralized blockchain

**The QAN blockchain platform is designed to solve issues plaguing today’s blockchains in regards to speed and decentralization. By employing a consensus mechanism called Proof-of-Randomness (PoR) which was developed by QAN, high transaction throughput can be achieved in an energy-efficient manner.**

> The utilization of the Proof-of-Randomness (PoR) mechanism — developed by QAN — ensures that the QAN blockchain platform is able to support fast transaction speeds.

The QAN MainNet has an initial testing speed of 1,600 TPS. Thanks to the interesting innovation, PoR, the platform is able to exponentially increase its TPS when used in the private blockchain mode.&#x20;

QANplatform provides the foundational structure for users who may want to create a private blockchain for themselves and use [QANplatform as a hybrid blockchain](/technology/technology-features/hybrid-blockchain). Within the confines of a QAN-enabled private blockchain run by private nodes and servers, the TPS will be able to climb as high as 97,000 TPS. This new approach is an interesting way to scale TPS in the future, through the combination of private and public blockchains, creating a fast and scalable hybrid blockchain.

> Using QANplatform as a hybrid blockchain platform a 155,200,000 TPS can be achieved in the best theoretical scenario.

Imagine that there are 1,600 companies in total on the public network. Each of them running a private blockchain on their separate infrastructure. Let's imagine that the network is fully saturated and they are utilizing all the 97,000 TPS on their private blockchains.

If every single company creates proof of the current state of their private blockchain and records it on the public blockchain that means 155,200,000 TPS could be achieved on the QAN public blockchain per second in a hybrid setting.&#x20;

{% hint style="success" %}
**Key Takeaways — \[Transaction per second (TPS)]:**&#x20;

* The fastest blockchains achieve a high TPS number by giving up the blockchain technology's key mission, which is decentralization.
* Thanks to the PoR consensus algorithm QANplatform can achieve enterprise-ready high TPS yet remain decentralized.&#x20;
* The QAN MainNet is capable to reach a speed of 1,600 TPS.
* QAN private blockchain is capable to reach a speed of 97,000 TPS.&#x20;
* The theoretical maximum TPS of QANplatform using it as a hybrid blockchain is 155,200,000 TPS.&#x20;
  {% endhint %}


# Developer Royalty Fees

QANplatform the Layer 1 which rewards developers.

<figure><img src="/files/XyNp1KWhyl2DuxsOK2IR" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
💡\[Definition] **Developer Royalty Fees (DRF)**

QANplatform designed a unique fee distribution system which splits the blockchain transaction fees between validators and those smart contract developers who originally wrote&#x20;
{% endhint %}

{% hint style="warning" %}
\[Market problem]:&#x20;

**Smart Contract Developers who build the ecosystem are not rewarded.**

Blockchain platforms only reward validators (miners, stakers) in their own utility token, however, smart-contract developers are ones who are building use cases and products on the blockchain to reach mass adoption.
{% endhint %}

## QANplatform, the first Layer 1 blockchain which rewards developers after each transaction and smart contract deployment

Imagine as GitHub would reward developers when their code is getting re-used by others. QANplatform is the first blockchain platform that favors developers to be active members of the ecosystem. QANplatform lets developers not only code smart contracts in any programming language thanks to the unique [Multi-language Smart Contract (Hyperpolyglot)](/technology/technology-features/multi-language-smart-contracts-or-hyperpolyglot) feature, it rewards developers in a decentralized and democratic way to receive the platform's utility token as a reward for their work and to boost QANplatform's mass adoption.&#x20;

Those developers who publish new generic code ([Generic Smart Contract Developers](https://learn.qanplatform.com/developers/smart-contract-developers)) to the QAN public blockchain (MainNet) will be rewarded by other developers (Specific Smart Contract Developers) in QANplatform's utility token (QANX Token) when they reuse the code written by the Generic Smart Contract Developers.

Furthermore every single future transaction interacting with contracts written by these developers will proportionally distribute part of the transaction fees among creators for a lifetime.&#x20;

This mechanism is completely decentralized and democtratic since developers can earn these rewards from those users directly who are using the smart contracts written by them.

### **Developers (Generic Smart Contract Developers) whose code will be re-used will be rewarded for a lifetime after every:**

1. New smart contract deployment fee is paid by Specific Smart Contract Developers.
2. Transaction which interacts with smart contracts (DApps) where the code is re-used.&#x20;

### Developers can cut their smart contract upload costs

QANplatform’s Developer Royalty System reduces burden on the network since only new or altered code logic parts will be uploaded on the QAN MainNet. As a result of this, Specific Smart Contract Developers who re-use already deployed code parts in their smart contracts pay proportionately less, since they only pay for the new code parts to be deployed on the blockchain.

{% hint style="success" %}
**Key Takeaways — \[Developer Royalty Fees]:**&#x20;

* QANplatform is the first Layer 1 blockchain that rewards developers after each transaction.
* Royalty fees are paid after smart contract re-deployment and each transaction in QANX.
* This methodology not only makes QANplatform attractive to developers but also reduces burden on the network since only new code logic parts will be added to the QAN MainNet.
* Developers can cut their smart contract upload costs.
  {% endhint %}

{% embed url="<https://docs.google.com/forms/d/15koDPX0dnZpgEFMNdxih7fXyGcjQ9lQujUiQ7EqMbnE/edit>" %}


# Mobile Phone Validation

Join the QAN MainNet as an ecosystem member with your mobile phone.

<figure><img src="/files/5T8kHgFvf7BOY5XVTRHA" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
💡\[Definition] **Validation ("Mining"):**

In most blockchains, miners are participants who contribute their computing power to verify the legitimacy of incoming transactions and add those verified transactions to new blocks on the blockchain.
{% endhint %}

{% hint style="warning" %}
\[Market problem]: **Current consensus algorithms are solving only one problem**

Proof-of-Work (PoW) and Proof-of-Stake (PoS) are two of the most used consensus mechanisms. PoW, also known as mining consumes a tremendous amount of energy and requires unnecessary hardware. The other solution, Proof-of-Stake (PoS), uses significantly less energy but is not as democratic.
{% endhint %}

## Validation (Mining) even with a mobile phone on QANplatform

New transparent technology such as blockchain should not waste our precious environmental resources. It is important to create and participate in technologies that lessen the burden on the earth and its resources.&#x20;

QANplatform developed a new consensus algorithm that consumes considerably less energy and yet remains democratic.

> Thanks to the [Proof-of-Randomness (PoR)](/technology/technology-features/proof-of-randomness-por-consensus-algorithm) consensus algorithm, validation ("mining") can be done even with a mobile phone or Raspberry Pi on QANplatform.&#x20;

Thanks to the low hardware and energy requirements of PoR, everyone will be able to join as a validator on the QAN public blockchain (QAN MainNet).

Validation starts with the QAN MainNet launch, but you can already [register for Validator updates](/developers/validators).&#x20;

{% hint style="success" %}
**Key Takeaways — \[Mobile Phone Validation]:**&#x20;

* Proof-of-Randomness (PoR) is a new consensus algorithm developed by QANplatform.
* Proof-of-Randomness (PoR) is combines the best parts of Proof-of-Work (PoW) and Proof-of-Stake (PoS).
* Proof-of-Randomness (PoR) is decentralized, environment-friendly, and fast.
* Thanks to the PoR consensus algorithm, validation ("mining") can be done even with a mobile phone or Raspberry Pi.&#x20;
* Validation starts with the QAN MainNet launch.&#x20;
  {% endhint %}


# Low-cost fixed transaction fees

Low fixed transaction fees by QANplatform

<figure><img src="/files/JwRbrtnmrAgAKd8SuynE" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
💡\[Definition] **Transaction fees:**

The blockchain transaction fee is an economic security mechanism designed to prevent malicious actors from flooding the blockchain with irrelevant transactions to saturate the network making legitimate transactions unprocessable. This fee is charged in the platforms' utility token when performing blockchain transactions, and is always deducted from the account starting the transaction itself.
{% endhint %}

{% hint style="warning" %}
\[Market problem]: **Unpredictable transaction fees**&#x20;

Businesses or average blockchain users can’t calculate the future expenses for transactions on current blockchains. This is a problem for the whole blockchain industry especially for DeFi ecosystems dealing with mass transactions, bridges, DApps uploads, etc.&#x20;
{% endhint %}

## QANplatform says goodbye to the ever-changing high transaction fees

Everyone is aware of Ethereum's painfully high gas fees. Whether the user would like to buy an NFT, use a DeFi solution, or just buy/sell tokens, the volatile gas fee can be a real financial burden.&#x20;

The solution for this specific problem from QANplatfom is to introduce a pre-defined price range (min and max) for transaction fees. Transaction fees will be fixed to USD. This helps to plan and predict costs no matter if you are an individual or an enterprise.&#x20;

The community will have the chance to change the transaction fee price-range through governed voting.&#x20;

{% hint style="success" %}
**Key Takeaways — \[Low-cost fixed transaction fees]:**&#x20;

* QANplatform transaction fee price-range will be fixed to USD.
* By governed voting, the fee price-range could be changed.
  {% endhint %}


# Quantum-resistant Security

QANplatform, the quantum-resistant blockchain platform

<figure><img src="/files/OpeqB8kcXISYXE9MIi7R" alt=""><figcaption></figcaption></figure>

{% embed url="<https://cointelegraph.com/press-releases/qanplatform-joins-linux-foundation-and-its-post-quantum-cryptography-alliance>" %}

{% hint style="success" %}
NIST recommends ML-DSA as the primary algorithm for quantum-resistant signatures based on CRYSTALS-Dilithium - the one QANplatform has chosen well before NIST officially recommending it. ML-DSA is used by QANpltaform through QAN XLINK.
{% endhint %}

{% hint style="info" %}
💡\[Definition] **Quantum-resistant:**

Quantum-resistant algorithms — also known as post-quantum, quantum-secure, or quantum-safe — are cryptographic algorithms that can resist attacks from quantum computers.
{% endhint %}

{% hint style="warning" %}
\[Market problem]: **Quantum computers will break 99% of today's blockchain platforms**&#x20;

Powerful quantum computers with enough stable, error-corrected logical qubits will be able to break 99% of today's blockchain platforms and cryptocurrencies like Bitcoin, Ethereum, Solana, Cardano, Ripple, Polkadot, etc.&#x20;
{% endhint %}

{% embed url="<https://youtu.be/AYe33k4TUrM>" %}

## QANplatform, the quantum-resistant blockchain platform

The quantum computer threat is no longer just a FUD. Powerful quantum computers with enough stable, error-corrected logical qubits will break the cryptography behind 99% of today’s blockchain platforms.&#x20;

The most worrying and already proven part is that they will be able to break most asymmetric cryptography-related schemes, including the digital signature scheme used by Bitcoin and Ethereum, etc.

In short, we trusted these algorithms because incrementing the key size would increase the hardness of breaking it exponentially. Quantum computers will linearly tackle this, meaning doubling the key size will only need double the qubits to break. Everything we considered safe so far would be gone for this reason.

> Based on the latest post-quantum cryptographic research ([1](https://arxiv.org/abs/2102.00659))([2](https://arxiv.org/abs/1905.10074v3))([3](https://phys.org/news/2020-11-approach-circuit-compression-real-world-quantum.html))([4](https://www.sciencedirect.com/science/article/pii/S2590005621000138)) all wallets relying on EC cryptography that have at least 1 outgoing transaction will break by a 1,121+ qubits quantum computer.

### QANplatform's Lattice-based post-quantum cryptographic algorithm implemented in Go programming language

QANplatform has developed 4 IPs (Intellectual Properties): [Proof-of-Randomness (PoR)](/technology/technology-features/proof-of-randomness-por-consensus-algorithm) consensus algorithm, [Multi-language smart contract development (Hyperpolyglot)](/technology/technology-features/multi-language-smart-contracts-or-hyperpolyglot), [Rapid cloud deployment](/technology/technology-features/integrations) for major providers. The most important is QAN XLINK, which is responsible for ensuring a 100% successful migration path when quantum computing attacks will affect elliptic curve cryptography utilized by mainstream blockchains.

We implemented a post-quantum signature scheme that is used to cross-sign accounts. This was necessary so that as quantum computers become available we'd have an immediate solution as opposed to anyone else on the market.

{% embed url="<https://www.youtube.com/watch?v=VX-zgOgTt7s&t=704s>" %}
Johann Polecsak, Co-Founder and CTO of QANplatform at QuantumEnterprise event in San Diego
{% endembed %}

### QANplatform is using NIST approved primary post-quantum algorithm.&#x20;

NIST (National Institute of Standards and Technology) was founded in 1901. Its role is creating critical measurement solutions and promoting equitable technology standards for the world.

On the 13th of August, 2024, NIST released the first 3 finalized quantum-resistant cryptographic algorithms which includes CRYSTALS-Dilithium (later ML-DSA) as the primary algorithm for quantum-resistant signatures. QANplatform has chosen this algorithm well before NIST officially recommending it and is being used through QAN XLINK to provide an alternative signature scheme which can withstand the attack of quantum computers that will crack the security used to protect privacy in the digital systems we rely on every day.&#x20;

**This makes QANplatform the only blockchain platform on the market which offers Ethereum compatibility and a 100% safe and successful migration path in the post-quantum era.**

> **NIST recommends ML-DSA as the primary algorithm for quantum-resistant signatures based on CRYSTALS-Dilithium - the one QANplatform has chosen well before NIST officially recommending it. ML-DSA is used by QANpltaform through QAN XLINK.**

{% hint style="success" %}
**Key Takeaways — \[Quantum-resistant Security]:**&#x20;

* Quantum computers will break 99% of today's blockchain platforms.&#x20;
* Upgrading cryptography primitives in existing blockchain implementations won’t save them from the quantum threat.
* All wallets relying on EC cryptography which have at least 1 outgoing transaction will break.
* One of QANplatform's IPs is QAN XLINK, which is responsible for ensuring a 100% successful migration path when quantum computing attacks will affect elliptic curve cryptography.
* NIST recommends ML-DSA as the primary algorithm for quantum-resistant signatures based on CRYSTALS-Dilithium - the one QANplatform has chosen well before NIST officially recommending it. ML-DSA is used by QANpltaform through QAN XLINK.
  {% endhint %}


# Use Cases

QANplatform can handle all existing blockchain use cases and it is built to serve future ones too.

<figure><img src="/files/ivaHK5PZmofuF3t03uWj" alt=""><figcaption></figcaption></figure>

## QANplatform Use Cases

A Layer 1 blockchain platform, like QANplatform is the basic infrastructure of all blockchain projects and applications. It is like the operating system on a computer. The whole ecosystem can only build and work on top of it. QANplatform can handle all existing blockchain use cases and make them [quantum-resistant](/technology/technology-features/quantum-resistant-security) for the future.&#x20;

{% hint style="success" %}

### These all can be built on QANplatform&#x20;

Developers and enterprises can build all these on top of the QAN blockchain platform:

* Quantum-resistant **smart-contracts,**&#x20;
* Quantum-resistant **DApp** **(Decentralized Application),**&#x20;
* Quantum-resistant **DeFi (Decentralized Finance),**
* Quantum-resistant **token / cryptocurrency,**
* Quantum-resistant **NFT (Non-fungible token),**
* &#x20;Quantum-resistant **DAO (Decentralized Autonomous Organization),**
* Quantum-resistant **CBDC,**
* Quantum-resistant **Metaverse,**
* Quantum-resistant **Web3**
  {% endhint %}

### Hybrid blockchain technology for every use case

QANplatform uses the [hybrid blockchain model](/technology/technology-features/hybrid-blockchain), that widens the possibilities to fulfill both enterprise and customer-focused use cases. Projects building on QANplatform can use the QAN private blockchain with 97,000 [TPS](/technology/technology-features/transaction-per-second-tps). They can also decide which data shall be posted from the private blockchain to the QAN public blockchain (MainNet).

### &#x20;Read the QANplatform Use Case Stories

{% embed url="<https://medium.com/qanplatform/qanplatform-use-case-story-dapps-3c9ea80e24f9>" %}

{% embed url="<https://medium.com/qanplatform/qanplatform-use-case-story-defi-fde8e735c9db>" %}

{% embed url="<https://medium.com/qanplatform/qanplatform-use-case-story-nft-56b7ad72239e>" %}

{% embed url="<https://medium.com/qanplatform/qanplatform-use-case-story-dao-61f04ee943c0>" %}

{% embed url="<https://medium.com/qanplatform/qanplatform-use-case-story-metaverse-a42f66bef560>" %}

{% embed url="<https://medium.com/qanplatform/qanplatform-use-case-story-web3-db76911dd387>" %}

{% embed url="<https://medium.com/qanplatform/qanplatform-use-case-story-insurance-2c157cc25e6d>" %}

{% embed url="<https://medium.com/qanplatform/qanplatform-use-case-story-automotive-industry-7cbd11bbb31e>" %}

{% embed url="<https://medium.com/qanplatform/qanplatform-use-case-story-government-public-sector-5f4698fe3259>" %}

{% embed url="<https://medium.com/qanplatform/qanplatform-use-case-story-supply-chain-bf40e5c545fc?source=collection_home---4------1----------------------->" %}

{% embed url="<https://medium.com/qanplatform/qanplatform-use-case-story-manufacturing-2ba511536ea5>" %}

{% embed url="<https://medium.com/qanplatform/qanplatform-use-case-story-healthcare-532cf3e9498c>" %}

{% embed url="<https://medium.com/qanplatform/alpine-esports-signs-qanplatform-as-its-official-blockchain-partner-18a6b604388c>" %}


# Blockchain 101

The Blockchain 101 series

In this series, we embark on an exciting journey to unravel the mysteries of blockchain technology and provide you with a solid foundation of knowledge.

Our aim is to demystify blockchain and break down complex concepts into easily digestible explanations. Whether you’re a curious beginner, a tech enthusiast, or a professional looking to enhance your understanding, this series will cater to your needs.&#x20;

So, buckle up, embark on this enlightening expedition, and prepare to dive deep into the world of blockchain.

{% content-ref url="/pages/k3WN5xfx7a8aaFujgWWp" %}
[Blockchain Basics](/technology/blockchain-101/blockchain-basics)
{% endcontent-ref %}

{% content-ref url="/pages/JoeJyu7PG6pLSLKYknTK" %}
[Crypto Wallets](/technology/blockchain-101/crypto-wallets)
{% endcontent-ref %}

{% content-ref url="/pages/NmptBh4YIkKEbeoqP6BH" %}
[Coin and Token Types](/technology/blockchain-101/coin-and-token-types)
{% endcontent-ref %}

{% content-ref url="/pages/VlbGtFsnmq8HyAHa7U1f" %}
[Blockchain Transactions](/technology/blockchain-101/blockchain-transactions)
{% endcontent-ref %}


# Blockchain Basics

Blockchain 101 - Part 1

<figure><img src="/files/lvh8orCDbcc0xm1OgKmd" alt=""><figcaption></figcaption></figure>

<details>

<summary>What is a blockchain?</summary>

<mark style="background-color:yellow;">Blockchain is an unchangeable digital ledger that is collectively shared, enabling the seamless recording of transactions and monitoring of assets within a network.</mark>

Assets can encompass both tangible items like houses, cars, cash, and land, as well as intangible entities such as intellectual property, patents, copyrights, and branding. Virtually any valuable item can be traced and exchanged on a blockchain network, leading to decreased risks and reduced expenses for all participants involved.

Information is the lifeblood of business, and its prompt delivery, accuracy, and security are crucial for success. Blockchain technology serves as an optimal solution for distributing this information by offering immediate, shared, and transparent data stored on an unchangeable ledger that can only be accessed by authorized members of a network.

A blockchain network has the capability to monitor various aspects such as orders, payments, accounts, and production, among others. By enabling network participants to have a unified perspective of the truth, blockchain allows for complete visibility of transaction details from start to finish. This not only enhances confidence but also unlocks new efficiencies and opportunities for businesses.

Blockchain can be utilized in various forms such as public, private, or hybrid blockchains, which we will delve into further in the subsequent discussion.

</details>

<details>

<summary>What is a blockchain node?</summary>

Blockchains consist of a group of computers known as nodes. These nodes work together to synchronize the blockchain’s data, handle transaction requests, and reach consensus on the validity of those transactions.

Let’s take Bitcoin as an example. In the Bitcoin network, there are different types of nodes. The first type is full nodes, which play a crucial role in supporting and securing the Bitcoin blockchain. These nodes verify transactions and blocks based on the rules of the Bitcoin protocol. They are essential for the network to function properly.

Another type of node is called listening nodes or supernodes. These are full nodes that are publicly visible and accessible. They can communicate with all the node that connects to them. They provide blockchain data to other nodes and can also serve as communication bridges between nodes.

Mining nodes are specifically dedicated to mining Bitcoin. They run specialized mining software and often use ASIC machines to invest significant resources in the hope of earning Bitcoin’s block reward.

Lastly, there are lightweight or SPV clients. These nodes utilize the Bitcoin blockchain but don’t have the responsibility of validating transactions. Instead, they gather information from supernodes and act as communication endpoints. They don’t store a copy of the entire blockchain and don’t contribute to the network’s security.

<mark style="background-color:yellow;">In summary, blockchains like Bitcoin rely on different types of nodes, including full nodes, listening nodes, mining nodes, and lightweight clients, to ensure the proper functioning and security of the network.</mark>

</details>

<details>

<summary>What is a block?</summary>

<mark style="background-color:yellow;">With each data transaction taking place, it is documented and stored as a data block. These blocks form a chain of data.</mark>

Blocks are arranged in a specific order, with new blocks added at the end of the chain. Each block includes a unique identifier called a hash, which references the previous block. This is an important security feature of blockchain technology that makes it incredibly difficult to tamper with the ledger.

In addition to important information like the time of the transaction and the record itself, every block contains the solution to a special puzzle that requires computational power to solve.

The very first block is the genesis block. Unlike other blocks, it doesn’t have a reference to a previous block because it marks the beginning of the chain.

The structure of blocks in a blockchain provides a strong defense against hacking or manipulation. Each block includes a hashed reference to all the data that came before it in the chain. This means that if someone wanted to alter a record on the blockchain, they would have to change every single block, which is nearly impossible. Furthermore, the blockchain is not stored in a single location but is distributed across the computers of all the blockchain users, making it even more secure.

In summary, the sequential arrangement of blocks, their unique references, and the decentralized storage of the blockchain’s data makes it highly resistant to hacking and fraud.

</details>

<details>

<summary>What is a smart contract?</summary>

<mark style="background-color:yellow;">Contrary to public misbelief, smart contracts are neither smart nor contracts. They are computer programs running on the blockchain.</mark>

Smart contracts are computer programs that automatically carry out predefined parameters. The terms are coded directly into the program’s lines. This program is stored on a decentralized blockchain network. When specific conditions outlined in the code are met, the smart contract is executed automatically. Once the code is run, it cannot be undone or modified.

Smart contracts offer a major benefit by allowing transactions and agreements to happen between parties who may not fully trust each other. This means that there’s no need for a third-party authority, legal system, or external mechanism to oversee the process. It allows for anonymous execution of agreements.

It’s important to note that while smart contracts often resemble traditional legal contracts and involve actions between parties, they are not legal documents in themselves.

</details>

<details>

<summary>What is a decentralized application (dApp)?</summary>

<mark style="background-color:yellow;">Smart contracts, or also called as Decentralized Applications (DApps) are applications that operate on a distributed computing system, specifically a blockchain network, rather than relying on a single server.</mark>

When defining a DApp, they are typically characterized by being Open Source, Decentralized, and Cryptographically secure.

DApps consist of two important components: the frontend and the backend. The frontend is responsible for user interaction, while the backend is essentially a smart contract.

The main advantage of choosing a DApp over a traditional app is that traditional apps use a centralized architecture, where data is stored on servers controlled by a single entity. This centralized setup has a single point of failure, making it vulnerable to technical issues and malicious attacks. On the other hand, DApps offer similar quality of service as regular apps while benefiting from decentralization, including high uptime and resistance to censorship and corruption.

DApps come in various forms and serve different purposes. They can include gaming platforms, social media networks, cryptocurrency wallets, and financial applications like decentralized finance (DeFi).

</details>

<details>

<summary>Who are the key stakeholders of a blockchain?</summary>

The different parts of a blockchain can be categorized into distinct layers, with each layer involving various stakeholders.

At the protocol layer, we have Developers, Researchers, and academia. Developers have the task of designing and improving blockchain protocols, designing the architecture of blockchain systems, and possessing expertise in data structures and cryptography. Researchers play a crucial role in educating others about blockchain technology’s impact and exploring its wide-ranging applications in business and society.

The networking layer involves stakeholders like Miners, Validatos, Industry bodies, and Traders. Miners contribute to public blockchains like Bitcoin by building consensus among untrusted nodes. They add transactions to the network by solving complex mathematical problems, requiring substantial computing power and electricity. Industry bodies act as intermediaries between researchers, private entities, and public institutions, advocating for blockchain technology and establishing standards. Traders are entities that rely on cryptocurrencies rather than traditional fiat currency, allowing others access to blockchain protocols through cryptocurrency tokens.

The application layer encompasses entrepreneurs, end-users, corporations, and venture capitalists or investors. Entrepreneurs develop applications, products, or services that make use of blockchain protocols and networks. While profitability is a common goal for entrepreneurs, those in the blockchain space often have an anti-establishment approach and a lack of trust in traditional systems. End-users are individuals who utilize blockchain applications, products, or services, and their preferences greatly influence the decision-making of other stakeholders. Corporations aim to solve business problems and develop new strategies using blockchain technology, recognizing its value in areas like trust, transparency, data security, sustainability, and ethical sourcing. Venture capitalists or investors provide capital to establish the blockchain infrastructure. They have opportunities to invest in blockchain protocols directly or support companies that provide essential services and infrastructure for the blockchain ecosystem.

<mark style="background-color:yellow;">In summary, blockchain involves a diverse range of stakeholders across different layers, including developers, researchers, miners, validators, traders, entrepreneurs, end-users, corporations, and venture capitalists or investors. Each stakeholder plays a unique role in the development, adoption, and utilization of blockchain technology.</mark>

</details>

<details>

<summary>What are the most common blockchain use cases?</summary>

In addition to its growing adoption in established industries such as [Government and Public Sector](https://medium.com/qanplatform/qanplatform-use-case-story-government-public-sector-5f4698fe3259), [Manufacturing](https://medium.com/qanplatform/qanplatform-use-case-story-manufacturing-2ba511536ea5), [Supply Chain](https://medium.com/qanplatform/qanplatform-use-case-story-supply-chain-bf40e5c545fc), or [Healthcare](https://medium.com/qanplatform/qanplatform-use-case-story-healthcare-532cf3e9498c), blockchain technology has also given rise to several new industries and use cases. These include cryptocurrency, [NFT](https://medium.com/qanplatform/qanplatform-use-case-story-nft-56b7ad72239e) (Non-fungible token), [DeFi](https://medium.com/qanplatform/qanplatform-use-case-story-defi-fde8e735c9db) (Decentralized Finance), [DAO](https://medium.com/qanplatform/qanplatform-use-case-story-dao-61f04ee943c0) (Decentralized Autonomous Organization), and the [Metaverse](https://medium.com/qanplatform/qanplatform-use-case-story-metaverse-a42f66bef560).

Blockchain use cases can differ significantly across industries and applications, but they share several common characteristics. These include decentralization, transparency, security, immutability, trust and trustlessness, and data integrity.

</details>

<details>

<summary>What is a private blockchain?</summary>

A private blockchain or permissioned blockchain is a type of blockchain or distributed ledger that operates within a closed network controlled by a single entity or a closed group. Unlike public blockchains that are open to anyone, a private blockchain restricts access to only authorized participants. This means that new participants must go through a verification process to join the network, and the participation in the consensus process is limited to certain individuals.

<mark style="background-color:yellow;">Private blockchains are typically used within the internal network of an enterprise. They are designed for the specific needs of the organization and rely on trust among the employees or partners within that organization. Unlike public blockchains that are decentralized, a private blockchain is centralized because it is controlled by a single entity or a closed group.</mark>

Private blockchain helps organizations keep their information for authorized parties only. Private blockchains are ideal for establishing a closed ecosystem of business-to-business (B2B) transactions among a select group of entities operating within the same industry vertical. In practical terms, only authorized participants within the network are given permissions to access specific data types and perform designated actions. This approach ensures efficiency and security when implementing sensitive business operations that involve confidential corporate information.

However, even though the overall system is centralized, certain components within a private blockchain may still be decentralized or distributed in their structure. Private blockchain platforms often have additional regulations and rules that govern the behavior of the nodes to ensure proper workflow and security.

The main advantages of private blockchains are their high efficiency, enhanced privacy, and discretion. They provide a powerful and secure technology solution for enterprises that require sophisticated tools to support their processes and streamline their workflows.

\ <br>

</details>

<details>

<summary>What is a public blockchain?</summary>

<mark style="background-color:yellow;">A public blockchain, also referred to as permissionless blockchain, is a global and open network that operates in a decentralized manner. It allows anyone to participate in transactions, contribute to the consensus protocol, and review the contents of the blockchain.</mark>

One major benefit of a public blockchain is its transparency. Since anyone can join the network, it offers greater visibility into transactions and operations compared to private networks. It is also more decentralized because no single entity has complete control over the entire system. This decentralization helps ensure the integrity and security of the blockchain.

However, public blockchains can face challenges in terms of transaction speeds and scalability. Due to their openness and the involvement of a large number of participants, processing transactions can take longer, and the network may struggle to handle a high volume of transactions.

Despite these challenges, public blockchains are resistant to censorship and external interference. Because there is no single point of failure or control, it becomes difficult for any individual or entity to manipulate or disrupt the blockchain. This attribute enhances the trustworthiness and reliability of the system.

</details>

<details>

<summary>What is a hybrid blockchain?</summary>

<mark style="background-color:yellow;">A hybrid blockchain is a special type of blockchain that combines features from both public and private blockchains. It brings together the best of the two blockchain types to form a unique system.</mark>

Most blockchains are either public or private. There is currently a lack of hybrid blockchain solutions, which is a must for facilitating enterprise mass adoption.

In a hybrid blockchain, enterprises can decide which data (transaction) shall be posted from private blockchain to public blockchain. This flexibility allows them to control who can access specific data on the blockchain and decide which data should be made public.

</details>

<details>

<summary>What is a Layer-1 blockchain?</summary>

<mark style="background-color:yellow;">A Layer-1 blockchain platform is the basic infrastructure of all blockchain projects and applications. It is like the operating system on a computer. The whole ecosystem can only build and work on top of it.</mark>

A Layer-1 blockchain is the fundamental building block of a blockchain network. It serves as the underlying protocol that forms the basis of the entire system. The primary purpose is to securely record transactions on a public ledger that cannot be modified or tampered with.

Layer-1 blockchains are considered the most basic form of blockchain technology. They are often called the “core” or “foundation” of the network because they provide the necessary infrastructure for other applications and protocols to operate. They play a crucial role in maintaining the distributed ledger, validating transactions, and protecting the network from any harmful activities.

In simpler terms, a Layer-1 blockchain is like the solid ground on which the entire blockchain network stands. It ensures that transactions are recorded accurately and securely, allowing other layers and applications to function effectively on top of it.

</details>

<details>

<summary>What is a Layer-2 blockchain?</summary>

A Layer-2 network is a secondary protocol that is built on an existing Layer-1 blockchain system. Its main purpose is to enhance the scalability of the underlying blockchain by handling a large number of transactions quickly.

Popular blockchains like Ethereum have become increasingly popular due to their programmability and resistance to censorship, which allows for a wide range of products and use cases to be developed on them. However, Ethereum can only process a limited number of transactions per second, leading to congestion and high transaction fees.

Layer-2 protocols serve as a solution to this problem by creating an additional framework where transactions and processes can occur independently from the main blockchain. These protocols are often referred to as “off-chain” scaling solutions. They offer several benefits, including increased transaction throughput and reduced costs.

By offloading a significant portion of the workload to the second layer, the main chain can focus on providing security while the second layer achieves high transaction speeds. This means that hundreds or even thousands of transactions per second can be processed without compromising the network’s security.

<mark style="background-color:yellow;">In simpler terms, Layer-2 networks are like an extra layer built on top of an existing blockchain system. They help increase transaction speed and capacity without needing to make significant changes to the main blockchain. The result is a more efficient and scalable blockchain network overall.</mark>

</details>

Read all questions and answers in one single blog post:&#x20;

{% embed url="<https://medium.com/qanplatform/blockchain-101-everything-you-need-to-know-about-blockchain-basics-2514213f6e9e>" %}


# Crypto Wallets

Blockchain 101 - Part 2

<figure><img src="/files/nE5IB47QtiLNdZfSOlqq" alt=""><figcaption></figcaption></figure>

<details>

<summary>What is a blockchain wallet?</summary>

<mark style="background-color:yellow;">A blockchain wallet represents a vital tool in the realm of cryptocurrency, serving as a secure and anonymous digital wallet that empowers users to effectively manage diverse forms of cryptocurrencies, such as Bitcoin, Ethereum, or QANX.</mark>

Its core purpose lies in facilitating seamless fund exchanges, ensuring both convenience and security. The cryptographic signatures employed in transactions guarantee the integrity and protection of each transaction. Accessible via web devices, including mobile platforms, this wallet upholds user privacy and identity confidentiality. By encompassing these essential features, a blockchain wallet establishes a robust framework for executing secure and trustworthy transfers and exchanges of funds among various parties.

The blockchain wallet itself can manifest in different forms, including internet-connected “hot wallets” like MetaMask, or offline “airgapped” hardware wallets. From a technical standpoint, it is pertinent to view the wallet as the client responsible for managing the functionality, as opposed to being solely reliant on storing cryptographic keys.

In common practice, individuals frequently employ the term “wallet” to encompass their overall cryptocurrency portfolio, the associated accounts derived from it, or even an individual account.

</details>

<details>

<summary>How can you ensure the security of your blockchain wallet?</summary>

*<mark style="background-color:yellow;">By adhering to simple yet effective best practices, you can elevate the security of your</mark>* <mark style="background-color:yellow;"></mark><mark style="background-color:yellow;">crypto wallet and fortify the protection of your holdings. Some recommended measures include safeguarding your seed phrase, opting for cold wallets, utilizing multiple addresses, and exercising caution when dealing with tokens received through airdrops.</mark>

Safeguarding your cryptocurrency from potential hacks involves implementing straightforward yet effective measures. Firstly, it is crucial to ensure the secure setup of your wallet.

Activating two-factor authentication (2FA) to your exchange account adds always an extra layer of protection.

By setting up your self-custodial wallet you can mitigate the risk of future hacks by using a **freshly installed computer** which was never connected to the internet before. If and when you need internet access to setup a wallet or transact with it, you should **avoid utilizing public Wi-Fi networks**. Avoiding public Wi-Fi networks is a general rule in the online space.

It is advisable to **set up a hardware wallet**. Hardware wallets are physical devices designed explicitly for storing cryptocurrencies securely offline. They are considered the most reliable type of crypto wallet.

Aside from hacking exchanges, one of the most prevalent cryptocurrency scams involves persuading individuals to download counterfeit wallets or utilize fake applications. Scammers often distribute fraudulent versions of popular wallets like MetaMask, even resorting to advertising these deceptive wallets on platforms such as Facebook or Google. Protecting oneself from such scams involves **exclusively downloading wallets from the official websites of their respective developers**.

It is recommended to **use a unique and strong password specifically for your wallet** to enhance security. When using a browser-extension wallet such as MetaMask wallet, it is important to note that the wallet may prompt you for your password frequently. However, the wallet will only request your seed phrase during the initial installation. If you encounter a window that resembles your wallet and solicits your seed phrase while browsing the web, it is highly likely that you have come across a malicious website.

Accessing a wallet necessitates the provision of a unique and confidential 12-24-word seed phrase. **The loss of this seed phrase results in the irretrievable loss of wallet access and the inability to recover your assets.** Therefore, it is of utmost importance to securely store your wallet’s secret seed phrase.

It is considered a best practice to refrain from saving your seed phrase on any computer or smartphone. It is essential to avoid keeping plaintext copies or screenshots of your seed phrase. **Your password and seed phrase should be stored offline in a secure location** — or multiple locations — that is preferably protected from fire and water damage. Maintaining the confidentiality of the physical backup’s location is imperative.

Simultaneously, it is vital to **ensure that your password and seed phrase remains unknown to any other individual**, as anyone possessing it can gain unrestricted access to and control over your assets. **Never share your seed phrase or your private keys with anyone!**

**Don’t put all your eggs in one basket!** By distributing your cryptocurrencies across multiple wallets, you can effectively mitigate the risks associated with losing all your digital assets in the event of a hack. It is also advisable to use fresh wallets for each airdrop if you want to participate in one.

When it comes to airdrops, it is essential to **exercise caution and refrain from engaging with randomly received tokens** in your wallet address. It is advisable to treat them similarly to spam emails: avoid interacting with them and leave them untouched. Interacting with such tokens can potentially result in the loss of all the tokens present in that particular wallet.

</details>

<details>

<summary>What is an address?</summary>

<mark style="background-color:yellow;">A wallet address, which is also called as crypto address or blockchain address is a special combination of characters that acts as a representation of a wallet used to receive, store, send cryptocurrency. It’s like a real-life address, bank account, or an email address.</mark>

Most wallet addresses are hard for people to read since they consist of long random strings of letters and numbers, but computers can easily understand them. Bitcoin addresses mostly start with a “1” or “3” and are typically 26–35 alphanumeric characters long. Ethereum and Binance Smart Chain addresses start with “0x,” followed by a string of 40 hexadecimal characters.

Addresses are created using a private key, which is also unique to the address. The digital assets held by the address can be accessed with the private key. Never share your private key with anyone!

Blockchain addresses are public and often called “public keys”. By using a blockchain explorer, you have the ability to observe the transactions linked to an address and check the number of assets it holds.

Although addresses are public, they are mostly anonymous (or pseudonymous). The person who owns an address usually doesn’t have their real name connected to it, and setting up a new wallet address on the blockchain doesn’t require any personally identifiable information. Nevertheless, there are situations where the identities of addresses and the people or organizations associated with them are identifiable, such as in the case of exchanges.

</details>

<details>

<summary>What are public and private keys?</summary>

<mark style="background-color:yellow;">Public-key cryptography relies on two essential components: public keys and private keys, which function as its operational elements. Jointly, they facilitate the encryption and decryption processes for data circulating within a network. While the public key is openly accessible and can be distributed without limitations, it is crucial to safeguard the private key, ensuring exclusive knowledge limited to its rightful owner.</mark>

A public key is a unique combination of letters and numbers used to encrypt messages into a secure form called ciphertext. It enables peer-to-peer transactions without revealing private key details, ensuring a safe exchange of assets and information without involving a third party.

When engaging in a transaction, a user shares their public key with the other party. They can make this key public for everyone to see. Private keys, on the other hand, are secret keys used to access cryptocurrency funds. They correspond to specific public keys and are generated together using advanced encryption algorithms. This ensures that knowing someone’s public key doesn’t allow anyone to figure out their private key.

A private key is like a password or access code associated with a crypto wallet address. It encrypts transactions to prevent unauthorized access to assets. In contrast, a public key decrypts the private key to authorize access. In the world of cryptocurrency, a public key is used to receive tokens, while a private key proves ownership of those tokens.

A private key enables the digital signing of data, such as a message indicating a payment from one address to another. In essence, a transaction is a signed statement on the blockchain that assigns coins to a new address.

These key pairs consist of long strings of alphanumeric characters. While a public key can be derived from its corresponding private key using mathematical calculations, mathematically, it is not possible to figure out a private key based on its corresponding public key.

</details>

<details>

<summary>What is the purpose of a seed phrase, key phrase, or recovery phrase?</summary>

<mark style="background-color:yellow;">The seed phrase, which is also called a key phrase, recovery phrase or mnemonic phrase, consists of a sequence of 12 to 24 words created by your cryptocurrency wallet. It acts as a master password, granting access to the crypto linked to that wallet. Imagine the wallet as a password manager for your cryptocurrencies and the seed phrase as the ultimate key.</mark>

As long as you possess your seed phrase, you can access all the crypto associated with the wallet, even if you lose or delete the wallet itself.

The seed phrase is created by the wallet’s software using a random set of words obtained from the private key of the wallet. The same set of words in the same order always generate the same number. It’s essential to keep a secure record of the seed phrase. If the user loses access to their wallet, the seed phrase can be entered into any BIP39-compatible wallet to recover the funds.

It is advised to keep a backup of the seed phrase in an offline storage to prevent hacking attempts. Storing the seed phrase on internet-connected devices is considered unsafe and not recommended. Seed phrases are not specific to any particular cryptocurrency.

The same seed phrase can be used across numerous wallets, enabling the user to recover an entire portfolio of coins and tokens using a single seed phrase. Most popular wallets offer the option to recover funds using a seed phrase as long as it has been accurately recorded.

</details>

<details>

<summary>What are the various types of blockchain wallets available?</summary>

<mark style="background-color:yellow;">Blockchain wallets can be classified into two distinct categories: custodial or self-custodial wallets, and further categorized as hardware or software wallets.</mark>

Custodial wallets, like centralized exchanges, do not provide users with direct access to their private keys. Instead, a trusted third-party securely manages and protects the seed phrase on behalf of the user.

Self-custodial wallets grant users full control over their private keys. When setting up such a wallet, you will be provided with your seed phrase. Once you unlock a self-custodial wallet, you have complete ownership and control over your cryptocurrency.

Cold wallets are offline physical hardware wallets. They offer the highest level of security when it comes to storing cryptocurrencies.

Hot wallets, or so called software wallets are digital wallets connected to the internet. They are less secure than cold wallets because they are vulnerable to hacking.

</details>

<details>

<summary>What is a hardware wallet/cold wallet?</summary>

<mark style="background-color:yellow;">Cold wallets are physical devices specifically designed for storing cryptocurrencies securely offline.</mark>

They are considered the most reliable type of crypto wallet. When you use a cold wallet, your crypto tokens are stored offline, providing a high level of protection.

A hardware wallet is a physical device that stores your cryptographic keys and facilitates transaction signing. It acts as a barrier between potential attackers and the contents of your wallet. Some hardware wallets can be connected to the internet through physical or software means, while others are “air-gapped,” meaning they receive transaction requests and provide approvals through methods like QR codes. The main objective of using a hardware wallet is to minimize the risk of your keys or seed phrase being stolen or compromised due to online connectivity.

</details>

<details>

<summary>What is a software wallet?</summary>

<mark style="background-color:yellow;">Software wallet, which is also called hot wallet, can be web wallets, desktop wallets, or mobile wallets.</mark>

Web wallets can be accessed through a web browser. They offer convenience, but they can be riskier since the management of private keys is often entrusted to third parties.

Desktop wallets are software programs. They need to be downloaded and run on the user’s computer. They are less convenient than web wallets but offer more security because the private keys are stored locally and managed by the users themselves. It is important to use desktop wallets only on clean computers without any virus or malware infections.

Mobile wallets share similarities with desktop wallets in terms of functionality and purpose, but they are specifically designed for the use on smartphones. They utilize QR codes, making it easy to send and receive cryptocurrencies.

Each type of software wallet has its own advantages and considerations in terms of convenience and security.

</details>

<details>

<summary>What is an exchange wallet?</summary>

The primary distinction between a self-custodial cryptocurrency wallet and an exchange wallet lies in the management of private keys.

<mark style="background-color:yellow;">“Not your keys, not your coins” is a popular expression in the world of blockchain. In exchange wallets, like those provided by centralized exchanges (CEXs), the exchange has control over your private keys, similar to how banks hold your funds. With a self-custodial wallet, you have full control and ownership of your private keys.</mark>

If you prefer to have custody of your assets and trade on a decentralized exchange, you use a crypto wallet. However, when you make a purchase on a centralized cryptocurrency exchange, the acquired cryptocurrency is typically stored in the exchange’s wallet, which is both custodial and in most cases also “hot.” This means the exchange holds your private keys, and the wallet is connected to the internet. It is crucial to trust the exchange you use to safeguard your crypto in such cases.

In the world of cryptocurrencies, exchange wallets are often considered less secure compared to self-custodial wallets. With an exchange wallet, you must trust the centralized exchange (CEX) to protect your funds. Additionally, since exchanges hold a large amount of digital assets, they become attractive targets for hackers.

Although leaving your crypto on an exchange poses security risks, it doesn’t mean that self-custodial wallets are immune to hacking or the possibility of misplacing your seed phrase. Even if you have access to your private keys, precautions must still be taken to ensure the safety of your crypto assets.

</details>

<details>

<summary>How to check the balance of your wallet address?</summary>

<mark style="background-color:yellow;">If you use a custodial wallet, such as an exchange wallet, you can conveniently access your account balance by visiting the exchange’s website. If you use a self-custodial wallet, you can check the balance of your address on a blockchain explorer or in your wallet.</mark>

Remember, since blockchain addresses are public, the easiest way to check the balance of your wallet address — if you don’t store your cryptocurrency on a centralized exchange — is to copy and paste your wallet address into a blockchain explorer. If you have ERC-20 tokens (tokens on the Ethereum network), you shall use [etherscan.io](https://etherscan.io/). If you have BEP-20 tokens (tokens on the Binance Smart Chain), you shall use [bscscan.com](https://bscscan.com/) to view your balance.

In addition, you can also review your holdings within your hardware or software wallet. However, in some instances, certain cryptocurrencies may not be automatically displayed in your wallet. If you encounter such a situation, you should refer to your wallet settings. You can either import a token using the search bar or manually add the token’s contract address to your wallet.

</details>

Read all questions and answers in one single blog post:&#x20;

{% embed url="<https://medium.com/qanplatform/blockchain-101-everything-you-need-to-know-about-crypto-wallets-82260c4318c7>" %}


# Coin and Token Types

Blockchain 101 - Part 3

<figure><img src="/files/NFV33tPuLNG1zifYxpfn" alt=""><figcaption></figcaption></figure>

<details>

<summary>What is a coin?</summary>

<mark style="background-color:yellow;">Coins are native cryptocurrencies that operate on their own dedicated blockchains, functioning independently from other cryptocurrencies, blockchains, or platforms. Examples of coins include ETH (Ethereum), BTC (Bitcoin), and BNB (Binance Smart Chain).</mark>

Coins primarily function as a medium of exchange and store of value. They are designed to be used as digital currencies for transactions and may have broader acceptance as a form of payment.

Native coins can be likened to fuel for cars. Similar to how cars require fuel to operate, native coins are essential for the functioning of their respective blockchain networks. Native coins are used to pay for transaction fees, facilitate transactions, and incentivize network participants. Just as fuel powers a car’s engine, native coins power the operations and activities within a blockchain ecosystem.

</details>

<details>

<summary>What is a token?</summary>

<mark style="background-color:yellow;">Tokens encompass a broader category that includes various digital assets within specific platforms. Tokens are typically built and operate on existing blockchain platforms like Ethereum or Binance Smart Chain, utilizing their infrastructure, protocols, and standards.</mark>

Although the terms “token” and “coin” are frequently used interchangeably within the cryptocurrency realm, they possess separate definitions that can vary depending on the context.

Remember, to engage in transactions involving tokens issued on a particular blockchain, it is necessary to possess the native cryptocurrency (coin) of that blockchain. This requirement arises because transaction fees, which are incurred when conducting transactions, must be paid using the native coin of the blockchain.

Tokens often adhere to specific token standards defined by the blockchain platform they are built on, providing guidelines for their functionality and interoperability.Popular token standards or protocols on the Ethereum blockchain are for example ERC-20 (most widely adopted token standard for fungible tokens), ERC-721 (token standard for NFTs), ERC-1155 (hybrid token standard for fungible and non-fungible tokens within the same smart contract).

Tokens can serve various functions, with security and utility tokens being the most common types.

</details>

<details>

<summary>What are the token types?</summary>

<mark style="background-color:yellow;">Tokens are primarily classified based on their functionality. The two primary categories are utility tokens and security tokens.</mark>

Tokens can also be classified based on their features as either fungible or non-fungible. Fungible tokens, similar to dollar bills, can be exchanged with other tokens of the same value without any distinction. Each unit holds the same purpose. On the other hand, non-fungible tokens, like unique pieces of art, have distinct properties, and each unit must be treated separately.

</details>

<details>

<summary>What is a utility token?</summary>

<mark style="background-color:yellow;">The primary purpose of utility tokens is to enable users to access and utilize specific features, products, or services offered by a blockchain-based platform or application. Utility tokens are created on a blockchain and are specific to the platform they are used on.</mark>

Utility tokens frequently function as a medium of exchange or transaction within the platform, enabling users to make payments for goods, services, or access privileges. They encompass a range of functionalities, including but not limited to:

* payment for services or transactions within the platform’s ecosystem,
* access to restricted areas, premium content, or exclusive features within a platform,
* interact with decentralized applications (dApps) or access specific functionalities like voting, staking, or participating in governance mechanisms,
* loyalty rewards, incentivizing users to engage with a platform by offering benefits, discounts, or bonuses, etc.

It is worth highlighting that although utility tokens are primarily designed for functional purposes, their value can still be subject to changes based on the dynamics of supply and demand. However, it is important to note that utility tokens are generally not promoted or sold as investment opportunities since they do not represent ownership or provide profit-sharing rights in the same manner as security tokens.

</details>

<details>

<summary>What is a security token?</summary>

<mark style="background-color:yellow;">A security token is a digital form of traditional securities, including equities, debt, or a hybrid of both. Examples of traditional securities include stocks, bonds, ETFs, options, and futures. These securities can be tokenized to become security tokens, allowing them to be traded digitally.</mark>

Security tokens are financial assets that mirror the characteristics of traditional securities. For instance, during an Initial Coin Offering (ICO), a company could issue tokenized shares that provide ownership rights and dividends to the holders. Legally, these tokenized shares are equivalent to traditionally-distributed shares.

Individuals who own security tokens can benefit from the token’s performance and may also receive dividends in the form of additional tokens. They may also enjoy other advantages, such as voting power. In this way, security token holders can enjoy similar benefits to those provided by stocks and other securities.

It’s important to note that the regulatory treatment of security tokens may vary in different jurisdictions.

</details>

<details>

<summary>What is a stablecoin?</summary>

<mark style="background-color:yellow;">Stablecoins are cryptocurrencies designed to retain a consistent value over time, typically linked to prominent fiat currencies such as the U.S. dollar, a collection of fiat currencies, or even valuable commodities like precious metals. The purpose of stablecoins is to minimize price volatility so their value doesn’t fluctuate significantly.</mark>

These coins are backed by an underlying asset, typically the one they represent digitally, in order to maintain a stable price similar to traditional fiat currencies.

There are four main types of stablecoins:

1\. Fiat-collateralized stablecoins, such as USDT, USDC, and BUSD, which are backed by reserves of fiat currency.

2\. Commodity-collateralized stablecoins, like DigixGlobal, which are backed by commodities like gold.

3\. Crypto-collateralized stablecoins, such as MakerDAO’s Dai token, which are backed by other cryptocurrencies.

4\. Non-collateralized stablecoins, which use algorithms to control the token supply and maintain a fixed price. These coins adjust their circulating supply based on market conditions.

Companies that issue collateralized stablecoins are expected to hold the assets that back their coins, such as U.S. dollars or gold. They create new tokens based on the value of their holdings, following a 1:1 ratio. This model is commonly used for most stablecoins.

The aim of stablecoins is to provide stability and reliable value within the volatile cryptocurrency market.

</details>

<details>

<summary>What is an asset-backed token?</summary>

<mark style="background-color:yellow;">Asset-backed tokens are digital tokens that serve as representations of real-world assets such as gold, crude oil, real estate, equity, and soybeans. The value of these tokens is directly linked to the value of the underlying physical asset they represent. These tokens are typically classified as securities by financial regulators.</mark>

When you own an asset-backed token, it means you have a claim on the corresponding physical asset. Depending on the asset, you may also expect future returns as the asset appreciates in value. The tokens allow for the transfer of ownership without the need to physically move the assets, making transactions more efficient and cost-effective.

Businesses can use asset-backed tokens to raise capital by offering them as equity instruments, following financial regulations. Alternatively, existing assets can be tokenized and sold to individual investors, offering them the opportunity to invest in real-world assets without the hassle of physical storage or exchange. This reduces trade friction and logistics costs.

Asset-backed tokens provide an alternative financial option that combines digital liquidity with the value of tangible assets, offering a solution to problems caused by unstable currencies or unpredictable stock markets. They enable investors to store value independent of traditional fiat currencies that are prone to inflation.

</details>

<details>

<summary>What is a governance token?</summary>

<mark style="background-color:yellow;">Governance tokens are tokens specifically designed by developers to enable token holders to actively contribute to the development and decision-making processes of a protocol or project. Organizations that embrace user control are often referred to as decentralized autonomous organizations (DAOs).</mark>

With governance tokens, holders have the power to influence decisions related to the project, such as proposing new features or making changes to the governance system itself.

In the context of DAOs and decentralized finance (DeFi), governance tokens provide a more fair, decentralized, and transparent approach to governance. These systems utilize smart contracts to execute actions based on predefined conditions, creating trustless environments for transactions and information sharing. Through governance tokens, members of DAOs and DeFis can have an equal say in the decision-making process.

Different projects have their own rules and models for how governance tokens function. Tokens are allocated to different individuals or groups involved in a project using specific calculation methods. Some governance tokens focus on voting for specific governance issues, while others cover a broader range of decisions.

</details>

<details>

<summary>What is a Non-Fungible Token (NFT)?</summary>

<mark style="background-color:yellow;">A Non-Fungible Token (NFT) is a virtual token that provides verifiable proof of authenticity and ownership of a specific asset using cryptography.</mark>

NFTs are primarily recognized for their association with virtual art pieces, but their utility extends beyond that. NFTs can be used to represent a wide range of assets, including: real estate, domain name, event ticket, intellectual property, luxury watches, etc.

Traditionally, cryptocurrencies are interchangeable, which means that each unit of Ether, for example is exactly the same as another Ether, and they can be exchanged.

Interchangeability is also a fundamental characteristic of traditional fiat currencies like the USD. However, there are cases where tokens can be unique and not interchangeable, especially when they represent digital proof of ownership of assets.

An NFT is a virtual token that provides verifiable proof of authenticity and ownership of an asset using cryptography. For instance, if you own a virtual piece of art, you can create an NFT to tokenize that artwork, and the NFT will reflect your ownership of the unique artwork. The NFT is stored on the blockchain as proof of your ownership.

</details>

<details>

<summary>What is a fake token?</summary>

<mark style="background-color:yellow;">Similar to the existence of replica luxury watches or bags, the cryptocurrency market also has its share of counterfeit tokens. Scammers create fake tokens that look similar to popular ones, tricking users who are unaware of such scams.</mark>

You can avoid falling victim to fake token schemes by following these two steps:

It is essential to exercise caution and refrain from engaging with randomly received tokens in your wallet address. It is advisable to treat them similarly to spam emails: avoid interacting with them and leave them untouched. Interacting with such tokens can potentially result in the loss of all the tokens present in that particular wallet.

Prior to purchasing any tokens from any source, it is crucial to take the necessary precautions. Ensure that you double-check the token contract address using at least two official sources. By doing so, you can protect yourself from becoming a victim of fraudulent token schemes.

</details>

<details>

<summary>What is a testnet token?</summary>

<mark style="background-color:yellow;">Testnets are available for every available blockchain platform, providing a trial version for testing purposes. As the name implies, testnet tokens are a unique form of cryptocurrency that is specifically created for the purpose of testing.</mark>

Testnet tokens are used to try out new features and functionalities without risking tokens with real value. They provide a safe way to learn about blockchain technology without the fear of losing actual funds.

These tokens are commonly distributed at no cost through online faucets or can be acquired by engaging in blockchain development projects. Once you have them, you can use them to experiment with wallets, conduct transactions, and even engage with decentralized applications on the blockchain.

It’s important to note that testnet tokens have no real value. They are solely intended for testing and development purposes, not for actual transactions. Tokens created on testnets cannot be exchanged for their equivalent value on the main network.

</details>

<details>

<summary>How to get testnet token?</summary>

<mark style="background-color:yellow;">Testnet tokens can be obtained at no cost through dedicated online faucets designed for each testnet. Simply provide your preferred wallet address, and within minutes, the testnet token will be deposited into your designated wallet address.</mark>

As a first step, it is indeed recommended to generate a new address in your self-custodial wallet (or even a new wallet on a separate device), such as MetaMask, specifically for testing purposes. Creating a separate address for testing helps maintain the separation between your actual funds and any tokens or transactions used during testing. This practice ensures that you can experiment and test without the risk of accidentally sending or receiving real tokens on the mainnet.

The next step is to obtain testnet tokens. You can either mine testnet tokens or request them from testnet faucets. These faucets are online services established by individuals or organizations that have spare testnet coins.

Example: You can acquire testnet ETH for the Ethereum Testnet called Goerli through [this faucet](https://goerli-faucet.pk910.de/). Nevertheless, there exist numerous alternative methods to obtain testnet tokens.

After obtaining your testnet address and tokens, you can begin making transactions. Ensuring the use of the appropriate network when sending and receiving tokens is crucial.

Utilize the testnet network: Now that you have your testnet wallet and tokens, you can start utilizing the testnet. This provides you with the opportunity to explore and test new features and applications before implementing them on the main network.

</details>

\
Read all questions and answers in one single blog post:&#x20;

{% embed url="<https://medium.com/qanplatform/blockchain-101-everything-you-need-to-know-about-coin-and-token-types-7bcf827351e9>" %}


# Blockchain Transactions

Blockchain 101

<figure><img src="/files/tbeXCrWe6S2dot2bMpQF" alt=""><figcaption></figcaption></figure>

<details>

<summary>What is a Centralized Exchange (CEX)?</summary>

\ <br>

<mark style="background-color:yellow;">Centralized Exchanges (CEXs) e.g. Binance or Coinbase are platforms very similar to traditional trading platforms — e.g. eToro or Robinhood — that facilitate trades between users by maintaining an order book containing buy and sell orders from individual traders. These orders are requests made by individuals to buy or sell a certain amount of cryptocurrency at a specific price. CEXs gather and combine these orders from users, utilizing specialized software to match and complete the corresponding buy and sell transactions.</mark>

In Centralized Exchanges (CEXs), users don’t directly exchange cryptocurrencies or fiat currencies with each other. Instead, when users deposit funds onto an exchange, the exchange takes custody of those assets and provides users with IOUs (I Owe You) in return. These IOUs represent the ownership of the assets within the exchange’s system and are internally tracked as they change hands in trades. The conversion into actual currency or cryptocurrency occurs when users withdraw their funds from the exchange.

It’s important to note that although centralized exchanges provide a service for buying, selling, and trading digital assets, they deviate from the principles of decentralization. These exchanges are operated by specific companies and retain custody of users’ funds.&#x20;

“Not your keys, not your coins” is a popular expression in the world of blockchain. In exchange wallets, like those provided by centralized exchanges (CEXs), the exchange has control over your private keys, similar to how banks hold your funds. As a result, some users may prefer decentralized exchanges, which allow them to have complete control over their digital assets and transaction data.&#x20;

</details>

<details>

<summary>What is a Decentralized Exchanged (DEX)?</summary>

\ <br>

<mark style="background-color:yellow;">Decentralized Exchanges (DEXs) e.g. Uniswap or PancakeSwap are platforms where cryptocurrencies are exchanged using functionality programmed on the blockchain, particularly in smart contracts. Trading on DEXs occurs directly between users or liquidity pools, unlike centralized exchanges that resemble banks or investment firms specialized in cryptocurrencies.</mark>

When trading cryptocurrency, people typically rely on centralized exchanges (CEXs). These exchanges match buyers with sellers, similar to how securities exchanges operate.

However, there are perceived downsides associated with traditional centralized exchanges. Firstly, these platforms are privately owned, which means there’s a third party involved in every transaction. These private companies have control over the transactions and collect customer information, which challenges the idea of cryptocurrency’s potential for anonymity.

Additionally, transactions on centralized exchanges are custodial, meaning the exchange holds the assets being traded. Decentralized exchanges address these issues by offering greater anonymity and non-custodial transactions. This means that assets are never held by an intermediary during the exchange process.

DEX platforms eliminate the need for intermediaries and conduct trades within a trustless automated environment based on smart contracts. While decentralized exchanges are less susceptible to cyber-attacks and infrastructure downtime, they cannot provide services involving fiat currency, such as fiat/crypto trading or fiat withdrawals/deposits.

</details>

<details>

<summary>What is a transaction (tx)?</summary>

\ <br>

<mark style="background-color:yellow;">A cryptocurrency transaction (tx) refers to the process of transferring or swapping (trading) cryptocurrencies within a blockchain. During a transaction, the details are recorded on the blockchain.</mark>

Cryptography is used to encrypt the transaction data and the ledger, ensuring its security. Unlike traditional fiat money, crypto transactions are decentralized, meaning they are not regulated or controlled by a central bank or authority. Peers engage in transactions using crypto wallets, where the sender transfers funds from their public address to another account.

To complete a transaction, the private key is required. Multiple transactions are grouped together into blocks and added to the blockchain. This task is typically performed by miners or validators.

The time it takes for a transaction to be recorded on the blockchain can vary depending on the network and the transaction fee paid. Transactions can be instant or take a few minutes to process. To check the status of a transaction, one can use the block explorer of the specific cryptocurrency.

Let’s have a look under the hood, and see what’s happening in the background during a transaction on a blockchain. The transaction process can be divided into six steps:

1. &#x20;A request for a transaction is made involving cryptocurrencies, contracts, records, or other information.
2. The transaction is broadcasted to all participating computers in the blockchain network, known as nodes. It is then considered “pending” and stored in the memory pool (Mem-pool).&#x20;
3. Miners/validators verify the transaction by checking it against validation rules set by the creators of the blockchain network.
4. Validated transactions are stored in a block and sealed with a lock called the hash.
5. The new block is added to the existing blockchain, and other computers in the network validate the correctness of the block’s lock.
6. The transaction is complete, and it becomes a permanent part of the blockchain, unable to be altered.

</details>

<details>

<summary>What is a transaction hash (TxHash) / transaction ID (TxID)?</summary>

\ <br>

<mark style="background-color:yellow;">A transaction hash (TxHash) or also known as transaction ID (TxID) is a special number assigned to each transaction that happens on a blockchain, which helps to uniquely identify and track that specific transaction.</mark>&#x20;

The transaction hash consists of a string of letters and numbers.

Example of a transaction hash (TxHash): 0x2cebc154c6c107116a77646ca23d23de86379fb0f6983695463336080f3f9476

It acts as a special code that uniquely identifies the transaction. With a transaction hash, you can retrieve information about the transaction, such as the amount of tokens sent, the amount payed for the transaction, the date of the transfer, the sender and recipient addresses, and the number of confirmations on the blockchain.

To find the TxHash of a transaction, you can follow these simple steps:

1. Open your cryptocurrency wallet.
2. In the list of completed transactions (if you have any), locate the transaction you are interested in.
3. Click on the transaction hash (TxHash) / transaction ID (TxID).
4. You will see the transaction hash (TxHash) / transaction ID (TxID) along with all the details of the transaction.
5. Open a dedicated block explorer like etherscan.com or bscscan.com to check the status of the transaction by entering the TxHash.

Transaction IDs are valuable for verifying transactions, keeping records, and resolving any issues that may arise during the transaction process.

</details>

<details>

<summary>What is a block explorer?</summary>

\ <br>

<mark style="background-color:yellow;">Block explorer, also known as blockchain explorer, is a graphical user interface of a blockchain. A blockchain explorer is directly connected to a particular blockchain and enable users to view and query data like blocks, transactions, addresses, address history, address balance, etc.</mark>

Blockchain explorers like [etherscan.io](https://etherscan.io/) (for Ethereum) or [bscscan.com](https://bscscan.com/) (Binance Smart Chain) play a crucial role in the blockchain ecosystem, since without them most users won’t be able to view and query blockchain data.

Blockchain explorers are mostly used by users to check address balance, transaction history, or transaction confirmation. However blockchain explorers provide data about network statistics, block information, token and contract information, and many more.

</details>

<details>

<summary>What is a transaction fee / gas fee?</summary>

\ <br>

<mark style="background-color:yellow;">Similar to a bank transfer, cryptocurrency transfers also incur transaction fees that need to be paid in the blockchain’s native coin. When you transfer a certain amount of cryptocurrency from one wallet to another, you need to pay a transaction fee. This fee is not fixed and can vary depending on the level of activity on the blockchain.</mark>

On cryptocurrency exchanges, most transaction fees are predetermined and cannot be adjusted. However, if you are using a cryptocurrency wallet, you may have the flexibility to modify the fee.&#x20;

Transactions with higher fees are given priority in cryptocurrency networks. Therefore, some users may choose to increase the fee if they need their transaction to be processed promptly.

In Ethereum, for example, transaction fees are measured in gas, which is a small fraction of ETH (Ethereum’s native cryptocurrency). The gas price represents the amount of ETH (measured in gwei) that needs to be paid to miners for processing transactions. One gwei is equivalent to 0.000000001 or 10–9 ETH.

Transaction fees are calculated based on the gas value at the time of the transaction. There are two components associated with it: gas limit and gas price. The gas limit protects against unintended expenses and prevents the network from becoming too congested. The transaction fee (TX) is determined by multiplying the gas limit with the gas price.

These fees are utilized to compensate network validators or miners for their contribution to maintaining the consensus of the blockchain network. This ensures the sustainability of the network.

</details>

<details>

<summary>How to reverse a cryptocurrency transaction?</summary>

\ <br>

<mark style="background-color:yellow;">Once a cryptocurrency transaction is verified, it becomes immutable and cannot be altered or reversed. It is impossible to cancel, modify, or undo a transaction once it has been recorded and confirmed.</mark>

Cryptocurrencies operate on decentralized blockchain technology. This decentralized design guarantees transparency, security, and immutability. When a transaction occurs, it is verified and secured by network participants, often referred to as validators or miners. They validate the transaction data and ensure its accuracy. Once the transaction is confirmed, it is permanently and securely stored on the blockchain. At this point, any attempt to modify or reverse the transaction is not possible.

</details>

<details>

<summary>How to transfer tokens between two addresses?</summary>

\ <br>

<mark style="background-color:yellow;">Transferring tokens is a straightforward process, similar to a regular bank transfer. You only need to input or copy the recipient’s wallet address and the amount you wish to send. Just ensure that you have sufficient funds in the network’s native utility coin to cover the transaction fee.</mark>

There are two primary locations from which you can send tokens: a wallet offered by a Centralized Exchange (CEX) such as Binance or Coinbase, or a self-custodial wallet, which can be a software wallet like MetaMask or a hardware wallet like Trezor.

Remember these points when sending crypto:

* Once a cryptocurrency transaction is verified, it becomes immutable and cannot be altered or reversed. It is impossible to cancel, modify, or undo a transaction once it has been recorded and confirmed.
* Similar to a bank transfer, cryptocurrency transfers also incur transaction fees that need to be paid in the blockchain’s native coin.
* It’s important to ensure that you send the corresponding cryptocurrency to the correct address. For instance, send Bitcoin to a Bitcoin address and Ethereum to an Ethereum address. Each type of cryptocurrency has its own specific address.
* After your transaction has been validated and approved, the cryptocurrency will be visible in the recipient’s account. This confirmation process can take a few seconds to a few minutes.

</details>

<details>

<summary>How long does a transaction take?</summary>

\ <br>

<mark style="background-color:yellow;">Transactions per second (TPS) represents the ability of a blockchain to manage a specific quantity of transactions in a single second. The time it takes for a transaction to be recorded on the blockchain depends on the network and the transaction fee paid. A transaction example on the Ethereum network can take anywhere from 15 seconds to 15 minutes.</mark>&#x20;

A transaction can be instant, or it might take a few minutes to go through. In busy periods, it could even take even an hour.

Bitcoin transactions typically require approximately 10 to 30 minutes to be fully completed. Sometimes, you may have to wait for hours before a transaction on the Bitcoin blockchain is completed. Each time a new transaction is verified and added to a new block, it counts as one confirmation. After an average of 10 minutes, another block will include that transaction, making it two confirmations. Some services require only one confirmation, while others, like exchanges, may require 3 or more confirmations for Bitcoin (BTC) transactions.

</details>

<details>

<summary>How to know if a transaction was successul?</summary>

\ <br>

<mark style="background-color:yellow;">You have various options to monitor and see how your transactions are progressing. You can use tools such as a full node, a wallet, or websites called blockchain explorers. These tools help you keep an eye on the status and progress of your transactions.</mark>

If you want to be sure of the success of a particular transaction, you can copy-paste the transaction ID (TXID) to the specific blockchain explorer to see its status. If you don’t have your TXID, you can copy-paste your wallet address to the particular blockchain explorer and search for the transaction in the ‘Transactions’ or ‘Token Transfers’ tab.

</details>

<details>

<summary>How to check transaction history?</summary>

\ <br>

<mark style="background-color:yellow;">Block explorers act as gateways for accessing and reading all the transactions recorded on a blockchain. They allow you to view the balance of each address and access detailed information about each transaction.</mark>

**How to check cryptocurrency transaction history on a Centralized Exchange (CEX):** Each CEX provides you with a transaction history for deposits, trades, and withdrawals.&#x20;

**How to check cryptocurrency transaction history on the blockchain:**&#x20;

You can review your wallet address transaction history in your self-custodial wallet like MetaMask, or you can utilize a blockchain explorer.

By simply copying and pasting your wallet address into the specific blockchain explorer, you can view your transactions for each address. If you have ERC-20 tokens (tokens on the Ethereum network), you should use etherscan.io. If you have BEP-20 tokens (tokens on the Binance Smart Chain), you should use bscscan.com to view your balance.

To view the transaction history of a specific address, use the ‘Transactions,’ ‘Internal Transactions,’ ‘Token transfers,’ or ‘NFT Transfers’ tabs on the blockchain explorer.

</details>


# What is QANX?&#x20;

QANX is the utility token of QANplatform, just like ETH for Ethereum.

{% hint style="warning" %}
QANX Token will fulfill its functional value when the QAN public blockchain will be live.
{% endhint %}

{% hint style="info" %}
**QANplatform** /ˈkwɑːn ˈplætfɔːrm/ or **QAN blockchain platform**

**QANX** /ˈkwɑːnˈeks/ the utility token of QANplatform
{% endhint %}

**QANplatform is the quantum-resistant Layer 1 hybrid blockchain platform that will allow developers and enterprises to build quantum-resistant: smart-contracts, DApps, DeFi solutions, NFTs, tokens, Metaverse on top of the QAN blockchain platform in any programming language.**

{% hint style="success" %}
The contract address is \
\&#xNAN;**`0xAAA9214F675316182Eaa21C85f0Ca99160CC3AAA`**

for both ETH and BSC networks.\
\
**Etherscan:**\
<https://etherscan.io/address/0xAAA9214F675316182Eaa21C85f0Ca99160CC3AAA>\
\
**Bscscan:**\
<https://bscscan.com/address/0xAAA9214F675316182Eaa21C85f0Ca99160CC3AAA>
{% endhint %}

{% hint style="info" %}
All actors of the QANplatform ecosystem need to hold QANX Token(s) to participate.&#x20;
{% endhint %}

## What is QANX used for?

**The QANX Token has multiple functionalities for different utilities**

1. Developers need to buy QANX Token(s) to pay for contract deployment.
2. DApp users need to buy QANX Token(s) to pay for executing methods of deployed contracts.
3. QANX Token holders need to pay a transaction fee when transferring tokens.
4. Validators need to buy validation tickets for QANX Token(s) to participate in the validation process.
5. Full-node Providers need to buy full-node license for QANX Token(s) to be a full-node provider.
6. Rewards such as smart-contract royalty fee, validation and full-node provider rewards, token challenge and bug-bounty rewards are paid to the ecosystem members in QANX Token(s).

### TOKEN FUNCTION 1.&#x20;

**Payment for contract deployment.**

Developers must pay a fee to deploy new smart contracts on the platform. This fee is paid in QANX Token(s) and the amount of fee relates to the size and logic of the deployed contract.

### TOKEN FUNCTION 2.&#x20;

**Payment for executing methods of deployed contracts.**

Application (DApps) users may need to pay a fee for using certain smart contract functions if the operation causes data to be written to the blockchain. This fee is paid with QANX Token(s), and may relate to the length of the data written and the complexity of the executed smart contract function.

### TOKEN FUNCTION 3.&#x20;

**Payment for fees of token transfers.**

When users send QANX Token(s) as a value transfer to another address, they must pay a transaction fee. This is a flat fee and does not correlate to the amount of QANX Token(s) sent during the transaction.

### TOKEN FUNCTION 4.&#x20;

**Payment for validation tickets.**

A potential validator needs to pay a deposit fee to enter the pool of validators who have the right to validate the following block. Validators assure the integrity of the transactions by validating the blocks based on the Proof-of-Randomness (PoR) consensus mechanism. Whenever a particular validator wins the validation process, the validator also receives all the coins as rewards from the Issuance Pool.

### TOKEN FUNCTION 5.&#x20;

**Payment for full-node provider registration.**

Full-node providers constantly run the QAN software on a capable device, providing storage space for the network. To join the network as a Full-Node Provider, developers/providers need to pay a registration fee using QANX.

### TOKEN FUNCTION 6.&#x20;

**Rewards are paid in QANX Token.**&#x20;

Rewards such as smart-contract royalty fee, validation and full-node provider rewards, token challenge and bug-bounty rewards are paid to the ecosystem members in QANX Token(s).

{% embed url="<https://youtu.be/WtS-OQinhGw>" %}

{% content-ref url="/pages/l3dTauakeRDHCUHU1uB3" %}
[How to Buy QANX?](/qanx-token/how-to-buy-qanx)
{% endcontent-ref %}

{% content-ref url="/pages/tL8dE91U4ryGzsDzlhxM" %}
[How to Store QANX](/qanx-token/how-to-store-qanx)
{% endcontent-ref %}

{% content-ref url="/pages/KmWC8bmb29DUFTTQqyCv" %}
[QANX Token Audit](/audits/qanx-token-audit)
{% endcontent-ref %}

{% hint style="info" %}
The information provided on this page does not constitute investment advice, financial advice, trading advice, or any other sort of advice and you should not treat any of the content as such. Do conduct your own due diligence and consult your financial advisor before making any investment decisions.
{% endhint %}


# How to Buy QANX?

{% hint style="warning" %}
QANX Token will fulfill its functional value when the QAN public blockchain will be live.
{% endhint %}

{% hint style="success" %}
The contract address is \
\&#xNAN;**`0xAAA9214F675316182Eaa21C85f0Ca99160CC3AAA`**

for both ETH and BSC networks.
{% endhint %}

{% content-ref url="/pages/7R6R2v5Y2PUGKDph8hK4" %}
[Buy QANX on PancakeSwap](/qanx-token/how-to-buy-qanx/buy-qanx-on-pancakeswap)
{% endcontent-ref %}

{% content-ref url="/pages/RsDmeBmP6vx8WxO4YOtf" %}
[Buy QANX on Uniswap](/qanx-token/how-to-buy-qanx/buy-qanx-on-uniswap)
{% endcontent-ref %}

{% content-ref url="/pages/iUW4FFAl1jdSG7pYn4Yi" %}
[Buy QANX on Gate.io](/qanx-token/how-to-buy-qanx/buy-qanx-on-gate.io)
{% endcontent-ref %}

{% content-ref url="/pages/B0JUAx4jZjCo0AtNMJF4" %}
[Buy QANX on BitMart](/qanx-token/how-to-buy-qanx/buy-qanx-on-bitmart)
{% endcontent-ref %}

{% content-ref url="/pages/Sbc0oIz2e86kTNQ4OK93" %}
[Buy QANX on BingX](/qanx-token/how-to-buy-qanx/buy-qanx-on-bingx)
{% endcontent-ref %}

{% hint style="info" %}
The information provided on this page does not constitute investment advice, financial advice, trading advice, or any other sort of advice and you should not treat any of the content as such. Do conduct your own due diligence and consult your financial advisor before making any investment decisions.
{% endhint %}


# Buy QANX on PancakeSwap

{% hint style="warning" %}
QANX Token will fulfill its functional value when the QAN public blockchain will be live.
{% endhint %}

{% hint style="success" %}
The QANX Token contract address is \
\&#xNAN;**`0xAAA9214F675316182Eaa21C85f0Ca99160CC3AAA`**\
\
\
**PancakeSwap:**\
<https://pancakeswap.finance/swap?outputCurrency=0xaaa9214f675316182eaa21c85f0ca99160cc3aaa>\
\
**BscScan - explorer:**\
<https://bscscan.com/address/0xAAA9214F675316182Eaa21C85f0Ca99160CC3AAA>\
\
**DEXTools - chart:** \
<https://www.dextools.io/app/en/bnb/pair-explorer/0x21597370c2b598c4e781bb7368fddeaaabb38789>\
\
**CoinGecko Terminal - chart:** \
<https://www.geckoterminal.com/bsc/pools/0x21597370c2b598c4e781bb7368fddeaaabb38789?utm_source=coingecko&utm_medium=referral&utm_campaign=livechart>
{% endhint %}

<figure><img src="/files/2bfzdyiDcpxE8F4XPeNx" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
To purchase QANX token on PancakeSwap, you will need to set up a MetaMask, Trust Wallet, Binance Wallet, Coinbase Wallet, etc.
{% endhint %}

## **How to install MetaMask?** <a href="#c603" id="c603"></a>

{% hint style="info" %}
In this tutorial we will show you the buying process with MetaMask wallet.&#x20;
{% endhint %}

Go to the [MetaMask](https://metamask.io/) website, download, and install the application. \
(MetaMask is compatible with Chrome or Firefox browsers).

## How to buy QANX on PancakeSwap <a href="#c603" id="c603"></a>

0\. Go to [PancakeSwap](https://pancakeswap.finance) and connect it with your MetaMask wallet. Click on 'Connect Wallet'.

<figure><img src="/files/2YJozaRR6EUgN2OVJ53R" alt=""><figcaption><p>Go to <a href="https://pancakeswap.finance/">https://pancakeswap.finance/</a> and click on "Connect Wallet"</p></figcaption></figure>

Connect MetaMask (or your other wallet) with PancakeSwap. Click on 'MetaMask'.&#x20;

<figure><img src="/files/gHcoEDDHpRqhi2JYQRN7" alt=""><figcaption><p>Click on "MetaMask". </p></figcaption></figure>

A MetaMask window will open in the top right corner of your screen. **Confirm** connecting the wallet to PancakeSwap. After connecting the wallet, MetaMask will ask you **switch to Binance Smart Chain Network**. **Approve** the request.

1. Click the **'Trade'** button on PancakeSwap.&#x20;

<figure><img src="/files/vlbFVEw6XQuAeJenkRsW" alt=""><figcaption><p>Click the 'Trade' button on PancakeSwap.</p></figcaption></figure>

2. Click on '**Cake'** in the right input window.

<figure><img src="/files/8DhM8EQuAvhoisTqoaE7" alt=""><figcaption><p>Click on "CAKE"</p></figcaption></figure>

<figure><img src="/files/GXTWIVePowwuWtQgZASV" alt=""><figcaption></figcaption></figure>

3. **Paste the QANX contract address** in the input field and click **'Import'**.\
   \&#xNAN;**`0xAAA9214F675316182Eaa21C85f0Ca99160CC3AAA`**

<figure><img src="/files/XG8Joeyp4flaxkIIPeI5" alt=""><figcaption><p>Paste the QANX contract address in the input field and click "Import".</p></figcaption></figure>

4. Thick in '**I understand**' and click on '**Import**'.&#x20;

<figure><img src="/files/90ZVW1CyzsHvt1WUQsRK" alt=""><figcaption><p>Thick in "I understand" and click on "Import".</p></figcaption></figure>

5. **Select the amount of BNB** you want to spend, and you will see the amount of QANX you will receive. Click '**Swap**'.

<figure><img src="/files/sZ3IsQR8Dl65rS36wwA9" alt=""><figcaption></figcaption></figure>

6. You will see a summary of your upcoming QANX buy. If you agree confirm the swap by clicking on '**Confirm Swap**'.&#x20;

![](/files/xrDM5MKzqvoGaHoHHrQW)

6. MetaMask will open a new window and ask you for final confirmation. Click '**Confirm**'**,** then wait until the transaction is completed! Be patient, sometimes it takes a few minutes.&#x20;

![](/files/3C9hCRmOOE3NVxv2yraS)

\
\
**Congratulations and welcome to the QANX holder community** ✅&#x20;

{% hint style="info" %}
You can check also if the transaction succeeded by pasting your public address into <https://bscscan.com>. On your Address page select 'BEP-20 Token Txns'. You will see your transaction list.&#x20;
{% endhint %}

{% hint style="info" %}
Sometimes you need to add QANX Token smart contract address to your MetaMask to see your QANX Token balance.&#x20;
{% endhint %}

{% content-ref url="/pages/JyfDebFwUYLMHhvVPNFt" %}
[How to add QANX token to MetaMask](/qanx-token/how-to-store-qanx/store-qanx-in-metamask/how-to-add-qanx-token-to-metamask)
{% endcontent-ref %}

{% hint style="info" %}
The information provided on this page does not constitute investment advice, financial advice, trading advice, or any other sort of advice and you should not treat any of the content as such. Do conduct your own due diligence and consult your financial advisor before making any investment decisions.
{% endhint %}


# Buy QANX on Uniswap

{% hint style="warning" %}
QANX Token will fulfill its functional value when the QAN public blockchain will be live.
{% endhint %}

{% hint style="success" %}
The contract address is \
\&#xNAN;**`0xAAA9214F675316182Eaa21C85f0Ca99160CC3AAA`**\
\
\
**Uniswap:**\
<https://app.uniswap.org/#/swap?outputCurrency=0xaaa9214f675316182eaa21c85f0ca99160cc3aaa>\
\
**Etherscan - explorer:**\
<https://etherscan.io/address/0xAAA9214F675316182Eaa21C85f0Ca99160CC3AAA>\
\
**DEXTools - chart:**\
<https://www.dextools.io/app/en/ether/pair-explorer/0x09117bff68b5939319e61b226bf1f3f5f985eba1>\
\
**CoinGecko Terminal - chart:** \
<https://www.geckoterminal.com/eth/pools/0x09117bff68b5939319e61b226bf1f3f5f985eba1?utm_source=coingecko&utm_medium=referral&utm_campaign=livechart><br>
{% endhint %}

<figure><img src="/files/WQos1Q2MFh8v4ITphrwV" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
To purchase QANX token on Uniswap, you will need to set up a MetaMask, Trust Wallet, Coinbase Wallet, etc.
{% endhint %}

## **How to install MetaMask?** <a href="#c603" id="c603"></a>

{% hint style="info" %}
In this tutorial you will learn how to buy with MetaMask.&#x20;
{% endhint %}

Go to the [MetaMask](https://metamask.io/) website, download, and install the application. \
(MetaMask is compatible with Chrome or Firefox browsers).

## How to buy QANX on Uniswap <a href="#c603" id="c603"></a>

0\. Go to [Uniswap](https://app.uniswap.org/) and connect it with your MetaMask wallet. Click on 'Connect'.

<figure><img src="/files/xOT45aRXuiG87cQaTvxn" alt=""><figcaption></figcaption></figure>

1. **Connect MetaMask** (or your other wallet) with Uniswap. Click on 'MetaMask'.

2. **Select the amount of ETH** you want to spend.

![](/files/hT4ISO7SBD99dqoTRBCj)

3. &#x20;Click on '**Select a token**' and paste the QANX contract address:  **`0xAAA9214F675316182Eaa21C85f0Ca99160CC3AAA`** \
   you will see the amount of QANX you will receive.\
   \
   Click '**Swap**'.

![](/files/1kYYQImaFkYyEWjWAMtS)

4. You will see a summary of your upcoming QANX buy. If you agree confirm the swap by clicking on '**Confirm Swap**'.&#x20;
5. MetaMask will open a new window and ask you for final confirmation. Click '**Confirm**'**,** then wait until the transaction is completed! Be patient, sometimes it takes a few minutes.

**Congratulations and welcome to the QANX holder community** ✅&#x20;

{% hint style="info" %}
You can check also if the transaction succeeded by pasting your public address into <https://etherscan.io>. On your Address page select 'ERC-20 Token Txns'. You will see your transaction list.&#x20;
{% endhint %}

{% hint style="info" %}
Sometimes you need to add QANX Token smart contract address to your MetaMask to see your QANX Token balance.&#x20;
{% endhint %}

{% content-ref url="/pages/JyfDebFwUYLMHhvVPNFt" %}
[How to add QANX token to MetaMask](/qanx-token/how-to-store-qanx/store-qanx-in-metamask/how-to-add-qanx-token-to-metamask)
{% endcontent-ref %}

{% hint style="info" %}
The information provided on this page does not constitute investment advice, financial advice, trading advice, or any other sort of advice and you should not treat any of the content as such. Do conduct your own due diligence and consult your financial advisor before making any investment decisions.
{% endhint %}


# Buy QANX on Gate.io

## You can buy QANX on Gate:

{% hint style="warning" %}
QANX Token will fulfill its functional value when the QAN public blockchain will be live.
{% endhint %}

{% embed url="<https://www.gate.io/trade/QANX_USDT>" %}

{% hint style="info" %}
The information provided on this page does not constitute investment advice, financial advice, trading advice, or any other sort of advice and you should not treat any of the content as such. Do conduct your own due diligence and consult your financial advisor before making any investment decisions.
{% endhint %}


# Buy QANX on BitMart

## You can buy QANX on BitMart:

{% hint style="warning" %}
QANX Token will fulfill its functional value when the QAN public blockchain will be live.
{% endhint %}

{% embed url="<https://www.bitmart.com/trade/en-US?symbol=QANX_USDT&layout=pro>" %}

{% hint style="info" %}
The information provided on this page does not constitute investment advice, financial advice, trading advice, or any other sort of advice and you should not treat any of the content as such. Do conduct your own due diligence and consult your financial advisor before making any investment decisions.
{% endhint %}


# Buy QANX on BingX

## You can buy QANX on BingX:

{% hint style="warning" %}
QANX Token will fulfill its functional value when the QAN public blockchain will be live.
{% endhint %}

{% embed url="<https://bingx.com/en/spot/QANXUSDT/>" %}

{% hint style="info" %}
The information provided on this page does not constitute investment advice, financial advice, trading advice, or any other sort of advice and you should not treat any of the content as such. Do conduct your own due diligence and consult your financial advisor before making any investment decisions.
{% endhint %}


# How to Store QANX

QANplatform officially supports MetaMask, Trust Wallet, and MyEtherWallet. Although many other wallets support ERC-20 and BEP-20 tokens, these three support both.

{% hint style="info" %}
The QANX token was launched on ETH and BSC networks. Therefore we have both an ERC-20 and a BEP-20 token.‍
{% endhint %}

{% content-ref url="/pages/hw761joKf6A1cq7uHq8E" %}
[Store QANX in MetaMask](/qanx-token/how-to-store-qanx/store-qanx-in-metamask)
{% endcontent-ref %}

{% content-ref url="/pages/mxrzRf08UO2jdEKemo46" %}
[Store QANX in Trust Wallet](/qanx-token/how-to-store-qanx/store-qanx-in-trust-wallet)
{% endcontent-ref %}

{% content-ref url="/pages/ao86hPkBVwmPej16vNdf" %}
[Store QANX in MEW](/qanx-token/how-to-store-qanx/store-qanx-in-mew)
{% endcontent-ref %}

{% content-ref url="/pages/eTTnKbVWUfIdhPf0Dk0M" %}
[Other wallets](/qanx-token/how-to-store-qanx/other-wallets)
{% endcontent-ref %}


# Store QANX in MetaMask

MetaMask is compatible with the ERC-20 and BEP-20 QANX tokens. To find more information about setting up the wallet or adding the Binance Smart Chain network to your MetaMask please visit the links below.

{% embed url="<https://metamask.io/faqs.html>" %}
How to setup MetaMask
{% endembed %}

To add the ERC-20 and BEP-20 QANX token to MetaMask please visit the link below.

{% content-ref url="/pages/JyfDebFwUYLMHhvVPNFt" %}
[How to add QANX token to MetaMask](/qanx-token/how-to-store-qanx/store-qanx-in-metamask/how-to-add-qanx-token-to-metamask)
{% endcontent-ref %}


# How to add QANX token to MetaMask

{% hint style="info" %}
In this tutorial you will leran how you can add QANX Token to your MetaMask to see your current balance. \
\
**You will find two processes if you scroll below:**\
1\. How to add the BEP-20 QANX token to MetaMask\
2\. How to add the ERC-20 QANX token to MetaMask\
\
\&#xNAN;*BEP-20 tokens are tokens on the Binance Smart Chain,* \
*ERC-20 tokens are tokens on Ethereum network.*&#x20;
{% endhint %}

## How to add the BEP-20 QANX token to MetaMask

1. Open MetaMask and make sure you are on the right network. \
   Select '**BSC / Binance Smart Chain**'.&#x20;

<figure><img src="/files/BG2TcrefHU2cV4fu1Rob" alt=""><figcaption></figcaption></figure>

1. Click on '**Import tokens**', located at the bottom of the 'Assets' tab on your wallet homepage.

<figure><img src="/files/1mhjYa7FrQoveoHXXzZY" alt=""><figcaption></figcaption></figure>

2. **Fill out the input fields accordingly:**\
   \
   Token contract address:\ <mark style="background-color:green;">**`0xAAA9214F675316182Eaa21C85f0Ca99160CC3AAA`**</mark>\
   \
   Token symbol:\
   \&#xNAN;**`QANX`**\
   \
   Token decimal: \
   \&#xNAN;**`18`**

   \
   Click '**Add Custom Token**' to proceed.

<figure><img src="/files/o7U2Xwbm3PvL0nTGanwl" alt=""><figcaption></figcaption></figure>

3. You will now see a page asking you to confirm that you want to add the token. When you click '**Import Tokens**', the token type will be added to your wallet.

<figure><img src="/files/fhfZi0BFC2p8yZUB3hl5" alt=""><figcaption></figcaption></figure>

**Congratulations, you successfully imported QANX Token to your MetaMask** ✅&#x20;

## How to add the ERC-20 QANX token to MetaMask

The process is the same as above. You only need to make sure you are on the right network at point 0. Select '**ETH / Ethereum MainNet**'. \
\
Jump to Step 1. above: "Click on '**Import tokens**'".&#x20;


# Store QANX in Trust Wallet

Trust Wallet is compatible with the ERC-20 and BEP-20 QANX tokens. To find more information about setting up the wallet please visit the link below.

{% embed url="<https://community.trustwallet.com/c/helpcenter/basics/11>" %}

To add the ERC-20 and BEP-20 QANX token to Trust Wallet please visit the link below.

{% content-ref url="/pages/Q4Az2UQOKyDiZWhfcDLN" %}
[How to add QANX token to Trust Wallet](/qanx-token/how-to-store-qanx/store-qanx-in-trust-wallet/how-to-add-qanx-token-to-trust-wallet)
{% endcontent-ref %}


# How to add QANX token to Trust Wallet

## How to add the BEP-20 QANX token to Trust Wallet

1. Open the Trust Wallet application and tap the icon marked with green.

2\. Scroll down and tap 'Add Custom Token'

3\. Choose 'Smart Chain' network and paste the QANX token contract address: \
\&#xNAN;**`0xAAA9214F675316182Eaa21C85f0Ca99160CC3AAA`**

4\. Click 'Save' in the top right corner. The QANX token is now added to Trust Wallet.

## How to add the ERC-20 QANX token to Trust Wallet

1. Open the Trust Wallet application and tap the icon marked with green.

2\. Scroll down and tap 'Add Custom Token'

3\. Choose 'Ethereum' network and paste the QANX token contract address: **`0xAAA9214F675316182Eaa21C85f0Ca99160CC3AAA`**

4\. Click 'Save' in the top right corner. The QANX token is now added to Trust Wallet.


# Store QANX in MEW

MyEtherWallet is compatible with the ERC-20 and BEP-20 QANX tokens. To find more information about setting up the wallet please visit the link below.

{% embed url="<https://help.myetherwallet.com/en>" %}

Find on the link below how to connect MEW to Binance Smart Chain network.

{% embed url="<https://help.myetherwallet.com/en/articles/5443041-bsc-network-on-mew-wallet>" %}

To add the ERC-20 and BEP-20 QANX token to MEW please visit the link below.

{% content-ref url="/pages/iustkyLUt8N8qWzG3toD" %}
[How to add QANX token to MEW](/qanx-token/how-to-store-qanx/store-qanx-in-mew/how-to-add-qanx-token-to-mew)
{% endcontent-ref %}


# How to add QANX token to MEW

## How to add the BEP-20 QANX token to MyEtherWallet

1. Open the MEW web interface.
2. Click on the blue arrow mark next to the 'Network' text.

2\. Choose 'Binance Smart Chain' (BSC) and go back to the main page.

3\. Click '+ Custom Token'.

4\. Paste the QANX token contract address\
\&#xNAN;**`0xAAA9214F675316182Eaa21C85f0Ca99160CC3AAA`**\
and click 'Add Token'. You successfully added the BEP-20 QANX token to your MEW.

## How to add the ERC-20 QANX token to MetaMask

1. Make sure you are connected to the Ethereum Network. You can verify it in the top right corner of the main page.

2\. Click '+ Custom Token' on the main page.

3\. Paste the QANX token contract address \
\&#xNAN;**`0xAAA9214F675316182Eaa21C85f0Ca99160CC3AAA`**\
and click 'Add Token'. You successfully added the ERC-20 QANX token to your MEW.


# Other wallets

{% hint style="info" %}
QANplatform has an ERC-20 and a BEP-20 token, therefore you can only use a wallet that supports one or both of these tokens.
{% endhint %}

The officially recommended wallet by our team is MetaMask, although many other options work, including Trust Wallet or MyEtherWallet.

{% hint style="warning" %}
Before sending an ERC-20 or BEP-20 token to a new wallet always make sure if it supports the Ethereum or Binance Smart Chain.
{% endhint %}


# QAN Private Blockchain

## How to install QAN Private Blockchain <a href="#how-to-install-qan-private-blockchain" id="how-to-install-qan-private-blockchain"></a>

This document describes the installation procedure of the QAN Private Blockchain.

### Hardware requirements <a href="#hardware-requirements" id="hardware-requirements"></a>

The hardware requirements are relaxed compared to the capabilities of the product. While it surely requires more computing power to run full-fledged virtual machines, quite a lot of consumer grade hardware is capable or running QAN Private Blockchain, including more than 12 year old+ CPUs like the [Intel i5 2nd generation](https://ark.intel.com/content/www/us/en/ark/products/52210/intel-core-i5-2500k-processor-6m-cache-up-to-3-70-ghz.html).

The actual hard requirements without which the software will absolutely refuse to run are the following:

* 12 GB of memory (16 GB highly recommended)
* 4 CPU cores (6+ cores highly recommended)
* x86\_64 CPU architecture
* Hardware based virtualization support in CPU:
  * VT-x for Intel
  * AMD-V for AMD
* Nested virtualization support

### Software requirements <a href="#software-requirements" id="software-requirements"></a>

Since QVM runs deterministic and hardware isolated virtual machines, some specific kernel modules are required. This means that while QAN Private Blockchain is fully containerized and is aimed to be a first-class citizen in microservice architecture based systems, it won’t launch in a consumer level Docker for Desktop environment, since that does not support nested virtualization as per below picture taken from the Docker documentation:

![](https://s3.eu-central-1.wasabisys.com/md.qan.dev/uploads/upload_3d0e1054d3b9da1b4ad9f90f454666bf.png)

More details are available in the [official Docker documentation](https://docs.docker.com/desktop/vm-vdi/#virtual-desktop-support).

To overcome these limitations on all x86\_64 platforms including Windows, macOS and Linux, regular virtual machines can be launched using popular and robust virtualization solutions from VMware and Oracle. See the support matrix to find out which software works best for your platform:

<table><thead><tr><th width="125"></th><th>Windows</th><th>macOS</th><th>Linux</th></tr></thead><tbody><tr><td>VMware</td><td><a href="https://www.vmware.com/go/getplayer-win">VMware Workstation 17 Player</a></td><td><a href="https://www.vmware.com/go/getfusionplayer">VMware Fusion 13 Player</a></td><td><a href="https://www.vmware.com/go/getplayer-linux">VMware Workstation 17 Player</a></td></tr></tbody></table>

\*if you use these pieces of software for business related activities you might need to purchase a licence. Always do your own research based on your specific use-case.

### Downloading the QAN Private Blockchain software <a href="#downloading-the-qan-private-blockchain-software" id="downloading-the-qan-private-blockchain-software"></a>

The package is distributed as an [Open Virtualization Format](https://en.wikipedia.org/wiki/Open_Virtualization_Format) archive, which is easily consumable by aforementioned recommended Virtualization tools in a form of a simple import process.

The OVA archives are published in [one of QANplatform’s GitHub repositories](https://github.com/QANplatform/private-blockchain-ova), available for a direct download.

### Importing the downloaded QAN Private Blockchain software <a href="#importing-the-downloaded-qan-private-blockchain-software" id="importing-the-downloaded-qan-private-blockchain-software"></a>

Each Virtualization software vendor provides documentation for this standard import procedure:

**Windows**

* [VMware Workstation 17 Player](https://docs.vmware.com/en/VMware-Workstation-Player-for-Windows/17.0/com.vmware.player.win.using.doc/GUID-DDCBE9C0-0EC9-4D09-8042-18436DA62F7A.html)

**macOS:**

* [VMware Fusion 13 Player](https://docs.vmware.com/en/VMware-Fusion/13/com.vmware.fusion.using.doc/GUID-275EF202-CF74-43BF-A9E9-351488E16030.html)

**Linux:**

* [VMware Workstation 17 Player](https://docs.vmware.com/en/VMware-Workstation-Player-for-Linux/17.0/com.vmware.player.linux.using.doc/GUID-DDCBE9C0-0EC9-4D09-8042-18436DA62F7A.html)

### Start the imported QAN Private Blockchain software <a href="#start-the-imported-qan-private-blockchain-software" id="start-the-imported-qan-private-blockchain-software"></a>

Once the import procedure succeeded, it will show up in your virtual machine library.\
The only thing left is to start the VM by pressing the “Play” button.

As the virtual machine boots it will complete all necessary initialization procedures automatically.

### Interacting with the running QAN Private Blockchain software <a href="#interacting-with-the-running-qan-private-blockchain-software" id="interacting-with-the-running-qan-private-blockchain-software"></a>

The whole architecture is visible inside this public GitHub repository of QANplatform.\
Probably the most simple and straightforward multi-node blockchain setup, with well documented components and procedures.

The [“examples” directory ](https://github.com/QANplatform/private-blockchain/tree/main/examples)contains real-world examples how to deploy and interact with smart contracts. Additional examples both in other programming languages and for different purposes will be added continously.

### Included components <a href="#included-components" id="included-components"></a>

QANplatform ships the whole blockchain experience with QAN Private Blockchain software.\
The following components are made available by the default manifest files through public container registries:

#### Node <a href="#node" id="node"></a>

This is the most fundamental piece of software, the blockchain node. It is responsible for:

* Peer-to-peer communication with other participating nodes
* Accepting, vetting and propagating received transactions
* Compiling smart contracts written in any language
* Receiving smart contract deployments and persisting them after compilation
* Executing smart contract calls received via transactions
* Accepting and managing XLINK cross signatures
* Many-many other operations happening under the hood

The shipped distribution includes three nodes, which is the recommended minimum for doing anything resembling real-life operation.

#### QVM manager <a href="#qvm-manager" id="qvm-manager"></a>

This component does the heavy lifting. It spawns a pool of tiny actual CPU supported, hardware accelerated Virtual Machines (hence the requirements detailed in the first chapter) and makes them available to the nodes.

These small footprint VMs are responsible for compiling and executing QVM contracts, which can be written in any language, unlike on any other blockchain.

The bundled example includes a single QVM manager which will launch 4 sub-VMs (and this is why **nested** virtualization support is a hardware requirement too) with one vCPU cores each.

This is a networked service, which means it can scale exceptionally well if more dedicated QVM executor nodes are added.

#### XLINK signers <a href="#xlink-signers" id="xlink-signers"></a>

XLINK signers create cross signatures using Elliptic Curve and Post-Quantum cryptography. These are the components which enable us to operate fully compatible with the whole blockchain ecosystem and remain secure until and after the quantum problem practically impacts the whole market.

Again, mimicking a real-life scenario, each included node is bundled with an XLINK signer, which periodically submit signatures for them.

#### Visual explorer <a href="#visual-explorer" id="visual-explorer"></a>

Designing and building an easy-to use blockchain explorer which provides in-depth access into the underlying operations of the blockchain network is a challenging task. QAN Private Blockchain ships [LibreScan](https://librescan.org/) as its official explorer.

### Default operation model <a href="#default-operation-model" id="default-operation-model"></a>

By default the QAN Private Blockchain is configured in volatile mode. This means that you can freely experiment with anything as the underlying filesystem is memory (RAM) backed, so each time you want to start fresh, just reboot the VM and you will start from block zero!

CAUTION: Do not use the default operation model for production workloads, it is meant for development purposes. To persist data, distribute across multiple physical machines, increase node count etc. plese refer to the next section.

### Customizing the operation model <a href="#customizing-the-operation-model" id="customizing-the-operation-model"></a>

Already have a use-case you wish to accomplish using QANplatform? Great! Here are the steps how you can customize the operation model for various use-cases:

#### Scaling with containerized architecture <a href="#scaling-with-containerized-architecture" id="scaling-with-containerized-architecture"></a>

As per the aforementioned public GitHub repository of QANplatform, the `docker-compose.yml`file reveals how much focus we put into containerizing the application in a scalable and easy-to-configure way.

This means that one can easily add more nodes either on the same physical host as VMs, or on different physical machines for power and network redundancy.

#### Adding persistent storage <a href="#adding-persistent-storage" id="adding-persistent-storage"></a>

Apart from that, one certainly wants to persist data instead of running in volatile memory as per the default development mode, for that these official guidelines are available from the known Virtualization providers:

**Windows**

* [VMware Workstation 17 Player](https://docs.vmware.com/en/VMware-Workstation-Player-for-Windows/17.0/com.vmware.player.win.using.doc/GUID-EF1AE5ED-EB74-46E4-916B-8EF4D49286EB.html?hWord=N4IghgNiBcIGoEkBOAXArpABACzEgJpvgJYDOA1iAL5A)

**macOS:**

* [VMware Fusion 13 Player](https://docs.vmware.com/en/VMware-Fusion/13/com.vmware.fusion.using.doc/GUID-4BE3F3B7-9579-4C30-B35E-5BC41267CDFD.html)

**Linux:**

* [VMware Workstation 17 Player](https://docs.vmware.com/en/VMware-Workstation-Player-for-Linux/17.0/com.vmware.player.linux.using.doc/GUID-115730E8-B9E2-4B96-B036-171A4705F4EF.html?hWord=N4IghgNiBcIGoEkBOAXArpABACzEgJpvgJYDOA1iAL5A)

After the required virtual hardware was added, the persistent volumes used by the containers should be mapped in the manifest file(s) to point to those disks.

### &#x20;<a href="#interacting-with-the-running-qan-private-blockchain-software" id="interacting-with-the-running-qan-private-blockchain-software"></a>

\ <br>

### &#x20;<a href="#downloading-the-qan-private-blockchain-software" id="downloading-the-qan-private-blockchain-software"></a>

\ <br>


# QAN TestNet

{% embed url="<https://docs.qanplatform.com/testnet/what-is-the-qan-testnet>" %}


# \[QVM] Multi-language smart contracts

![](/files/ehWZshZJKHRDAhPAqzRl)

{% hint style="info" %}
This section describes what QVM (QAN Virtual Machine) is and how it works in general on a high level to get familiar with the architecture before you start building on it.
{% endhint %}

## What is QVM (QAN Virtual Machine)? <a href="#what-is-qvm" id="what-is-qvm"></a>

QVM (QAN Virtual Machine) is the world's first blockchain Virtual Machine which is capable of executing statically linked ELF Linux binaries in a deterministic way so that they can be used for smart contracts. Such smart contract instances are launched inside a hardware separated sandbox through CPU level virtualization and are exposed to a synthetic Linux kernel which translate non-determininistic syscalls to patched variants which provide output compatible with a vanilla kernel.

### Example QVM runtime patches <a href="#example-qvm-runtime-patches" id="example-qvm-runtime-patches"></a>

* Requesting random bytes would return a byte sequence derived from the previous block's hash. While this is not random, it is deterministic and compatible with the getrandom() syscall.
* Getting the current time via the time() syscall would always return the previous block's timestamp. Again, while this does provide the exact time (as it will mostly be a couple seconds late), but it will be also deterministic all across the entire planet on each and every executing node.

The key is that developers:

* Do not need to deal with any such quirks and workarounds when they are writing contracts
* Feel like they are just writing regular CLI applications
* Can build contracts in any language which can be compiled to a statically linked binary which runs on Linux. This is pretty much any language by the way!

## Architecture <a href="#architecture" id="architecture"></a>

QVM is currently implemented during its testing phase as a Layer2 smart contract execution engine. Currently the only supported network is [Ethereum Testnet](https://ethereum.org/en/developers/docs/networks/) "[Sepolia](https://sepolia.dev)".

## Supported languages <a href="#supported-languages" id="supported-languages"></a>

What does it mean that a language is "supported" by QVM? Doesn't it support ***ALL*** languages?

The answer is yes, QVM supports ***ALL*** languages which can be compiled to a static ELF binary compatible with Linux. However, there is a continously expanding list of languages officially supported by QANplatform development team.

This means that for these languages there will be official tutorials and optimized compilers made available to ensure that contracts written in these languages run as efficient as possible and consume as little fees as absolutely required.

{% content-ref url="/pages/DtCb2W73emWhy8cgSK87" %}
[DOCs for supported languages](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages)
{% endcontent-ref %}

\ <br>


# Generic workflow

This section describes the generics related to:

* [How contracts can interact with QVM using a common API](/developers/qvm-multi-language-smart-contracts/generic-workflow/common-api)
* [Installing `qvmctl`, the command line interface of QVM](/developers/qvm-multi-language-smart-contracts/generic-workflow/installing-qvmctl)
* [Setting up your workspace](/developers/qvm-multi-language-smart-contracts/generic-workflow/setting-up-your-workspace)
* [How to write a smart contract](/developers/qvm-multi-language-smart-contracts/generic-workflow/writing-a-smart-contract)
* [How to compile a smart contract](/developers/qvm-multi-language-smart-contracts/generic-workflow/compiling-a-smart-contract)
* [Deploying contracts using `qvmctl`](/developers/qvm-multi-language-smart-contracts/generic-workflow/deploying-a-smart-contract)
* [Calling contract functions using `qvmctl`](/developers/qvm-multi-language-smart-contracts/generic-workflow/calling-a-smart-contract-function)
* [Reading contract storage using `qvmctl`](/developers/qvm-multi-language-smart-contracts/generic-workflow/reading-smart-contract-storage)


# Common API

Any contract can interact with QVM by following the generic API described below:

## Reading from the database <a href="#reading-from-the-database" id="reading-from-the-database"></a>

QVM calls specify database slots to be accessed during contract execution. These slots are made available under their specified keys in the execution context via environment variables.

Let's say the decimal precision and total supply information of a token is required for read and/or write in a contract interaction, then executing the following call would make it available under the environment variables DB\_TOTAL\_SUPPLY and DB\_DECIMALS:

```
qvmctl call 0xCAFEBABE -r TOTAL_SUPPLY,DECIMALS print info
```

Then this contract would receive two command line arguments "print" and "info" and could print token information related to total supply and decimals which properties are available as environment variables as stated above.

## Writing to the database <a href="#writing-to-the-database" id="writing-to-the-database"></a>

If a contract wants to write to the database to insert and/or modify a record under a certain key, it needs to write the following instruction to the process' STDOUT:

```
DBW=$KEY=$VALUE
```

For example if a token's name is updatable and is stored under the key `TOKEN_NAME`, it could be updated easily to something else like this in Golang:

```go
os.Stdout.WriteString("DBW=TOKEN_NAME=NewTokenName\n")
```

## Deleting (pruning) values from the database <a href="#deleting-pruning-values-from-the-database" id="deleting-pruning-values-from-the-database"></a>

To prune key(s) from the database, simply output a "DBP=" prefixed new-line (\n) terminated line to stdout:

```
DBP=removekey
```

Above line would delete the storage slot under key "removekey" from persistent storage. Multiple keys can be removed either by specifying more lines prefixed with "DBP=", or simply concatenating keys to be removed with ',' like this:

```
DBP=removekey,removethistoo
```

Above line would delete the storage slot under key "removekey" and also "removethistoo" from persistent storage.

## Writing to virtual STDOUT <a href="#writing-to-virtual-stdout" id="writing-to-virtual-stdout"></a>

Since the "real" STDOUT is reserved for the specific opcodes above, writing to a "virtual" STDOUT is achieved as simply outputting a "OUT=" prefixed new-line (\n) terminated line to stdout:

```
OUT=Program ran all good
```

The string "Program ran all good" will be emitted on-chain as event data, but not persisted to the database. This is a lot cheaper in gas fees than writing to storage, but this data is only visible to clients and not usable in a next contract interaction as it is not saved to state.

## Reporting errors <a href="#reporting-errors" id="reporting-errors"></a>

If a contract execution fails for any reason, developers can utilize normal behavior and simply write the error to STDERR. This will mark the contract call as failed due to STDERR not being empty, and emit STDERR content (trimmed to the first 32 bytes).

Note that this will cause all previous instructions written to STDOUT to be discarded and call state will be set as failed, and only the bytes written to STDERR will be emitted as an on-chain event similar to how STDOUT works above.


# Installing qvmctl

The `qvmctl` CLI tool is the swiss knife for interacting with QVM. It can be acquired and easily used through docker using the following commands:

### Install image <a href="#install-image" id="install-image"></a>

```
docker pull qanplatform/qvmctl
```

### Verify installation <a href="#verify-installation" id="verify-installation"></a>

```
docker run --rm qanplatform/qvmctl testnet
```

If everything went correctly the  `testnet Sepolia` should be printed on the terminal.

<br>


# Setting up your workspace

A workspace is nothing else but a folder which will be mounted into the `qvm-compiler-*` and `qvmctl` docker containers.

It will contain:

* A private key used for deployment and contract calls
* The smart contract binary to be deployed

To create the workspace create the `ws` directory in your current directory like this:

```
mkdir ws && cd ws
```

## Generate a random private key <a href="#generate-a-random-private-key" id="generate-a-random-private-key"></a>

First you need a random secp256k1 private key, which is (almost) any random 32 byte sequence in a hexadecimal format with `0x` prepended to it. If you have OpenSSL installed (most likely you have it if you are running Linux or macOS) then you can generate one easily with the following command:

```
echo "0x"$(openssl rand -hex 32) > privkey.txt
```

## Determine your wallet address <a href="#determine-your-wallet-address" id="determine-your-wallet-address"></a>

Based on the randomly generated key you will end up with a wallet address. Run the following command in your terminal:

```
docker run --rm -v $(pwd):/ws qanplatform/qvmctl deploy --privkey privkey.txt .
```

Mind the dot (".") at the end of the command!

If you did it correctly you will receive a message like `"Connected to QVM Repository with 0xYOURADDRESS"`. The message is followed by an insufficient balance notification, which is of course normal.

## Get some sETH for your wallet <a href="#get-some-reth-for-your-wallet" id="get-some-reth-for-your-wallet"></a>

As stated previously, QVM is tested as a Layer2 smart contract execution engine on the Sepolia Ethereum testnet. First you will need at least 1 sETH so you can play around with QVM, because fees related to the operations must be paid on the testnet as well.

You can get some sETH for your wallet on these Faucet websites for example:&#x20;

<https://sepolia-faucet.pk910.de>\
<https://grabteeth.xyz>\
<https://fauceth.komputing.org>

Enter the wallet address you obtained in the previous step and wait for your sETH to arrive.


# Writing a smart contract

Contracts can be written in several programming languages. We provide official samples for writing smart contracts for the following:

{% content-ref url="/pages/jI285S1Ez5wGdcXcsKIZ" %}
[Golang (Go) smart contract](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/golang-go-smart-contract)
{% endcontent-ref %}

{% content-ref url="/pages/S6Qe4bbXpoZOjiUH0gcO" %}
[JavaScript (JS) smart contract](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/javascript-js-smart-contract)
{% endcontent-ref %}

{% hint style="info" %}
We will keep on expanding this list continously! Check back later if your faviourite language is not officially supported here yet.
{% endhint %}


# Compiling a smart contract

The way how smart contracts are compiled to statically linked linux binaries depends on the programming language being used. We provide tutorials and/or optimized compilers for the following languages:

{% content-ref url="/pages/S6Qe4bbXpoZOjiUH0gcO" %}
[JavaScript (JS) smart contract](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/javascript-js-smart-contract)
{% endcontent-ref %}

{% content-ref url="/pages/vSdZXXcMKaJDKnWZA6dO" %}
[Python smart contract](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/python-smart-contract)
{% endcontent-ref %}

{% content-ref url="/pages/LnAVFAebj2wcy6w1iuvr" %}
[TypeScript (TS) smart contract](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/typescript-ts-smart-contract)
{% endcontent-ref %}

{% content-ref url="/pages/g3jYD5FEtFnFnwMKAV7G" %}
[C smart contract](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c-smart-contract)
{% endcontent-ref %}

{% content-ref url="/pages/Ds75IEtoSUSHSM6c8aUh" %}
[C++ smart contract](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c++-smart-contract)
{% endcontent-ref %}

{% content-ref url="/pages/jI285S1Ez5wGdcXcsKIZ" %}
[Golang (Go) smart contract](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/golang-go-smart-contract)
{% endcontent-ref %}

{% content-ref url="/pages/p1OAuJBD9rCbQCa0CIpA" %}
[Rust smart contract](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/rust-smart-contract)
{% endcontent-ref %}

{% content-ref url="/pages/wxFSmkF9wXXYF6Cgyf1P" %}
[Kotlin smart contract](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/kotlin-smart-contract)
{% endcontent-ref %}

{% hint style="info" %}
We will keep on expanding this list continously! Check back later if your faviourite language is not officially supported here yet.
{% endhint %}


# Deploying a smart contract

Deploying a contract is done as follows:

## Verifying the compiled binary in your workspace <a href="#verifying-the-compiled-directory-in-your-workspace" id="verifying-the-compiled-directory-in-your-workspace"></a>

This simply means verifying that the binary file you have compiled with static linking in the step which is [specific for your language](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages) exists in your current workspace folder. After you have successfully executed the compilation, the resulting binary should be in your workspace already under the name `contract`. To verify just execute this command:

```
ls -al contract
```

If everything went well you should see similar output:

`-rwxr-xr-x 1 user group 1204224 Jul 25 02:14 contract`

## Run the deploy command of `qvmctl` using docker <a href="#run-the-deploy-command-of-qvmctl-using-docker" id="run-the-deploy-command-of-qvmctl-using-docker"></a>

```
docker run --rm -v $(pwd):/ws qanplatform/qvmctl deploy --privkey privkey.txt contract
```

## What happens under the hood? <a href="#what-happens-under-the-hood" id="what-happens-under-the-hood"></a>

### Upload <a href="#upload" id="upload"></a>

* Deployment fees are estimated based on your contract size
* Balance check is performed whether your wallet address has enough funds to cover the fee
* Your contract binary is pinned to IPFS
* A checksum of the binary's integrity is generated
* The above checksum is signed with your private key
* A call is made to the QVM Repository contract with your IPFS CID + the signature
* Fees are either paid during this call or the whole call fails

### Download <a href="#download" id="download"></a>

* The QVM Repository contract emits a Deployment event upon successful deployment
* QVM Executor nodes will download the binary based on the IPFS CID
* They will cryptographically prove to the QVM Repository that the contract has been downloaded indeed
* The QVM Repository contract verifies the submitted cryptographic proof to ensure Executors have the binary
* If above verification verification was successful then the contract is Registered and is now callable


# Calling a smart contract function

Contracts can be called by their address. There are various pieces of data one can/should pass to a contract call in order to make it succeed.

The general syntax of a contract call is executed as follows:

```
docker run --rm qanplatform/qvmctl call \
    -m $RAM_BYTES \
    -t $TIMEOUT_MILLISEC \
    -r $DB_READ_SLOTS \
    -w $DB_WRITE_SLOTS_COUNT \
    --privkey $PRIVKEY_PATH \
    $CONTRACT_ADDR
    $ARG1 $ARG2 $ARGN
```

The arguments prepended with a **$** sign mean the following:

* $RAM\_BYTES: How much RAM the contract needs to execute the requested operation successfully
* $TIMEOUT\_MILLISEC: How much time the contract needs to execute the requested operation successfully
* $DB\_READ\_SLOTS: The Database fields to be read and passed to the execution environment, separated by commas
* $DB\_WRITE\_SLOTS\_COUNT: How many database fields this operation will write to after successful execution
* $PRIVKEY\_PATH: Path to a file which contains the private key for a wallet which has enough funds to execute the call
* $CONTRACT\_ADDR: Address of the smart contract to be called
* $ARG{N}: Arguments passed to the smart contract binary during execution


# Reading smart contract storage

It is easy to read any database field of any contract.

## Read a single field <a href="#read-a-single-field" id="read-a-single-field"></a>

To read a single field execute the following command:

```
docker run --rm qanplatform/qvmctl query $CONTRACT_ADDR $DB_SLOT
```

Make sure you replace `$CONTRACT_ADDR` and `$DB_SLOT` with the right values.

## Read multiple fields <a href="#read-multiple-fields" id="read-multiple-fields"></a>

To read multiple fields execute the following command:

```
docker run --rm qanplatform/qvmctl query $CONTRACT_ADDR $DB_SLOT1,$DB_SLOT2,$DB_SLOTN
```

Make sure you replace `$CONTRACT_ADDR` and `$DB_SLOT{N}` variables with the right values. Also pay attention that DB\_SLOT variable names are separated by a comma and there is no whitespace inbetween.


# DOCs for supported languages

What does it mean that a language is "supported" by QVM? Doesn't it support ***ALL*** languages?

The answer is yes, QVM supports ***ALL*** languages which can be compiled to a static ELF binary compatible with Linux. However, there is a continously expanding list of languages officially supported by QANplatform development team.

This means that for these languages there will be official tutorials and optimized compilers made available to ensure that contracts written in these languages run as efficient as possible and consume as little fees as absolutely required, nothing more.

### The current list of supported languages: <a href="#the-current-list-of-supported-languages" id="the-current-list-of-supported-languages"></a>

{% content-ref url="/pages/S6Qe4bbXpoZOjiUH0gcO" %}
[JavaScript (JS) smart contract](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/javascript-js-smart-contract)
{% endcontent-ref %}

{% content-ref url="/pages/vSdZXXcMKaJDKnWZA6dO" %}
[Python smart contract](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/python-smart-contract)
{% endcontent-ref %}

{% content-ref url="/pages/RZlfFvxQjP194uWKn6Rg" %}
[Java smart contract](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/java-smart-contract)
{% endcontent-ref %}

{% content-ref url="/pages/LnAVFAebj2wcy6w1iuvr" %}
[TypeScript (TS) smart contract](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/typescript-ts-smart-contract)
{% endcontent-ref %}

{% content-ref url="/pages/2QdyPAe5o8mK8UxEwLwv" %}
[C# (C-Sharp) smart contract](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c-c-sharp-smart-contract)
{% endcontent-ref %}

{% content-ref url="/pages/Ds75IEtoSUSHSM6c8aUh" %}
[C++ smart contract](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c++-smart-contract)
{% endcontent-ref %}

{% content-ref url="/pages/g3jYD5FEtFnFnwMKAV7G" %}
[C smart contract](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c-smart-contract)
{% endcontent-ref %}

{% content-ref url="/pages/jI285S1Ez5wGdcXcsKIZ" %}
[Golang (Go) smart contract](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/golang-go-smart-contract)
{% endcontent-ref %}

{% content-ref url="/pages/p1OAuJBD9rCbQCa0CIpA" %}
[Rust smart contract](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/rust-smart-contract)
{% endcontent-ref %}

{% content-ref url="/pages/wxFSmkF9wXXYF6Cgyf1P" %}
[Kotlin smart contract](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/kotlin-smart-contract)
{% endcontent-ref %}

{% hint style="info" %}
We will keep on expanding this list continously! Check back later if your faviourite language is not officially supported here yet.
{% endhint %}


# JavaScript (JS) smart contract

Write smart contracts in JavaScript - powered by QANplatform

<figure><img src="/files/PsG7acd0ylUUq7uACtyy" alt=""><figcaption></figcaption></figure>

### The new era of smart contracts by QANplatform has arrived.

The QAN Virtual Machine (QVM) allows developers to write smart contracts in any programming language. This is a breakthrough for the whole blockchain ecosystem since most blockchain platforms are only compatible with the Ethereum smart contract language, Solidity.&#x20;

Launching in 2023, QANplatform will be the first quantum-resistant Layer 1 hybrid blockchain platform where developers can write smart contracts in any programming language. Before the official private and public blockchain launch, QAN is publishing some puzzle pieces of its upcoming technology, such as the QVM, where developers can test the multi-language smart contract feature on the Ethereum Sepolia Testnet as a Layer 2 smart contract execution engine.&#x20;

Following the [Go (Golang) sample release](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/supported-languages/go-golang), QANplatform is releasing the documentation and the first smart contract sample for the most used programming language worldwide, JavaScript.&#x20;

### JavaScript, the most used programming language

Created in 1995 (yes, more than 25 years ago!) by [Brendan Eich](https://twitter.com/BrendanEich), this programming language was initially named “LiveScript” only to be rebranded as JavaScript (JS) right before its official release. JavaScript is also special in terms of its broad fields of its adoption. This language is used on a widest spectrum of hardware (e.g. ranging from the tiniest microcontrollers through PCs and servers to spacecrafts), and software (e.g. this very webpage you are looking at is also powered by JavaScript.&#x20;

For the past years, JavaScript has proved its effectiveness, and nothing proves this better than the fact that JavaScript has been the most used programming language for ten years in a row, according to [GitHub](https://octoverse.github.com/2022/top-programming-languages) and [Stackoverflow](https://survey.stackoverflow.co/2022/#overview) statistics. According to [Statista](https://www.statista.com/statistics/1241923/worldwide-software-developer-programming-language-communities/) there were 17.4 million developers worldwide who can code in JavaScript as of 2022. It is safe to say that one of the most used languages of the Web2 era is JavaScript, which is still used today by popular companies such as Facebook, Uber, Netflix, PayPal, LinkedIn, etc.&#x20;

### Write smart contracts in JavaScript

However there are some JavaScript samples, libraries, SDKs, and APIs where developers can interact with a blockchain (e.g. query the blockchain, send transactions, interact with a node), there are only few blockchains where developers can code smart contracts in JavaScript. QANplatform allows developers to build: smart contract, DApp, DeFi, DAO, token, CBDC, NFT, Metaverse, and Web3 solutions in JavaScript.&#x20;

### Benefits of JavaScript smart contracts

Suppose you are a single developer looking to play around with blockchain. In that case, you can finally do that since you are not forced to learn a new programming language in your free time, like Solidity - which you could only use for specific purposes. Instead, you can use your current JavaScript knowledge that you may possibly already mastered for several years or even a decade.&#x20;

\
If you are a CEO, CTO, CINO, CBDO looking to innovate with blockchain technology you can benefit from QANplatform’s [multi-language smart contract](https://learn.qanplatform.com/technology/technology-features/multi-language-smart-contracts-or-hyperpolyglot) feature as well. No need to hire or train Solidity programmers, since you can already use your inhouse development team or your current IT partner. It makes talent acquisitions, development, and codebase maintenance easier and cost-efficient for enterprises.<br>

### It’s time to write your first smart contract in JavaScript

Blockchain platforms only reward validators (miners, stakers) and node providers in their own utility tokens; however, smart contract developers are the ones who are building use cases and products on the blockchain to reach mass adoption. Imagine that GitHub would reward developers when their code is getting re-used by others. [QANplatform will reward developers](https://learn.qanplatform.com/technology/technology-features/developer-royalty-fees) on the QAN MainNet; therefore, you can already prepare some code libraries while playing around with QAN Virtual Machine and JavaScript smart contracts.<br>

{% content-ref url="/pages/Ei1whwHX6cglBf5Dat2n" %}
[Writing a smart contract in JavaScript (JS)](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/javascript-js-smart-contract/writing-a-smart-contract-in-javascript-js)
{% endcontent-ref %}

{% content-ref url="/pages/Wr89vjSqSAKcmxA3Bdyx" %}
[Compiling a smart contract in JavaScript (JS)](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/javascript-js-smart-contract/compiling-a-smart-contract-in-javascript-js)
{% endcontent-ref %}

\
\
\
\
\ <br>

\ <br>

\ <br>


# Writing a smart contract in JavaScript (JS)

### Sample contract functionality

The sample contract serves as a demonstration of general QVM logic.

It is capable of:

* registering users into the database
* storing the last registered user's name in the database
* echoing the previous user's name to STDOUT
* incrementing the total registered user count
* storing above counter in the database

### Sample code

```javascript
function main(args) {

    // THIS SAMPLE ONLY SUPPORTS THE "register" FUNCTION
    if (args && args.length === 2 && args[0] === "register") {

        // GET THE CURRENT USER'S NAME OR DEFAULT TO "unknown" IF THIS IS THE FIRST CALL
        const previous_name = process.env.DB_USER_CURRENT || "unknown";

        // GET THE TOTAL USER COUNT
        const total_user_count = parseInt(process.env.DB_TOTALUSERS || "0");

        // WRITE PREVIOUS USER NAME TO STDOUT
        process.stdout.write("OUT=prevname: " + previous_name);
        process.stdout.write("\n");

        // UPDATE CURRENT USER NAME BY WRITING IT TO DB
        process.stdout.write("DBW=USER_CURRENT=" + args[1]);
        process.stdout.write("\n");

        // STORE USER NAME UNDER A STORAGE SLOT FOR PERSISTENCE (CURRENT GETS OVERWRITTEN ON EACH CALL)
        process.stdout.write("DBW=USER_" + total_user_count + "=" + args[1]);
        process.stdout.write("\n");

        // INCREMENT THE TOTAL USER COUNT
        process.stdout.write("DBW=TOTALUSERS=" + (total_user_count + 1));
        process.stdout.write("\n");

        // EXECUTION SUCCESSFUL
        process.exit(0);
    }

    // EXECUTION FAILED, WRONG COMMAND
    if (args.length >= 1) {
        process.stderr.write("Wrong CMD: " + args[0]);
        process.stderr.write("\n");
        process.exit(1);
    }

    // EXECUTION FAILED, WRONG ARGS
    process.stderr.write("Wrong args!");
    process.stderr.write("\n");
    process.exit(1);
}
main(process.argv.slice(2));
```

### Save the contract

Open a text editor and save above sample contract as `main.js` file.


# Compiling a smart contract in JavaScript (JS)

When compiling a JavaScript contract one wants to reduce the resulting binary size to the bare minimum possible to save on deployment fees, since that metric is tied only to the size of the deployed binary.&#x20;

As a good rule of thumb is to always strip all removable metadata (e.g.: DWARF, symbol table and debug info).

### Compiling JavaScript contract to static binary with the QVM compiler

We already supply a simple compiler container which will perform the most optimized build of turning above sample contract to a static binary which can be run by QVM.

Since you saved the previous sample contract as `main.js` in your current directory, you can run the compiler like this:

`docker run --rm -v $(pwd):/ws qanplatform/qvm-compiler-js`

Afterwards you will end up with a statically linked linux ELF binary called "contract" in your current directory.

```shell
# checking output size of QVM compiler
ls -alh contract
-rwxr-xr-x  1 user  group   145K Mar  6 17:23 contract
```


# Java smart contract

Write smart contracts in Java - powered by QANplatform

<figure><img src="/files/5WusMBckBF5CmAxhvFuJ" alt=""><figcaption></figcaption></figure>

### The new era of smart contracts by QANplatform has arrived.

**The new era of smart contracts by QANplatform has arrived. The QAN Virtual Machine (QVM) allows developers to write smart contracts in any programming language. This is a breakthrough for the whole blockchain ecosystem since most blockchain platforms are only compatible with the Ethereum smart contract language, Solidity.**

Launching in 2023, QANplatform will be the first quantum-resistant Layer 1 hybrid blockchain platform where developers can write smart contracts in any programming language. Before the official private and public blockchain launch, QAN is publishing some puzzle pieces of its upcoming technology, such as the QVM, where developers can test the multi-language smart contract feature on the Ethereum Sepolia Testnet as a Layer 2 smart contract execution engine.

Following the [Go (Golang)](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/supported-languages/go-golang), [JavaScript (JS)](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/javascript-js-smart-contract), [C](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c-smart-contract), [TypeScript (TS)](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/typescript-ts-smart-contract), [C++](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c++), [Rust](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/rust), [Kotlin](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/kotlin), and [Python](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/python) smart contract sample releases, QANplatform is releasing the documentation and the first smart contract sample for Java programming language.

### Java programming language

Developed by [James Gosling](https://twitter.com/errcraft) and released in 1995, Java is a high-level, general-purpose programming language. Its primary advantage lies in its platform independence, allowing Java programs to run on any system equipped with a Java Virtual Machine (JVM).

Java is widely used in various domains, including web development, enterprise software development, Android app development, scientific computing, and more.&#x20;

Java has maintained its position among the top four programming languages consistently since its introduction in 1995. While [GitHub](https://octoverse.github.com/2022/top-programming-languages) statistics rank Java at the third spot as one of the most popular languages, recent [Stack Overflow](https://survey.stackoverflow.co/2022/#most-popular-technologies-language-learn) data indicates that TypeScript has pushed Java down to the fourth position. [Statista’s](https://www.statista.com/statistics/1241923/worldwide-software-developer-programming-language-communities/#:~:text=According%20to%20the%20survey%2C%20the,programmers%2C%20with%2015.7%20million%20developers.) data reveals that Java has a developer base of 14 million individuals who possess coding skills in the language.

The ranking doesn’t really matter, as Java continues to be extensively used across the vast codebases of prominent companies such as Amazon, Google, Netflix, Pinterest, Spotify, Square, and Zoom.

### Write smart contracts in Java

However there are some Java samples, libraries, SDKs, and APIs where developers can interact with a blockchain (e.g. query the blockchain, send transactions, interact with a node), there are only few blockchains where developers can code smart contracts in Java. QANplatform allows developers to build: smart contract, DApp, DeFi, DAO, token, CBDC, NFT, Metaverse, and Web3 solutions in Java.&#x20;

### Benefits of Java smart contracts

Suppose you are a single developer looking to play around with blockchain. In that case, you can finally do that since you are not forced to learn a new programming language in your free time, like Solidity - which you could only use for specific purposes. Instead, you can use your current Java knowledge that you may possibly already mastered for several years or even a decade.&#x20;

\
If you are a CEO, CTO, CINO, CBDO looking to innovate with blockchain technology you can benefit from QANplatform’s [multi-language smart contract](https://learn.qanplatform.com/technology/technology-features/multi-language-smart-contracts-or-hyperpolyglot) feature as well. No need to hire or train Solidity programmers, since you can already use your inhouse development team or your current IT partner. It makes talent acquisitions, development, and codebase maintenance easier and cost-efficient for enterprises.<br>

### It’s time to write your first smart contract in Java

Blockchain platforms only reward validators (miners, stakers) and node providers in their own utility tokens; however, smart contract developers are the ones who are building use cases and products on the blockchain to reach mass adoption. Imagine that GitHub would reward developers when their code is getting re-used by others. [QANplatform will reward developers](https://learn.qanplatform.com/technology/technology-features/developer-royalty-fees) on the QAN MainNet; therefore, you can already prepare some code libraries while playing around with QAN Virtual Machine and Java smart contracts.<br>

{% content-ref url="/pages/gBRJJuruhHcJVQ1Nzhd9" %}
[Writing a smart contract in Java](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/java-smart-contract/writing-a-smart-contract-in-java)
{% endcontent-ref %}

{% content-ref url="/pages/kvBzqPFEiWfsdNHsAlhq" %}
[Compiling a smart contract in Java](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/java-smart-contract/compiling-a-smart-contract-in-java)
{% endcontent-ref %}

\
\
\
\
\ <br>

\ <br>

\ <br>


# Writing a smart contract in Java

### Sample contract functionality

The sample contract serves as a demonstration of general QVM logic.

It is capable of:

* registering users into the database
* storing the last registered user's name in the database
* echoing the previous user's name to STDOUT
* incrementing the total registered user count
* storing above counter in the database

### Sample code

```java
public class contract {
    
    static public void main(String[] args) {
        
        // THIS SAMPLE ONLY SUPPORTS THE "register" FUNCTION
        if (args.length == 2 && args[0].equals("register")) {
            
            // GET THE CURRENT USER'S NAME
            String previousName = System.getenv("DB_USER_CURRENT");
            
            // OR DEFAULT TO "unknown" IF THIS IS THE FIRST CALL
            if (previousName == null || previousName.length() == 0) {
                previousName = "unknown";
            }
            
            // GET THE TOTAL USER COUNT
            int totalUserCount = envAtoi("DB_TOTALUSERS");
            
            // WRITE PREVIOUS USER NAME TO STDOUT
            System.out.println("OUT=prevname: " + previousName);
            
            // UPDATE CURRENT USER NAME BY WRITING IT TO DB
            System.out.println("DBW=USER_CURRENT=" + args[1]);
            
            // STORE USER NAME UNDER A STORAGE SLOT FOR PERSISTENCE (CURRENT GETS OVERWRITTEN ON EACH CALL)
            System.out.println("DBW=USER_" + totalUserCount + "=" + args[1]);
            
            // INCREMENT THE TOTAL USER COUNT
            System.out.println("DBW=TOTALUSERS=" + (totalUserCount+1));
            return;
        }
        
        // ENSURE PROPER INPUT
        if (args.length >= 1) {
            System.err.println("Wrong CMD: " + args[0]);
            System.exit(1);
        }
        
        System.err.println("Wrong args!");
        System.exit(1);
    };

    static int envAtoi(String env) {
        String val = System.getenv(env);
        if (val == null || val.length() == 0) {
            return 0;
        }
        try {
            return Integer.valueOf(val);
        } catch (Exception e) {
            return 0;
        }
    };
};

```

### Save the contract

Open a text editor and save above sample contract as `contract.java` file.


# Compiling a smart contract in Java

Java is quite different from C/C++/Go/Rust since it’s required JRE to execute.\
The `javac` standard compiler produces JVM bytecode from Java source (class file) not a static executable binary.

In this sample, we’ll use GraalVM Native Image to produce static binary that suitable for deploying and executing under QVM environment.

```
# compile JVM bytecode (Java class file)
javac contract.java

# compile class file to static binary
native-image --static contract

# check the output binary size
wc -c contract
13644368 contract
```

### Compiling Java contract to static binary with the QVM compiler

We already supply a simple compiler container which will perform the most optimized build of turning above sample contract to a static binary which can be run by QVM.

Since you saved the previous sample contract as `contract.java` in your current directory, you can run the compiler like this:

```bash
docker run --rm -v $(pwd):/ws qanplatform/qvm-compiler-java
```

Afterwards you will end up with a statically linked linux ELF binary called "contract" in your current directory.

```shell
# checking output size of QVM compiler
ls -alh contract
-rwxr-xr-x  1 user  group    863K Jun 22 15:48 contract
```


# Python smart contract

Write smart contracts in Python powered by QANplatform

<figure><img src="/files/XJqPRxEF3LLKsORAfuuq" alt=""><figcaption></figcaption></figure>

### The new era of smart contracts by QANplatform has arrived.

The QAN Virtual Machine (QVM) allows developers to write smart contracts in any programming language. This is a breakthrough for the whole blockchain ecosystem since most blockchain platforms are only compatible with the Ethereum smart contract language, Solidity.&#x20;

Launching in 2023, QANplatform will be the first quantum-resistant Layer 1 hybrid blockchain platform where developers can write smart contracts in any programming language. Before the official private and public blockchain launch, QAN is publishing some puzzle pieces of its upcoming technology, such as the QVM, where developers can test the multi-language smart contract feature on the Ethereum Sepolia Testnet as a Layer 2 smart contract execution engine.&#x20;

Following the [Go (Golang)](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/supported-languages/go-golang), [JavaScript (JS)](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/javascript-js), [C](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c), [TypeScript (TS)](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/typescript-ts), [C++](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c++), [Rust](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/rust), and [Kotlin](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/kotlin) smart contract sample releases, QANplatform is releasing the documentation and the first smart contract sample for Python programming language.

### Python programming language

[Python](https://www.python.org/) was initially developed by Guido van Rossum in 1991, and has remained a highly favored programming language for several decades.&#x20;

Python is a high-level, interpreted programming language known for its simplicity and readability. Python emphasizes code readability and allows programmers to express concepts in fewer lines of code compared to other languages. It has a large standard library and supports multiple programming paradigms, including procedural, object-oriented, and functional programming.

Python is widely used in various IT fields due to its versatility and extensive libraries: web development, data analysis and visualization, machine learning and artificial intelligence (AI), scientific computing, automation and scripting, DevOps, game development, cybersecurity, internet of things (IoT).&#x20;

Python consistently maintained its popularity and is recognized as the second most widely used programming language after JavaScript, as indicated by statistics from [GitHub](https://octoverse.github.com/2022/top-programming-languages) and Stack Overflow. [Statista’s](https://www.statista.com/statistics/1241923/worldwide-software-developer-programming-language-communities/#:~:text=According%20to%20the%20survey%2C%20the,programmers%2C%20with%2015.7%20million%20developers.) data reveals that Python has a developer base of 15.7 million individuals who possess coding skills in the language.. Despite its 32-year history, Python has demonstrated a consistent upward trend in adoption, as demonstrated by a substantial annual growth rate of 22.5% in its usage on GitHub. As per [Stack Overflow](https://survey.stackoverflow.co/2022/#most-loved-dreaded-and-wanted-language-want)’s 2022 Developer Survey, Python holds the position of the second most desired programming language, following Rust.

### Write smart contracts in Python

However there are some Python samples, libraries, SDKs, and APIs where developers can interact with a blockchain (e.g. query the blockchain, send transactions, interact with a node), there are only few blockchains where developers can code smart contracts in Python. QANplatform allows developers to build: smart contract, DApp, DeFi, DAO, token, CBDC, NFT, Metaverse, and Web3 solutions in Python.

### Benefits of Python smart contracts

Suppose you are a single developer looking to play around with blockchain. In that case, you can finally do that since you are not forced to learn a new programming language in your free time, like Solidity — which you could only use for specific purposes. Instead, you can use your current Python knowledge that you may possibly already mastered for several years or even a decade.

If you are a CEO, CTO, CINO, CBDO looking to innovate with blockchain technology you can benefit from QANplatform’s multi-language smart contract feature as well. No need to hire or train Solidity programmers, since you can already use your inhouse development team or your current IT partner. It makes talent acquisitions, development, and codebase maintenance easier and cost-efficient for enterprises.<br>

### It’s time to write your first smart contract in Python

Blockchain platforms only reward validators (miners, stakers) and node providers in their own utility tokens; however, smart contract developers are the ones who are building use cases and products on the blockchain to reach mass adoption. Imagine that GitHub would reward developers when their code is getting re-used by others. [QANplatform will reward developers](https://learn.qanplatform.com/technology/technology-features/developer-royalty-fees) on the QAN MainNet; therefore, you can already prepare some code libraries while playing around with QAN Virtual Machine and Python smart contracts.<br>

{% content-ref url="/pages/IsSqJ1s1uMXlRgAoJrCw" %}
[Writing a smart contract in Python](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/python-smart-contract/writing-a-smart-contract-in-python)
{% endcontent-ref %}

{% content-ref url="/pages/2EyW530TwTg38Rgiurq3" %}
[Compiling a smart contract in Python](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/python-smart-contract/compiling-a-smart-contract-in-python)
{% endcontent-ref %}

\ <br>


# Writing a smart contract in Python

### Sample contract functionality

The sample contract serves as a demonstration of general QVM logic.

It is capable of:

* registering users into the database
* storing the last registered user's name in the database
* echoing the previous user's name to STDOUT
* incrementing the total registered user count
* storing above counter in the database

### Sample smart contract code

```python
import os
import sys

def getenv(key, deft):
    return os.getenv(key) or deft

def get_int_env(key, deft):
    try:
        return int(getenv(key, ""))
    except Exception:
        return deft

def stdout_writeln(s):
    sys.stdout.write(s + "\n")

def stderr_writeln(s):
    sys.stderr.write(s + "\n")

def contract(argv):
    
    # THIS SAMPLE ONLY SUPPORTS THE "register" FUNCTION
    if len(argv) == 3 and argv[1] == "register":
        
        # GET THE CURRENT USER'S NAME OR DEFAULT TO "unknown" IF THIS IS THE FIRST CALL
        previous_name = getenv("DB_USER_CURRENT", "unknown")
        
        # GET THE TOTAL USER COUNT
        total_user_count = get_int_env("DB_TOTALUSERS", 0)
        
        # WRITE PREVIOUS USER NAME TO STDOUT
        stdout_writeln("OUT=prevname: " + previous_name)

        # UPDATE CURRENT USER NAME BY WRITING IT TO DB
        stdout_writeln("DBW=USER_CURRENT=" + argv[2])

        # STORE USER NAME UNDER A STORAGE SLOT FOR PERSISTENCE (CURRENT GETS OVERWRITTEN ON EACH CALL)
        stdout_writeln("DBW=USER_%d=%s" % (total_user_count, argv[2]))

        # INCREMENT THE TOTAL USER COUNT
        stdout_writeln("DBW=TOTALUSERS=%d" % (total_user_count+1))

        # CONTRACT RAN SUCCESSFULLY, EXIT WITH ZERO CODE
        sys.exit(0)

    # WRONG INVOCATION
    if len(argv) >= 2:
        stderr_writeln("Wrong CMD: %s" % argv[1])
        sys.exit(1)

    stderr_writeln("Wrong argv!")
    sys.exit(1)


if __name__ == '__main__':
    contract(sys.argv)
```

### Save the smart contract

Open a text editor and save above sample contract as `main.py` file.

{% content-ref url="/pages/2EyW530TwTg38Rgiurq3" %}
[Compiling a smart contract in Python](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/python-smart-contract/compiling-a-smart-contract-in-python)
{% endcontent-ref %}


# Compiling a smart contract in Python

### Challenges:&#x20;

* Python requires an interpreter to execute
* CPython - the reference Python implementation is quite big (30MiB+) and hence not suitable for QVM environment due to cost

### Solution:

We already supply a simple compiler container which uses a compact interpreter. While it has partial trade-offs regarding some functionality compared to the full-blown CPython, for QVM smart contract world it is still acceptable, and **costs 100x less to deploy due to the size savings**!

Still, when compiling a Python contract one wants to reduce the resulting binary size to the bare minimum possible to save on deployment fees, since that metric is tied only to the size of the deployed binary. As a good rule of thumb is to always strip all removable metadata (e.g.: DWARF, symbol table and debug info).

The QVM compiler enables presets which help to achieve an extremely small static binary as a result.

### Compiling Pyhton smart contract to static binary with the QVM compiler

We already supply a simple compiler container which will perform the most optimized build of turning above sample contract to a static binary which can be run by QVM.

Since you saved the previous sample contract as `main.py` in your current directory, you can run the compiler like this:

```bash
docker run --rm -v $(pwd):/ws qanplatform/qvm-compiler-python
```

Afterwards you will end up with a statically linked linux ELF binary called “contract” in your current directory.

```bash
# checking output size of QVM compiler
ls -alh contract
-rwxr-xr-x  1 user  group    247K Jun 8 14:03 contract
```


# TypeScript (TS) smart contract

Write smart contracts in TypeScript - powered by QANplatform

<figure><img src="/files/XUvsh5dOy8EUGUxLrJyY" alt=""><figcaption></figcaption></figure>

### The new era of smart contracts by QANplatform has arrived.

The QAN Virtual Machine (QVM) allows developers to write smart contracts in any programming language. This is a breakthrough for the whole blockchain ecosystem since most blockchain platforms are only compatible with the Ethereum smart contract language, Solidity.&#x20;

Launching in 2023, QANplatform will be the first quantum-resistant Layer 1 hybrid blockchain platform where developers can write smart contracts in any programming language. Before the official private and public blockchain launch, QAN is publishing some puzzle pieces of its upcoming technology, such as the QVM, where developers can test the multi-language smart contract feature on the Ethereum Sepolia Testnet as a Layer 2 smart contract execution engine.&#x20;

Following the [Go (Golang) smart contract](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/supported-languages/go-golang), [JavaScript (JS) smart contract](https://medium.com/qanplatform/write-smart-contracts-in-javascript-powered-by-qanplatform-5ae9bac34e6), [C smart contract](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c) sample release, the QANplatform is releasing the documentation and the first smart contract sample for TypeScript programming language.&#x20;

### TypeScript programming language

[TypeScript](https://www.typescriptlang.org) is a statically typed superset of JavaScript that was developed and is maintained by Microsoft. It adds optional static type checking, classes, interfaces, and other advanced features to [JavaScript](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/javascript-js), making it more scalable and easier to maintain. TypeScript is designed to improve the development experience of large-scale JavaScript applications and is becoming increasingly popular among developers due to its many benefits. Its syntax is very similar to JavaScript, which makes it easy for developers who already know JavaScript to learn and use it.\
\
The popularity of the language rocketed in the past decade and helds firm in fourth place year-over-year on the list of top programing languages according to [GitHub](https://octoverse.github.com/2022/top-programming-languages). TypeScript is one of the most loved programming language after Rust according to [Stackoverflow](https://survey.stackoverflow.co/2022/#overview).&#x20;

TypeScript is used in many industries, by companies such as Asana, Bitpanda, TypeForm, or American Airlines. &#x20;

### Write smart contracts in TypeScript

However there are some TypeScript samples, libraries, SDKs, and APIs where developers can interact with a blockchain (e.g. query the blockchain, send transactions, interact with a node), there are only few blockchains where developers can code smart contracts in TypeScript. QANplatform allows developers to build: smart contract, DApp, DeFi, DAO, token, CBDC, NFT, Metaverse, and Web3 solutions in TypeScript.

### Benefits of TypeScript smart contracts

Suppose you are a single developer looking to play around with blockchain. In that case, you can finally do that since you are not forced to learn a new programming language in your free time, like Solidity - which you could only use for specific purposes. Instead, you can use your current TypeScript knowledge that you may possibly already mastered for several years or even a decade.&#x20;

If you are a CEO, CTO, CINO, CBDO looking to innovate with blockchain technology you can benefit from QANplatform’s [multi-language smart contract](https://learn.qanplatform.com/technology/technology-features/multi-language-smart-contracts-or-hyperpolyglot) feature as well. No need to hire or train Solidity programmers, since you can already use your inhouse development team or your current IT partner. It makes talent acquisitions, development, and codebase maintenance easier and cost-efficient for enterprises.<br>

### It’s time to write your first smart contract in TypeScript

Blockchain platforms only reward validators (miners, stakers) and node providers in their own utility tokens; however, smart contract developers are the ones who are building use cases and products on the blockchain to reach mass adoption. Imagine that GitHub would reward developers when their code is getting re-used by others. [QANplatform will reward developers](https://learn.qanplatform.com/technology/technology-features/developer-royalty-fees) on the QAN MainNet; therefore, you can already prepare some code libraries while playing around with QAN Virtual Machine and TypeScript smart contracts.<br>

{% content-ref url="/pages/RACeTS7hhKJAUSrpqSGl" %}
[Writing a smart contract in TypeScript (TS)](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/typescript-ts-smart-contract/writing-a-smart-contract-in-typescript-ts)
{% endcontent-ref %}

{% content-ref url="/pages/GEqhn5JblxJW5MXZuBwt" %}
[Compiling a smart contract in TypeScript (TS)](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/typescript-ts-smart-contract/compiling-a-smart-contract-in-typescript-ts)
{% endcontent-ref %}

\
\
\ <br>

\ <br>

\ <br>


# Writing a smart contract in TypeScript (TS)

### Sample contract functionality

The sample contract serves as a demonstration of general QVM logic.

It is capable of:

* registering users into the database
* storing the last registered user's name in the database
* echoing the previous user's name to STDOUT
* incrementing the total registered user count
* storing above counter in the database

### Sample code

```c
function contract(args: string[]) {

  // THIS SAMPLE ONLY SUPPORTS THE "register" FUNCTION
  if (args && args.length === 2 && args[0] === "register") {

    // GET THE CURRENT USER'S NAME OR DEFAULT TO "unknown" IF THIS IS THE FIRST CALL
    const previous_name: string = process.env.DB_USER_CURRENT || "unknown";

    // GET THE TOTAL USER COUNT
    const total_user_count: number = parseInt(process.env.DB_TOTALUSERS || "0");

    // WRITE PREVIOUS USER NAME TO STDOUT
    process.stdout.write(`OUT=prevname: ${previous_name}\n`);

    // UPDATE CURRENT USER NAME BY WRITING IT TO DB
    process.stdout.write(`DBW=USER_CURRENT=${args[1]}\n`);

    // STORE USER NAME UNDER A STORAGE SLOT FOR PERSISTENCE (CURRENT GETS OVERWRITTEN ON EACH CALL)
    process.stdout.write(`DBW=USER_${total_user_count}=${args[1]}\n`);

    // INCREMENT THE TOTAL USER COUNT
    process.stdout.write(`DBW=TOTALUSERS=${(total_user_count + 1)}\n`);
    process.exit(0);
  }

  if (args.length >= 1) {
    process.stderr.write(`Wrong CMD: ${args[0]}\n`);
    process.exit(1);
  }

  process.stderr.write("Wrong args!\n");
  process.exit(1);
}

contract(process.argv.slice(2));
```

### Save the contract

Open a text editor and save above sample contract as `main.ts` file.

{% content-ref url="/pages/GEqhn5JblxJW5MXZuBwt" %}
[Compiling a smart contract in TypeScript (TS)](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/typescript-ts-smart-contract/compiling-a-smart-contract-in-typescript-ts)
{% endcontent-ref %}


# Compiling a smart contract in TypeScript (TS)

When compiling a TypeScript contract one wants to reduce the resulting binary size to the bare minimum possible to save on deployment fees, since that metric is tied only to the size of the deployed binary.

As a good rule of thumb is to always strip all removable metadata (e.g.: DWARF, symbol table and debug info).

### Compiling TypeScript contract to static binary with the QVM compiler

We already supply a simple compiler container which will perform the most optimized build of turning above sample contract to a static binary which can be run by QVM.

Since you saved the previous sample contract as `main.ts` in your current directory, you can run the compiler like this:

`docker run --rm -v $(pwd):/ws qanplatform/qvm-compiler-ts`

Afterwards you will end up with a statically linked linux ELF binary called “contract” in your current directory.

```shell
# checking output size of QVM compiler
ls -alh contract
-rwxr-xr-x  1 user  group   145K Apr  6 11:23 contract
```


# C# (C-Sharp) smart contract

Write smart contracts in C# - powered by QANplatform

<figure><img src="/files/dKDL1kmnWjSkA2wzBwNr" alt=""><figcaption></figcaption></figure>

### The new era of smart contracts by QANplatform has arrived.

The QAN Virtual Machine (QVM) allows developers to write smart contracts in any programming language. This is a breakthrough for the whole blockchain ecosystem since most blockchain platforms are only compatible with the Ethereum smart contract language, Solidity.&#x20;

Launching in 2023, QANplatform will be the first quantum-resistant Layer 1 hybrid blockchain platform where developers can write smart contracts in any programming language. Before the official private and public blockchain launch, QAN is publishing some puzzle pieces of its upcoming technology, such as the QVM, where developers can test the multi-language smart contract feature on the Ethereum Sepolia Testnet as a Layer 2 smart contract execution engine.&#x20;

Following the [Go (Golang)](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/supported-languages/go-golang), [JavaScript (JS)](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/javascript-js-smart-contract), [C](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c-smart-contract), [TypeScript (TS)](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/typescript-ts-smart-contract), [C++](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c++), [Rust](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/rust), [Kotlin](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/kotlin), [Python](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/python), and [Java](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/java-smart-contract) smart contract sample releases, QANplatform is releasing the documentation and the first smart contract sample for Java programming language.

### C# programming language

Released in 2000, [C#](https://learn.microsoft.com/en-us/dotnet/csharp/tour-of-csharp/) (C-Sharp) is an object-oriented, general-purpose programming language created by the Microsoft team led by [Anders Hejlsberg](https://twitter.com/ahejlsberg) and [Mads Torgersen](https://twitter.com/madstorgersen).

C# syntax is similar to other C-style languages such as C, C++, and Java. However C# has become popular because of its ease of use, extensive framework support, and seamless integration with Microsoft technologies. It finds widespread usage in creating Windows applications, developing ASP.NET web applications, powering Unity game development, and building backend services.

According to [GitHub](https://octoverse.github.com/2022/top-programming-languages) and [Stack Overflow](https://survey.stackoverflow.co/2022/#technology-most-popular-technologies) statistics, C# is the 5th most popular programming language in the world. [Statista’s](https://www.statista.com/statistics/1241923/worldwide-software-developer-programming-language-communities/#:~:text=According%20to%20the%20survey%2C%20the,programmers%2C%20with%2015.7%20million%20developers.) data reveals that C# has a developer base of 10 million individuals who possess coding skills in the language.

### Write smart contracts in C\#

However there are some C# samples, libraries, SDKs, and APIs where developers can interact with a blockchain (e.g. query the blockchain, send transactions, interact with a node), there are only few blockchains where developers can code smart contracts in C#. QANplatform allows developers to build: smart contract, DApp, DeFi, DAO, token, CBDC, NFT, Metaverse, and Web3 solutions in C#.

### Benefits of C# smart contracts

Suppose you are a single developer looking to play around with blockchain. In that case, you can finally do that since you are not forced to learn a new programming language in your free time, like Solidity — which you could only use for specific purposes. Instead, you can use your current C# knowledge that you may possibly already mastered for several years or even a decade.

If you are a CEO, CTO, CINO, CBDO looking to innovate with blockchain technology you can benefit from QANplatform’s [multi-language smart contract](https://learn.qanplatform.com/technology/technology-features/multi-language-smart-contracts-or-hyperpolyglot) feature as well. No need to hire or train Solidity programmers, since you can already use your inhouse development team or your current IT partner. It makes talent acquisitions, development, and codebase maintenance easier and cost-efficient for enterprises.<br>

### It’s time to write your first smart contract in C\#

Blockchain platforms only reward validators (miners, stakers) and node providers in their own utility tokens; however, smart contract developers are the ones who are building use cases and products on the blockchain to reach mass adoption. Imagine that GitHub would reward developers when their code is getting re-used by others. [QANplatform will reward developers](https://learn.qanplatform.com/technology/technology-features/developer-royalty-fees) on the QAN MainNet; therefore, you can already prepare some code libraries while playing around with QAN Virtual Machine and C# smart contracts.<br>

{% content-ref url="/pages/NtwHU1SCa8VSZBq8lrL5" %}
[Writing a smart contract in C# (C-Sharp)](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c-c-sharp-smart-contract/writing-a-smart-contract-in-c-c-sharp)
{% endcontent-ref %}

{% content-ref url="/pages/edl6E4F07PheZ6B8noyf" %}
[Compiling a smart contract in C# (C-Sharp)](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c-c-sharp-smart-contract/compiling-a-smart-contract-in-c-c-sharp)
{% endcontent-ref %}

\
\
\
\
\ <br>

\ <br>

\ <br>


# Writing a smart contract in C# (C-Sharp)

### Sample contract functionality

The sample contract serves as a demonstration of general QVM logic.

It is capable of:

* registering users into the database
* storing the last registered user's name in the database
* echoing the previous user's name to STDOUT
* incrementing the total registered user count
* storing above counter in the database

### Sample code

```csharp
using System;

public class Contract
{
    private static String getEnv(String key, String deft) {
        String? val = Environment.GetEnvironmentVariable(key);
        if (val == null || val.Length == 0) {
            return deft;
        }
        return val;
    }

    private static int atoi(String val) {
        try
        {
            return Int32.Parse(val);
        }
        catch (FormatException)
        {
            return 0;
        }
    }

    public static int Main(String[] args)
    {
        // THIS SAMPLE ONLY SUPPORTS THE "register" FUNCTION
        if (args.Length == 2 && args[0] == "register") {
           // GET THE CURRENT USER'S NAME OR DEFAULT TO "unknown" IF THIS IS THE FIRST CALL
           String? previousName = getEnv("DB_USER_CURRENT", "unknown");
           // GET THE TOTAL USER COUNT
           int totalUserCount = atoi(getEnv("DB_TOTALUSERS", "0"));
           // WRITE PREVIOUS USER NAME TO STDOUT
           Console.Out.WriteLine($"OUT=prevname: {previousName}");
           // UPDATE CURRENT USER NAME BY WRITING IT TO DB
           Console.Out.WriteLine($"DBW=USER_CURRENT={args[1]}");
           // STORE USER NAME UNDER A STORAGE SLOT FOR PERSISTENCE (CURRENT GETS OVERWRITTEN ON EACH CALL)
           Console.Out.WriteLine($"DBW=USER_{totalUserCount}={args[1]}");
           // INCREMENT THE TOTAL USER COUNT
           Console.Out.WriteLine($"DBW=TOTALUSERS={totalUserCount+1}");
           return 0;
        }
        if (args.Length >= 1) {
            Console.Error.WriteLine("Wrong CMD: " + args[0]);
            return 1;
        }
        Console.Error.WriteLine("Wrong args!");
        return 1;
    }
}
```

### Save the contract

Open a text editor and save above sample contract as `main.cs` file.

{% content-ref url="/pages/edl6E4F07PheZ6B8noyf" %}
[Compiling a smart contract in C# (C-Sharp)](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c-c-sharp-smart-contract/compiling-a-smart-contract-in-c-c-sharp)
{% endcontent-ref %}


# Compiling a smart contract in C# (C-Sharp)

### Compiling C# smart contract to static binary with the QVM compiler

We already supply a simple compiler container which will perform the most optimized build of turning above sample contract to a static binary which can be run by QVM.

Since you saved the previous sample contract as `main.cs` in your current directory, you can run the compiler like this:

```bash
docker run --rm -v $(pwd):/ws qanplatform/qvm-compiler-csharp
```

Afterwards you will end up with a statically linked linux ELF binary called “contract” in your current directory.

```shell
# checking output size of QVM compiler
ls -alh contract
-rwxr-xr-x  1 user  group    1.0M Jul 9 23:24 contract
```


# C++ smart contract

Write smart contracts in C++ powered by QANplatform

<figure><img src="/files/mVxZ2sOFPBQJ1D6HuMQC" alt=""><figcaption></figcaption></figure>

### The new era of smart contracts by QANplatform has arrived.

The QAN Virtual Machine (QVM) allows developers to write smart contracts in any programming language. This is a breakthrough for the whole blockchain ecosystem since most blockchain platforms are only compatible with the Ethereum smart contract language, Solidity.&#x20;

Launching in 2023, QANplatform will be the first quantum-resistant Layer 1 hybrid blockchain platform where developers can write smart contracts in any programming language. Before the official private and public blockchain launch, QAN is publishing some puzzle pieces of its upcoming technology, such as the QVM, where developers can test the multi-language smart contract feature on the Ethereum Sepolia Testnet as a Layer 2 smart contract execution engine.&#x20;

Following the [Go (Golang) smart contract](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/supported-languages/go-golang), [JavaScript (JS) smart contract](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/javascript-js-smart-contract), [C smart contract](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c-smart-contract), and [TypeScript (TS) smart contract](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/typescript-ts-smart-contract) sample release, QANplatform is releasing the documentation and the first smart contract sample for C++ programming language.

### C++ programming language

Developed by Bjarne Stroustrup in the early 1980s, C++ is a high-level programming language that is an extension of the [C programming language](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c). C++ provides object-oriented features such as classes, inheritance, polymorphism, and encapsulation, which make it a powerful language for developing complex software systems. It is also a compiled language, meaning that the source code is translated into machine code that can be executed directly by a computer.

According to [GitHub](https://octoverse.github.com/2022/top-programming-languages) and [Stackoverflow](https://survey.stackoverflow.co/2022/#technology-most-popular-technologies) statistics, C++ it the 6th most popular programming language. According to Statista there are 11 Million developers who can code in C/C++.&#x20;

C++ is widely used in the development of software applications, operating systems, device drivers, embedded systems, and video games. According to [GitHub](https://octoverse.github.com/2022/top-programming-languages) and [Stackoverflow](https://survey.stackoverflow.co/2022/#technology-most-popular-technologies) statistics, C++ it the 6th most popular programming language. According to [Statista](https://www.statista.com/statistics/1241923/worldwide-software-developer-programming-language-communities/) there are 11 Million developers who can code in C/C++.

Its flexibility and efficiency make it a popular choice for software developers and companies  — like Apple, Facebook, Google, etc. — who need a high-performance programming language that can handle complex tasks. C++ is also a popular language for competitive programming and algorithm development due to its speed and low-level control over system resources.

### Write smart contracts in C++

However there are some C++ samples, libraries, SDKs, and APIs where developers can interact with a blockchain (e.g. query the blockchain, send transactions, interact with a node), there are only few blockchains where developers can code smart contracts in C++. QANplatform allows developers to build: smart contract, DApp, DeFi, DAO, token, CBDC, NFT, Metaverse, and Web3 solutions in C++.

### Benefits of C++ smart contracts

Suppose you are a single developer looking to play around with blockchain. In that case, you can finally do that since you are not forced to learn a new programming language in your free time, like Solidity - which you could only use for specific purposes. Instead, you can use your current C++ knowledge that you may possibly already mastered for several years or even a decade.&#x20;

If you are a CEO, CTO, CINO, CBDO looking to innovate with blockchain technology you can benefit from QANplatform’s [multi-language smart contract](https://learn.qanplatform.com/technology/technology-features/multi-language-smart-contracts-or-hyperpolyglot) feature as well. No need to hire or train Solidity programmers, since you can already use your inhouse development team or your current IT partner. It makes talent acquisitions, development, and codebase maintenance easier and cost-efficient for enterprises.<br>

### It’s time to write your first smart contract in C++

Blockchain platforms only reward validators (miners, stakers) and node providers in their own utility tokens; however, smart contract developers are the ones who are building use cases and products on the blockchain to reach mass adoption. Imagine that GitHub would reward developers when their code is getting re-used by others. [QANplatform will reward developers](https://learn.qanplatform.com/technology/technology-features/developer-royalty-fees) on the QAN MainNet; therefore, you can already prepare some code libraries while playing around with QAN Virtual Machine and C++ smart contracts.<br>

{% content-ref url="/pages/Y6kVQPBHLhDL7ZXllULC" %}
[Writing a smart contract in C++](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c++-smart-contract/writing-a-smart-contract-in-c++)
{% endcontent-ref %}

{% content-ref url="/pages/MME4ivUqmbjy73RmSvXj" %}
[Compiling a smart contract in C++](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c++-smart-contract/compiling-a-smart-contract-in-c++)
{% endcontent-ref %}

\
\
\
\
\ <br>

\ <br>

\ <br>


# Writing a smart contract in C++

### Sample contract functionality

The sample contract serves as a demonstration of general QVM logic.

It is capable of:

* registering users into the database
* storing the last registered user's name in the database
* echoing the previous user's name to STDOUT
* incrementing the total registered user count
* storing above counter in the database

### Sample code

```cpp
#include <iostream>
#include <cstdlib>
#include <cstring>

using namespace std;

// Copied from C version
static int envAtoi(const char* env) {
    const char* val = getenv(env);
    if (val == NULL) {
        return 0;
    }
    return atoi(val);
}

int main(int argc, char *argv[]) {

    // THIS SAMPLE ONLY SUPPORTS THE "register" FUNCTION
    if (argc == 3 && strcmp(argv[1], "register") == 0) {

        // GET THE CURRENT USER'S NAME
        const char *previousName = getenv("DB_USER_CURRENT");

        // OR DEFAULT TO "unknown" IF THIS IS THE FIRST CALL
        if (previousName == NULL || strlen(previousName) == 0) {
            previousName = "unknown";
        }

        // GET THE TOTAL USER COUNT
        int totalUserCount = envAtoi("DB_TOTALUSERS");

        // WRITE PREVIOUS USER NAME TO STDOUT
        cout << "OUT=prevname: " << previousName << endl;

        // UPDATE CURRENT USER NAME BY WRITING IT TO DB
        cout << "DBW=USER_CURRENT=" << argv[2] << endl;

        // STORE USER NAME UNDER A STORAGE SLOT FOR PERSISTENCE (CURRENT GETS OVERWRITTEN ON EACH CALL)
        cout << "DBW=USER_" << totalUserCount << "=" << argv[2] << endl;

        // INCREMENT THE TOTAL USER COUNT
        cout << "DBW=TOTALUSERS=" << totalUserCount+1 << endl;
        return 0;
    }
    if (argc >= 2) {
        cerr << "Wrong CMD: " << argv[1] << endl;
        exit(1);
    }
    cerr << "Wrong args!" << endl;
    exit(1);
}
```

### Save the contract

Open a text editor and save above sample contract as `main.cpp` file.

{% content-ref url="/pages/MME4ivUqmbjy73RmSvXj" %}
[Compiling a smart contract in C++](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c++-smart-contract/compiling-a-smart-contract-in-c++)
{% endcontent-ref %}


# Compiling a smart contract in C++

When compiling a C++ smart contract one wants to reduce the resulting binary size to the bare minimum possible to save on deployment fees, since that metric is tied only to the size of the deployed binary.

As a good rule of thumb is to always strip all removable metadata (e.g.: DWARF, symbol table and debug info).

### Compiling C++ smart contract to static binary with the QVM compiler

We already supply a simple compiler container which will perform the most optimized build of turning above sample contract to a static binary which can be run by QVM.

Since you saved the previous sample contract as `main.cpp` in your current directory, you can run the compiler like this:

```bash
docker run --rm -v $(pwd):/ws qanplatform/qvm-compiler-cxx
```

Afterwards you will end up with a statically linked linux ELF binary called “contract” in your current directory.

```shell
# checking output size of QVM compiler
ls -alh contract
-rwxr-xr-x  1 user  group    184K Apr 18 17:34 contract
```


# C smart contract

Write smart contracts in C - powered by QANplatform

<figure><img src="/files/EkJ9fnENNUFlfrc0l4jr" alt=""><figcaption></figcaption></figure>

### The new era of smart contracts by QANplatform has arrived.

The QAN Virtual Machine (QVM) allows developers to write smart contracts in any programming language. This is a breakthrough for the whole blockchain ecosystem since most blockchain platforms are only compatible with the Ethereum smart contract language, Solidity.&#x20;

Launching in 2023, QANplatform will be the first quantum-resistant Layer 1 hybrid blockchain platform where developers can write smart contracts in any programming language. Before the official private and public blockchain launch, QAN is publishing some puzzle pieces of its upcoming technology, such as the QVM, where developers can test the multi-language smart contract feature on the Ethereum Sepolia Testnet as a Layer 2 smart contract execution engine.&#x20;

Following the [Go (Golang) smart contract](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/supported-languages/go-golang), [JavaScript (JS) smart contract](https://medium.com/qanplatform/write-smart-contracts-in-javascript-powered-by-qanplatform-5ae9bac34e6) sample release, the QANplatform is releasing the documentation and the first smart contract sample for C programming language.&#x20;

### C programming language

C is a general-purpose programming language created in the early 1970s by Dennis Ritchie. C is widely used for developing operating systems, system software, device drivers, embedded software, and applications.

According to [GitHub](https://octoverse.github.com/2022/top-programming-languages) statistics, C has been one of the most popular programming languages in the past decades, and it is still in the Top 10 of the most used coding languages. According to [Statista](https://www.statista.com/statistics/793628/worldwide-developer-survey-most-used-languages/) 19% of the developers can code in C.&#x20;

### Write smart contracts in C

However there are some C samples, libraries, SDKs, and APIs where developers can interact with a blockchain (e.g. query the blockchain, send transactions, interact with a node), there are only few blockchains where developers can code smart contracts in C. QANplatform allows developers to build: smart contract, DApp, DeFi, DAO, token, CBDC, NFT, Metaverse, and Web3 solutions in C.

### Benefits of C smart contracts

Suppose you are a single developer looking to play around with blockchain. In that case, you can finally do that since you are not forced to learn a new programming language in your free time, like Solidity - which you could only use for specific purposes. Instead, you can use your current C knowledge that you may possibly already mastered for several years or even a decade.&#x20;

If you are a CEO, CTO, CINO, CBDO looking to innovate with blockchain technology you can benefit from QANplatform’s [multi-language smart contract](https://learn.qanplatform.com/technology/technology-features/multi-language-smart-contracts-or-hyperpolyglot) feature as well. No need to hire or train Solidity programmers, since you can already use your inhouse development team or your current IT partner. It makes talent acquisitions, development, and codebase maintenance easier and cost-efficient for enterprises.<br>

### It’s time to write your first smart contract in C

Blockchain platforms only reward validators (miners, stakers) and node providers in their own utility tokens; however, smart contract developers are the ones who are building use cases and products on the blockchain to reach mass adoption. Imagine that GitHub would reward developers when their code is getting re-used by others. [QANplatform will reward developers](https://learn.qanplatform.com/technology/technology-features/developer-royalty-fees) on the QAN MainNet; therefore, you can already prepare some code libraries while playing around with QAN Virtual Machine and C smart contracts.<br>

{% content-ref url="/pages/Dsv3jbtB0QFjyzmdNagH" %}
[Writing a smart contract in C](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c-smart-contract/writing-a-smart-contract-in-c)
{% endcontent-ref %}

{% content-ref url="/pages/xEoMy4lWETVE18Tvm1WY" %}
[Compiling a smart contract in C](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c-smart-contract/compiling-a-smart-contract-in-c)
{% endcontent-ref %}

\
\
\
\
\ <br>

\ <br>

\ <br>


# Writing a smart contract in C

### Sample contract functionality

The sample contract serves as a demonstration of general QVM logic.

It is capable of:

* registering users into the database
* storing the last registered user's name in the database
* echoing the previous user's name to STDOUT
* incrementing the total registered user count
* storing above counter in the database

### Sample code

```c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

static int envAtoi(const char* env) {
  const char* val = getenv(env);
  if (val == NULL) {
    return 0;
  }
  return atoi(val);
}

int main(int argc, char *argv[]) {

  // THIS SAMPLE ONLY SUPPORTS THE "register" FUNCTION
  if (argc == 3 && strcmp(argv[1], "register") == 0) {

    // GET THE CURRENT USER'S NAME
    const char *previousName = getenv("DB_USER_CURRENT");

    // OR DEFAULT TO "unknown" IF THIS IS THE FIRST CALL
    if (previousName == NULL || strlen(previousName) == 0) {
      previousName = "unknown";
    }

    // GET THE TOTAL USER COUNT
    int totalUserCount = envAtoi("DB_TOTALUSERS");

    // WRITE PREVIOUS USER NAME TO STDOUT
    printf("OUT=prevname: %s\n", previousName);

    // UPDATE CURRENT USER NAME BY WRITING IT TO DB
    printf("DBW=USER_CURRENT=%s\n", argv[2]);

    // STORE USER NAME UNDER A STORAGE SLOT FOR PERSISTENCE (CURRENT GETS OVERWRITTEN ON EACH CALL)
    printf("DBW=USER_%d=%s\n", totalUserCount, argv[2]);

    // INCREMENT THE TOTAL USER COUNT
    printf("DBW=TOTALUSERS=%d\n", totalUserCount+1);
    return 0;
  }
  if (argc >= 2) {
    fprintf(stderr, "Wrong CMD: %s\n", argv[1]);
    exit(1);
  }
  fprintf(stderr, "Wrong args!\n");
  exit(1);
}
```

### Save the contract

Open a text editor and save above sample contract as `main.c` file.

{% content-ref url="/pages/xEoMy4lWETVE18Tvm1WY" %}
[Compiling a smart contract in C](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c-smart-contract/compiling-a-smart-contract-in-c)
{% endcontent-ref %}


# Compiling a smart contract in C

While binaries compiled from C already have a small footprint, one still wants to reduce the resulting binary size to the bare minimum possible to save on deployment fees, since that metric is tied only to the size of the deployed binary.

As a good rule of thumb is to always strip all removable metadata (e.g.: DWARF, symbol table and debug info).

### Compiling C smart contract to static binary with the QVM compiler

We already supply a simple compiler container which will perform the most optimized build of turning above sample contract to a static binary which can be run by QVM.

Since you saved the previous sample contract as `main.c` in your current directory, you can run the compiler like this:

`docker run --rm -v $(pwd):/ws qanplatform/qvm-compiler-c`

Afterwards you will end up with a statically linked linux ELF binary called “contract” in your current directory.

```shell
# checking output size of QVM compiler
ls -alh contract
-rwxr-xr-x  1 user  group    12K Mar 24 15:24 contract
```


# Golang (Go) smart contract

Write smart contracts in Golang (Go) - powered by QANplatform

<figure><img src="/files/re7eXeHfah10BB9nDvcJ" alt=""><figcaption></figcaption></figure>

### The new era of smart contracts by QANplatform has arrived.

The QAN Virtual Machine (QVM) allows developers to write smart contracts in any programming language. This is a breakthrough for the whole blockchain ecosystem since most blockchain platforms are only compatible with the Ethereum smart contract language, Solidity.

Launching in 2023, QANplatform will be the first quantum-resistant Layer 1 hybrid blockchain platform where developers can write smart contracts in any programming language. Before the official private and public blockchain launch, QAN is publishing some puzzle pieces of its upcoming technology, such as the QVM, where developers can test the multi-language smart contract feature on the Ethereum Sepolia Testnet as a Layer 2 smart contract execution engine.

Golang (Go) is the first language to be officially supported by QVM. The reason is simple: The whole QANplatform infrastructure is written in Go, including QVM itself. It was only natural to make Go the first language to be supported as we know & love it really much!

### Golang (Go), one of the fastest emerging programming language

Three engineers from Google, namely [Robert Griesemer](https://twitter.com/robertgriesemer), [Rob Pike](https://twitter.com/rob_pike), and [Ken Thompson](https://en.wikipedia.org/wiki/Ken_Thompson), laid the foundations for the Go programming language in 2007. Google and the Go developer team wanted to create a language that was easier to use but still had the beneficial characteristics found in other languages such as C++, Python, and JavaScript.

\
The open-source Go programming language is popular at companies such as Google, Dropbox, American Express, Microsoft, Twitter, Salesforce, etc., and among the developer community. As reported by [JetBrains](https://medium.com/qanplatform/write-smart-contracts-in-javascript-powered-by-qanplatform-5ae9bac34e6), there are around 2.7 million developers worldwide who can code in Go as of 2022. According to [GitHub](https://octoverse.github.com/2022/top-programming-languages), Go is among the fastest-growing languages (28.3% increase only in one year). According to StackOverflow, like last year, over 10,000 Javascript developers want to start or continue developing in Go. Therefore it isn’t a surprise that Go is among the top 10 most loved and in the top 5 most wanted programming languages based on the report of [Stackoverflow](https://survey.stackoverflow.co/2022/#most-loved-dreaded-and-wanted-language-want).

### Write smart contract in Golang (Go)

However there are some Go samples, libraries, SDKs, and APIs where developers can interact with a blockchain (e.g. query the blockchain, send transactions, interact with a node), there are only few blockchains where developers can code smart contracts in JavaScript. QANplatform allows developers to build: smart contract, DApp, DeFi, DAO, token, CBDC, NFT, Metaverse, and Web3 solutions in Golang.

### &#x20;Benefits of Golang smart contracts

Suppose you are a single developer looking to play around with blockchain. In that case, you can finally do that since you are not forced to learn a new programming language in your free time, like Solidity — which you could only use for specific purposes. Instead, you can use your current Golang knowledge that you may possibly already mastered for several years or even a decade.

If you are a CEO, CTO, CINO, CBDO looking to innovate with blockchain technology you can benefit from QANplatform’s [multi-language smart contract](https://learn.qanplatform.com/technology/technology-features/multi-language-smart-contracts-or-hyperpolyglot) feature as well. No need to hire or train Solidity programmers, since you can already use your inhouse development team or your current IT partner. It makes talent acquisitions, development, and codebase maintenance easier and cost-efficient for enterprises.

### It’s time to write your first smart contract in Golang

Blockchain platforms only reward validators (miners, stakers) and node providers in their own utility tokens; however, smart contract developers are the ones who are building use cases and products on the blockchain to reach mass adoption. Imagine that GitHub would reward developers when their code is getting re-used by others. [QANplatform will reward developers](https://learn.qanplatform.com/technology/technology-features/developer-royalty-fees) on the QAN MainNet; therefore, you can already prepare some code libraries while playing around with QAN Virtual Machine and Golang smart contracts.<br>


# Writing a smart contract in Golang (Go)

This example will show how to write a smart contract in Golang.

## Sample contract functionality <a href="#sample-contract-functionality" id="sample-contract-functionality"></a>

The sample contract serves as a demonstration of general QVM logic.

It is capable of:

* registering users into the database
* storing the last registered user's name in the database
* echoing the previous user's name to STDOUT
* incrementing the total registered user count
* storing above counter in the database

## Sample code <a href="#sample-code" id="sample-code"></a>

```go
package main

import (
    "fmt"
    "os"
    "strconv"
)

func main() {

    // THIS SAMPLE ONLY SUPPORTS THE "register" FUNCTION
    if len(os.Args) == 3 && os.Args[1] == "register" {

        // GET THE CURRENT USER'S NAME
        previousName := os.Getenv("DB_USER_CURRENT")

        // OR DEFAULT TO "unknown" IF THIS IS THE FIRST CALL
        if len(previousName) == 0 {
            previousName = "unknown"
        }

        // GET THE TOTAL USER COUNT
        totalUserCount, _ := strconv.Atoi(os.Getenv("DB_TOTALUSERS"))

        // WRITE PREVIOUS USER NAME TO STDOUT
        os.Stdout.WriteString(fmt.Sprintf("OUT=prevname: %s\n", previousName))

        // UPDATE CURRENT USER NAME BY WRITING IT TO DB
        os.Stdout.WriteString(fmt.Sprintf("DBW=USER_CURRENT=%s\n", os.Args[2]))

        // STORE USER NAME UNDER A STORAGE SLOT FOR PERSISTENCE (CURRENT GETS OVERWRITTEN ON EACH CALL)
        os.Stdout.WriteString(fmt.Sprintf("DBW=USER_%d=%s\n", totalUserCount, os.Args[2]))

        // INCREMENT THE TOTAL USER COUNT
        os.Stdout.WriteString(fmt.Sprintf("DBW=TOTALUSERS=%d\n", totalUserCount+1))
        os.Exit(0)
    }
    if len(os.Args) >= 2 {
        os.Stderr.WriteString(fmt.Sprintf("Wrong CMD:%s\n", os.Args[1]))
        os.Exit(1)
    }
    os.Stderr.WriteString("Wrong args!\n")
    os.Exit(1)
}
```

## Save the contract <a href="#save-the-contract" id="save-the-contract"></a>

Open a text editor and save above sample contract as `main.go` file.


# Compiling a smart contract in Golang (Go)

When compiling a Go contract one wants to reduce the resulting binary size to the bare minimum possible to save on deployment fees, since that metric is tied only to the size of the deployed binary.

As a good rule of thumb is to always strip DWARF, symbol table and debug info. To achieve that build with the following flags like the below example:

```
go build -ldflags '-s -w'
```

We will provide an optimized compiler for Go which will shrink the binary size (and as a result the deployment fees!) by an order of magnitude. The sample provided compiles to a \~200k sized binary instead of \~1.3M one with information stripped as recommended above or \~1.8M without removing those!

## Compiling with the QVM compiler <a href="#compiling-with-the-qvm-compiler" id="compiling-with-the-qvm-compiler"></a>

We already supply a simple compiler container which adds the suggested flags described above to the build command. Since you saved the previous sample contract as `main.go` in your current directory, you can run the compiler like this:

```
docker run --rm -v $(pwd):/ws qanplatform/qvm-compiler-go
```

Afterwards you will end up with a statically linked linux ELF binary called `"contract"` in your current directory.


# Rust smart contract

Write smart contracts in Rust powered by QANplatform

<figure><img src="/files/HY7yKT9Rrhd8jJAJpBAn" alt=""><figcaption></figcaption></figure>

### The new era of smart contracts by QANplatform has arrived.

The QAN Virtual Machine (QVM) allows developers to write smart contracts in any programming language. This is a breakthrough for the whole blockchain ecosystem since most blockchain platforms are only compatible with the Ethereum smart contract language, Solidity.&#x20;

Launching in 2023, QANplatform will be the first quantum-resistant Layer 1 hybrid blockchain platform where developers can write smart contracts in any programming language. Before the official private and public blockchain launch, QAN is publishing some puzzle pieces of its upcoming technology, such as the QVM, where developers can test the multi-language smart contract feature on the Ethereum Sepolia Testnet as a Layer 2 smart contract execution engine.&#x20;

Following the [Go (Golang) smart contract](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/supported-languages/go-golang), [JavaScript (JS) smart contract](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/javascript-js-smart-contract), [C smart contract](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c-smart-contract), and [TypeScript (TS) smart contract](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/typescript-ts-smart-contract), and [C++ smart contract](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c++) sample release, QANplatform is releasing the documentation and the first smart contract sample for Rust programming language.

### Rust programming language

Rust is a system-level programming language designed to be fast, safe, and concurrent. Developed by Mozilla and publicly released in 2015, Rust combines the performance and low-level control of C and C++ with the memory safety and thread safety guarantees of modern programming languages. Hundreds of companies around the world  are using Rust in production today for fast, low-resource, cross-platform solutions,  including Firefox, Dropbox, and Cloudflare .

Rust is in its seventh year as the most loved language with 87% of developers saying they want to continue using it. Rust also ties with Python as the most wanted technology with TypeScript running a close second as per [Stackoverflow](https://survey.stackoverflow.co/2022/#technology-most-loved-dreaded-and-wanted)statistics.&#x20;

According to [GitHub](https://octoverse.github.com/2022/top-programming-languages) statistics, Rust was the second fastest-growing language with a more than 50% increase in its community, driven in part by its security and reliability. According to State of the [Developer Nation 22nd Edition](https://slashdata-website-cms.s3.amazonaws.com/sample_reports/VZtJWxZw5Q9NDSAQ.pdf) by SlashData, the number of Rust developers, a.k.a. rustaceans, reached 2.2 million developers.

### Write smart contracts in Rust

However there are some Rust samples, libraries, SDKs, and APIs where developers can interact with a blockchain (e.g. query the blockchain, send transactions, interact with a node), there are only few blockchains where developers can code smart contracts in C++. QANplatform allows developers to build: smart contract, DApp, DeFi, DAO, token, CBDC, NFT, Metaverse, and Web3 solutions in Rust.

### Benefits of Rust smart contracts

Suppose you are a single developer looking to play around with blockchain. In that case, you can finally do that since you are not forced to learn a new programming language in your free time, like Solidity - which you could only use for specific purposes. Instead, you can use your current Rust knowledge that you may possibly already mastered for several years or even a decade.&#x20;

If you are a CEO, CTO, CINO, CBDO looking to innovate with blockchain technology you can benefit from QANplatform’s [multi-language smart contract](https://learn.qanplatform.com/technology/technology-features/multi-language-smart-contracts-or-hyperpolyglot) feature as well. No need to hire or train Solidity programmers, since you can already use your inhouse development team or your current IT partner. It makes talent acquisitions, development, and codebase maintenance easier and cost-efficient for enterprises.<br>

### It’s time to write your first smart contract in Rust

Blockchain platforms only reward validators (miners, stakers) and node providers in their own utility tokens; however, smart contract developers are the ones who are building use cases and products on the blockchain to reach mass adoption. Imagine that GitHub would reward developers when their code is getting re-used by others. [QANplatform will reward developers](https://learn.qanplatform.com/technology/technology-features/developer-royalty-fees) on the QAN MainNet; therefore, you can already prepare some code libraries while playing around with QAN Virtual Machine and Rust smart contracts.<br>

{% content-ref url="/pages/7KVubiFggUBUV3BzHQAt" %}
[Writing a smart contract in Rust](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/rust-smart-contract/writing-a-smart-contract-in-rust)
{% endcontent-ref %}

{% content-ref url="/pages/OxVPW9omyYNTCfkgHCj4" %}
[Compiling a smart contract in Rust](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/rust-smart-contract/compiling-a-smart-contract-in-rust)
{% endcontent-ref %}

\ <br>


# Writing a smart contract in Rust

### Sample contract functionality

The sample contract serves as a demonstration of general QVM logic.

It is capable of:

* registering users into the database
* storing the last registered user's name in the database
* echoing the previous user's name to STDOUT
* incrementing the total registered user count
* storing above counter in the database

### Sample smart contract code

```rust
use std::env;

fn get_env(key: String, default: String) -> String {
    env::var(key).unwrap_or(default)
}

fn atoi(val: String) -> i32 {
    val.parse().unwrap_or(0)
}

fn main() {
    let args: Vec<String> = env::args().collect();
    // THIS SAMPLE ONLY SUPPORTS THE "register" FUNCTION
    if args.len() == 3 && args[1] == "register" {
        // GET THE CURRENT USER'S NAME OR DEFAULT TO "unknown" IF THIS IS THE FIRST CALL
        let previous_name = get_env("DB_USER_CURRENT".to_string(),"unknown".to_string());

        // GET THE TOTAL USER COUNT
        let total_user_count= atoi(get_env("DB_TOTALUSERS".to_string(),"0".to_string()));

        // WRITE PREVIOUS USER NAME TO STDOUT
        println!("OUT=prevname: {}", previous_name);

        // UPDATE CURRENT USER NAME BY WRITING IT TO DB
        println!("DBW=USER_CURRENT={}", args[2]);

        // STORE USER NAME UNDER A STORAGE SLOT FOR PERSISTENCE (CURRENT GETS OVERWRITTEN ON EACH CALL)
        println!("DBW=USER_{}={}", total_user_count, args[2]);

        // INCREMENT THE TOTAL USER COUNT
        println!("DBW=TOTALUSERS={}", total_user_count+1);

        std::process::exit(0);
    }

    if args.len() >= 2 {
        eprintln!("Wrong CMD: {}", args[1]);
        std::process::exit(1);
    }
    eprintln!("Wrong args!");
    std::process::exit(1);
}
```

### Save the smart contract

Open a text editor and save above sample contract as `main.rs` file.

{% content-ref url="/pages/OxVPW9omyYNTCfkgHCj4" %}
[Compiling a smart contract in Rust](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/rust-smart-contract/compiling-a-smart-contract-in-rust)
{% endcontent-ref %}


# Compiling a smart contract in Rust

When compiling a Rust contract one wants to reduce the resulting binary size to the bare minimum possible to save on deployment fees, since that metric is tied only to the size of the deployed binary. As a good rule of thumb is to always strip all removable metadata (e.g.: DWARF, symbol table and debug info).

The QVM compiler enables presets which help to achieve an extremely small static binary as a result.

### Compiling Rust smart contract to static binary with the QVM compiler

We already supply a simple compiler container which will perform the most optimized build of turning above sample contract to a static binary which can be run by QVM.

Since you saved the previous sample contract as `main.rs` in your current directory, you can run the compiler like this:

```bash
docker run --rm -v $(pwd):/ws qanplatform/qvm-compiler-rust
```

Afterwards you will end up with a statically linked linux ELF binary called “contract” in your current directory.

```bash
# checking output size of QVM compiler
ls -alh contract
-rwxr-xr-x  1 user  group    30K May 4 17:34 contract
```


# Kotlin smart contract

Write smart contracts in Kotlin powered by QANplatform

<figure><img src="/files/gkwcqorvW5HBQQv31pFH" alt=""><figcaption></figcaption></figure>

### The new era of smart contracts by QANplatform has arrived.

The QAN Virtual Machine (QVM) allows developers to write smart contracts in any programming language. This is a breakthrough for the whole blockchain ecosystem since most blockchain platforms are only compatible with the Ethereum smart contract language, Solidity.&#x20;

Launching in 2023, QANplatform will be the first quantum-resistant Layer 1 hybrid blockchain platform where developers can write smart contracts in any programming language. Before the official private and public blockchain launch, QAN is publishing some puzzle pieces of its upcoming technology, such as the QVM, where developers can test the multi-language smart contract feature on the Ethereum Sepolia Testnet as a Layer 2 smart contract execution engine.&#x20;

Following the [Go (Golang)](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/supported-languages/go-golang), [JavaScript (JS)](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/javascript-js), [C](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c), [TypeScript (TS)](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/typescript-ts), [C++](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/c++), and [Rust](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/rust) smart contract sample releases, QANplatform is releasing the documentation and the first smart contract sample for Kotlin programming language.

### Kotlin programming language

Designed and developed by JetBrains 11 years ago; Kotlin is an open-source, statically-typed programming language that embraces a blend of object-oriented and functional programming paradigms. It incorporates familiar syntax and concepts from various languages such as C#, Java, Scala, and more. Rather than striving for uniqueness, Kotlin takes inspiration from decades of language development to provide a well-rounded and familiar programming experience.

Since being officially supported by Google for Android development in 2017, Kotlin has gained substantial traction in the Android development community. Many developers have migrated their Android projects from Java to Kotlin, and new Android projects are often started with Kotlin as the preferred language.

According to [Stack Overflow statistics](https://survey.stackoverflow.co/2022/#technology-most-popular-technologies), Kotlin’s popularity is reflected in its rankings among programming languages. It has secured a place in the top 15 most used programming languages, positioned just after Go (Golang) and Rust. Additionally, Kotlin ranks as the 6th most wanted programming language, indicating strong demand and interest from developers. Similar trends can be observed in [GitHub statistics](https://octoverse.github.com/2022/top-programming-languages), where Kotlin gained a more than 20% increase in its community.&#x20;

Kotlin is used besides Google at well-known brands like Coursera, Shopify, Evernote, Netflix, or 9GAG.&#x20;

### Write smart contracts in Kotlin

However there are some Kotlin samples, libraries, SDKs, and APIs where developers can interact with a blockchain (e.g. query the blockchain, send transactions, interact with a node), there are only few blockchains where developers can code smart contracts in Kotlin. QANplatform allows developers to build: smart contract, DApp, DeFi, DAO, token, CBDC, NFT, Metaverse, and Web3 solutions in Kotlin.

### Benefits of Kotlin smart contracts

Suppose you are a single developer looking to play around with blockchain. In that case, you can finally do that since you are not forced to learn a new programming language in your free time, like Solidity — which you could only use for specific purposes. Instead, you can use your current Kotlin knowledge that you may possibly already mastered for several years or even a decade.

If you are a CEO, CTO, CINO, CBDO looking to innovate with blockchain technology you can benefit from QANplatform’s multi-language smart contract feature as well. No need to hire or train Solidity programmers, since you can already use your inhouse development team or your current IT partner. It makes talent acquisitions, development, and codebase maintenance easier and cost-efficient for enterprises.<br>

### It’s time to write your first smart contract in Kotlin

Blockchain platforms only reward validators (miners, stakers) and node providers in their own utility tokens; however, smart contract developers are the ones who are building use cases and products on the blockchain to reach mass adoption. Imagine that GitHub would reward developers when their code is getting re-used by others. [QANplatform will reward developers](https://learn.qanplatform.com/technology/technology-features/developer-royalty-fees) on the QAN MainNet; therefore, you can already prepare some code libraries while playing around with QAN Virtual Machine and Kotlin smart contracts.<br>

{% content-ref url="/pages/efYhgQsstvzPL2DMCYUP" %}
[Writing a smart contract in Kotlin](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/kotlin-smart-contract/writing-a-smart-contract-in-kotlin)
{% endcontent-ref %}

{% content-ref url="/pages/eSNTC90oIHRdDDLWbWqx" %}
[Compiling a smart contract in Kotlin](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/kotlin-smart-contract/compiling-a-smart-contract-in-kotlin)
{% endcontent-ref %}

\ <br>


# Writing a smart contract in Kotlin

### Sample contract functionality

The sample contract serves as a demonstration of general QVM logic.

It is capable of:

* registering users into the database
* storing the last registered user's name in the database
* echoing the previous user's name to STDOUT
* incrementing the total registered user count
* storing above counter in the database

### Sample smart contract code

```kotlin
// nodejs process object
external val process: dynamic

fun atoi(v: String?): Int {
    return try {
        v?.toInt() ?: 0
    } catch (e: NumberFormatException) {
        0
    }
}

fun errorln(message: Any?) {
    process.stderr.write(message)
    process.stderr.write("\n")
}

fun main() {
    val args = process.argv.slice(2) as Array<String>
    
    // THIS SAMPLE ONLY SUPPORTS THE "register" FUNCTION
    if (args.size == 2 && args[0] == "register") {
        
        // GET THE CURRENT USER'S NAME
        // OR DEFAULT TO "unknown" IF THIS IS THE FIRST CALL
        val previousName = process.env.DB_USER_CURRENT ?: "unknown"
        
        // GET THE TOTAL USER COUNT
        val totalUserCount = atoi(process.env.DB_TOTALUSERS as? String)
        
        // WRITE PREVIOUS USER NAME TO STDOUT
        println("OUT=prevname: $previousName")
        
        // UPDATE CURRENT USER NAME BY WRITING IT TO DB
        println("DBW=USER_CURRENT=${args[1]}")
        
        // STORE USER NAME UNDER A STORAGE SLOT FOR PERSISTENCE (CURRENT GETS OVERWRITTEN ON EACH CALL)
        println("DBW=USER_${totalUserCount}=${args[1]}")
        
        // INCREMENT THE TOTAL USER COUNT
        println("DBW=TOTALUSERS=${totalUserCount+1}")
        process.exit(0)
    }
    
    if (args.size >= 2) {
        errorln("Wrong CMD: ${args[0]}")
        process.exit(1)
    }
    
    errorln("Wrong args!")
    process.exit(1)
}


```

### Save the smart contract

Open a text editor and save above sample contract as `main.kt` file.

{% content-ref url="/pages/eSNTC90oIHRdDDLWbWqx" %}
[Compiling a smart contract in Kotlin](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/kotlin-smart-contract/compiling-a-smart-contract-in-kotlin)
{% endcontent-ref %}


# Compiling a smart contract in Kotlin

When compiling a Kotlin contract one wants to reduce the resulting binary size to the bare minimum possible to save on deployment fees, since that metric is tied only to the size of the deployed binary. As a good rule of thumb is to always strip all removable metadata (e.g.: DWARF, symbol table and debug info).

The QVM compiler enables presets which help to achieve an extremely small static binary as a result.

### Compiling Kotlin smart contract to static binary with the QVM compiler

We already supply a simple compiler container which will perform the most optimized build of turning above sample contract to a static binary which can be run by QVM.

Since you saved the previous sample contract as `main.kt` in your current directory, you can run the compiler like this:

```bash
docker run --rm -v $(pwd):/ws qanplatform/qvm-compiler-kotlin
```

Afterwards you will end up with a statically linked linux ELF binary called “contract” in your current directory.

```bash
# checking output size of QVM compiler
ls -alh contract
-rwxr-xr-x  1 user  group    150K May 23 16:39 contract
```


# \[QVM] Versions & Changelog

This section serves as a changelog mostly and lists features of certain versions. It also discusses limitations of each version and what is planned to be mitigated in the next release.

{% content-ref url="/pages/WD0NA8nDB41YWLL4eHnX" %}
[V0.0.1](/developers/qvm-multi-language-smart-contracts/qvm-versions-and-changelog/v0.0.1)
{% endcontent-ref %}

{% content-ref url="/pages/nt4Azmp0xuGYpAWrcLSw" %}
[V0.0.2](/developers/qvm-multi-language-smart-contracts/qvm-versions-and-changelog/v0.0.2)
{% endcontent-ref %}


# V0.0.1

This version was used for internal testing prior to the first publicly released version which is [v0.0.2](http://10.77.77.188:55004/versions/v0.0.2.html). For this reason this was not documented in detail.


# V0.0.2

## New features <a href="#new-features" id="new-features"></a>

* Expose DB key+value pairs as environment variables to the execution context
* Design common STDIO based API easily accessible from any language to interact with QVM
* Enable forwarding STDERR/STDOUT to be emitted as events
* Cryptographically provable contract download & registration
* ASCII encoders for DB read/write

## Limitations <a href="#limitations" id="limitations"></a>

* Database keys and values are limited to 32 bytes
* Database keys and values can be only ASCII encoded
* STDIO of contract execution result is limited to 32 bytes
* Events cannot be emitted by contracts
* Contract size max 256KB
* Exit codes of contract binaries are not persisted
* Fixed QVM memory allocation
* Storage of other contracts cannot be accessed
* Architecture is distributed, but not truly decentralized yet
* Various instructions do not have proper economics behind them
* Royalty features are not yet implemented
* Value transfers (transferring sETH from QVM) instructions not ready yet

## Roadmap to v0.0.3 <a href="#roadmap-to-v003" id="roadmap-to-v003"></a>

* Write ERC20 equivalent contract sample in Go
* Lift limitation of DB keys and values length
* Lift limitation of STDIO length


# Smart Contract Developers

Get ready to develop DApps on the Quantum-resistant QAN blockchain platform.

{% hint style="success" %}
QVM (QAN Virtual Machine) with [multi-language smart contracts are ready to test!](/developers/qvm-multi-language-smart-contracts)
{% endhint %}

{% hint style="info" %}
💡\[Definition] **Smart-Contract Developer**

Smart-contract developers are programmers who are building software solutions or so-called Decentralized Applications (DApps) on top of a blockchain platform. &#x20;

*Scroll down to register for Generic Smart Contract Developer updates by filling out the registration form below.*
{% endhint %}

{% hint style="warning" %}
\[Market problem]:&#x20;

**Smart Contract Developers who build the ecosystem are not rewarded.**

Blockchain platforms only reward validators (miners, stakers) and node providers in their own utility token. This is despite smart contract developers being the ones who are building use cases and products on the blockchain to reach mass adoption.

**Developers can't use their favoured programming language**

Most of the currently existing blockchain platforms offer only 2-3 programming languages for developers to choose from while developing smart contracts (DApps). There are also ones forcing developers to learn a new language that can only be used on that specific blockchain like Solidity (Ethereum) or Teal (Algorand). This fundamentally limits the mass adoption of blockchain technology because of the high entry barrier.&#x20;
{% endhint %}

## Smart Contract Developers

{% hint style="info" %}
**QANplatform's Vision:**&#x20;

A world where real and helpful use-cases are built on the blockchain.&#x20;

**QANplatform's Mission:** \
Empowering anyone to build rapidly and securely on the blockchain.&#x20;
{% endhint %}

## **QANplatform will be Ethereum EVM compatible**

Thanks to QANplatform’s Ethereum EVM (Ethereum Virtual Machine) compatibility, developers can write, deploy, and run smart contracts as they would on Ethereum. On top of that they and their users can enjoy all the benefits of QANplatform, such as [Quantum-resistant security](/technology/technology-features/quantum-resistant-security), Proof-of-Randomness (PoR) consensus mechanism, Multi-language smart contract development, Developer Royalty Fees, Low and predictable transaction costs fixed in USD — just to name a few.&#x20;

{% content-ref url="/pages/D8Ktcr0LL1DhbmpphZuI" %}
[Ethereum EVM Compatibility](/technology/technology-features/ethereum-evm-compatibility)
{% endcontent-ref %}

## QANplatform, the first Layer 1 blockchain which rewards developers after each transaction

Imagine if GitHub would reward developers when their code is getting re-used by others. QANplatform is the first blockchain platform that favors developers as active members of the ecosystem. QANplatform lets developers not only code smart contracts in any programming language thanks to the unique [Multi-language Smart Contract (Hyperpolyglot)](/technology/technology-features/multi-language-smart-contracts-or-hyperpolyglot) feature, it also rewards developers in a decentralized and democratic way to earn QANX and to boost QANplatform's mass adoption.&#x20;

{% content-ref url="/pages/JTIQc35htR2k67zbn6Vb" %}
[Developer Royalty Fees](/technology/technology-features/developer-royalty-fees)
{% endcontent-ref %}

## 20 million developers will be able to enter the blockchain space thanks to QANplatform

A new initiative started by new-wave blockchains to allow developers to code in different languages by utilizing WASM (WebAssembly), which is a great step forward however, there are better solutions.

QANplatform as a forward-thinking blockchain platform developed a new Multi-language smart contract mechanism. QANplatform's QVM will let developers run any kind of application, which is able to run a Linux Kernel.

{% content-ref url="/pages/zvxAV3VvQSAtbkYuCoHX" %}
[Multi-language Smart Contracts | Hyperpolyglot](/technology/technology-features/multi-language-smart-contracts-or-hyperpolyglot)
{% endcontent-ref %}

## QANplatform, the quantum-resistant blockchain platform

The quantum computer threat is no longer just a FUD, as [IBM recently announced](https://research.ibm.com/blog/ibm-quantum-roadmap) that they would release a 1,121+ qubit quantum computer that will break the cryptography behind 99% of today’s blockchain platforms.&#x20;

We implemented a post-quantum signature scheme that is used to cross-sign transactions. As soon as quantum computers become available we have an immediate solution as opposed to anyone else on the market.

{% content-ref url="/pages/Fr46aA1gYkrF5fLB5IL4" %}
[Quantum-resistant Security](/technology/technology-features/quantum-resistant-security)
{% endcontent-ref %}

{% embed url="<https://docs.google.com/forms/d/15koDPX0dnZpgEFMNdxih7fXyGcjQ9lQujUiQ7EqMbnE/edit>" %}


# Validators

Be a Validator on the QAN public blockchain!

{% hint style="info" %}
💡\[Definition] **Validator**

Validators ("Miners") assure the integrity of the whole blockchain by validating every block and every transaction inside them.
{% endhint %}

{% content-ref url="/pages/EbomsuIg0PgwqJ15IBu6" %}
[Node Providers](/developers/node-providers)
{% endcontent-ref %}

## Join as a Validator and help the QANplatform public blockchain (MainNet) ecosystem

{% hint style="info" %}
**FAQ:**&#x20;

* No need for extra hardware, you can validate ("mine") on your phone or Raspberry Pi.&#x20;
* Validation starts with the QAN public blockchain (MainNet) launch.&#x20;
* Validation process documentation with tutorials will be published before the MainNet launch.&#x20;
* Scroll down to register for Validator updates by filling out the registration form below.
  {% endhint %}

To be able to join the pool of potential validators, a Validator needs to stake a fixed amount of the [QANX Token](/qanx-token/what-is-qanx) in a Deposit Pool to serve as his or her stake.

Whenever a particular validator wins the validation process, the Validator also receives all the coins as rewards from the Issuance Pool. (That contains the tokens coming from the transaction and deployment fees within the particular block).

To be able to stake the QANX Token to participate, a Validator needs to buy them from the [open market](/qanx-token/how-to-buy-qanx).

After the Validator successfully validates a block, he/she can keep or sell its reward in the open market.

*Scroll down to register for Validator updates by filling out the registration form below.*

{% content-ref url="/pages/2o5ushejnMSDObM0QHKv" %}
[Mobile Phone Validation](/technology/technology-features/mobile-phone-validation)
{% endcontent-ref %}

{% content-ref url="/pages/daF9vnj57BQ7qmoezaob" %}
[Proof-of-Randomness (PoR) consensus algorithm](/technology/technology-features/proof-of-randomness-por-consensus-algorithm)
{% endcontent-ref %}

{% hint style="success" %}
**Key Takeaways — \[Validators]:**&#x20;

* Validation starts with the QAN MainNet launch.&#x20;
* Thanks to the PoR consensus algorithm, validation ("mining") can be done on many devices, even with a mobile phone or Raspberry Pi.&#x20;
* To be able to join the pool of potential validators, a Validator needs to stake a fixed amount of the [QANX Token](/qanx-token/what-is-qanx).
* Validation ticket prices, and process documentation with tutorials will be published before the MainNet launch.&#x20;
* Whenever a particular validator wins the validation process, the Validator also receives all the coins as rewards from the Issuance Pool.&#x20;

{% endhint %}

{% embed url="<https://forms.gle/VQd8HcXphSRseJht5>" %}


# Node Providers

Be a Node provider on the QAN public blockchain!

{% hint style="info" %}
💡\[Definition] **Node Provider**

Node providers are constantly running the software on a capable device, providing compute power and storage space for the network.
{% endhint %}

{% content-ref url="/pages/hTmGr81wFCBGKOtrQvM2" %}
[Validators](/developers/validators)
{% endcontent-ref %}

## Join as a Node provider and help maintain the QANplatform public blockchain (MainNet) ecosystem

{% hint style="info" %}
**FAQ:**&#x20;

Node providing starts with the QAN public blockchain (MainNet) launch.&#x20;

Node provider hardware requirements, process documentation with tutorials will be published before the QAN MainNet launch.&#x20;

Scroll down to register for Node Provider updates by filling out the registration form below.
{% endhint %}

Node providers are constantly running the software on a capable device, providing compute power and storage space for the network.&#x20;

{% hint style="info" %}
The following features will only be available with the [PoR consensus algorithm](/technology/technology-features/proof-of-randomness-por-consensus-algorithm):
{% endhint %}

To be able to join the network as a Node Provider you need to pay a registration fee in the [QANX Token](/qanx-token/what-is-qanx). This registration fee is a fixed cost. To pay this registration fee upfront, you need to buy tokens from the [open market](/qanx-token/how-to-buy-qanx).

After you become a Node Provider you will receive a fixed number of QANX Tokens after each validated block - in exchange for your services. (The reward amount might not be fixed over time, depending on the result of the modelling.) You receive these QANX Tokens from coin base transactions, meaning that these tokens are being generated by the network (through an inflationary mechanism).

After receiving rewards, Node Providers can keep or sell their rewards in the open market.

*Scroll down to register for Node Provider updates by filling the registration form below.*

{% hint style="success" %}
**Key Takeaways — \[Node Providers]:**&#x20;

* Node provision starts with the QAN MainNet launch.&#x20;
* To be able to join the pool of potential Node Providers, a Node Provider needs to stake a fixed amount of [QANX Token](/qanx-token/what-is-qanx). (available with PoR only)
* Node provider hardware requirements, process documentation with tutorials will be published before the MainNet launch. &#x20;
* Node Providers receive a fixed number of QANX Tokens after each validated block. (available with PoR only)
  {% endhint %}

{% embed url="<https://forms.gle/XkFbDxmcLnX4Y6TE8>" %}


# Company

Learn about the vision and mission of QANplatform.

{% hint style="info" %}
**QANplatform** /ˈkwɑːn ˈplætfɔːrm/ or **QAN blockchain platform**

**QANX** /ˈkwɑːnˈeks/ the utility token of QANplatform
{% endhint %}

{% hint style="info" %}
**What is QANplatform?**\
QANplatform is the quantum-resistant Layer 1 hybrid blockchain platform that will allow developers and enterprises to build quantum-resistant: smart contract, DApp, DeFi, DAO, token, CBDC, NFT, Metaverse, and Web3 solutions on top of the QAN blockchain platform in any programming language.
{% endhint %}

{% hint style="info" %}
Partnership requests: <hello@qanplatform.com>

Support requests: <support@qanplatform.com> or [Discord](https://discord.com/invite/pEHCdjEJQc)

**Press contact:** <press@qanplatform.com> | [Press kit & Media assets](/about-us/press-kit-and-media-assets) | [Media mentions](/about-us/media-mentions)
{% endhint %}

![](/files/MthhcZ0CzKiMrgJWBhzc)

{% embed url="<https://youtu.be/WtS-OQinhGw>" %}

## Everything starts with a story (or with a <...)

The story of QANplatform started with a bunch of Blockchain enthusiasts who met in 2019 and put down the foundation of this project based on the research and early-stage developments by applied mathematicians, quantum researchers, IT professionals and business development experts. &#x20;

Blockchains. There are so many that we won't even list them here. But if you ever tried to adopt blockchain in your company's workflow you know exactly what holds you back (unpredictable Time-to-Implement, unpredictable data transaction prices for public blockchains, lack of hybrid blockchain platforms, scalability, security).

Johann Polecsak, QANplatform's Co-Founder and Chief Technology Officer (CTO) is also an economist. He along with the Business Development team pursues the way to make QANplatform as appealing as possible. In the en&#x64;*,* all that matters is market share. Our laser focus lights in the single direction of eliminating any obstacles which could come up as a reason not to implement Blockchain technology, making QANplatform the only sane choice to work with. ‍&#x20;

QANplatform will be the blockchain which developers are eager to work on and to work with. As a result, it will soon be the blockchain the CTOs can proudly present as a ready-to-use and future-proof solution. ‍ We've done tons of research, been in immersive insider talks. We keep our finger on the pulse of the ecosystem. We visit every single major event worth visiting, and publish on every subject worth publishing on.&#x20;

### The blockchain platform for forward thinkers.

> *"High transaction fees on ETH? Centralized validators on BSC? These are just two of the major issues to be solved in the Blockchain ecosystem. QAN redefines governance & consensus, protects users with future-proof Quantum resistant cryptography and ensures a truly green operation model for long-term sustainability covering all three aspects. Bring blockchain into everyone's lives by writing smart contracts in any language you know!"*
>
> Glad to have you onboard.&#x20;
>
> Johann Polecsak, Co-Founder and CTO of QANplatform

![Johann Polecsak, Co-Founder and CTO of QANplatform  ](/files/WlC3Ra49nGbYrzdp9r6J)

## Vision & Mission

**Vision:** A world where real and helpful use-cases are built on the blockchain.&#x20;

**Mission:** Empowering anyone to build rapidly and securely on the blockchain.&#x20;

## Short description

QANplatform is the quantum-resistant Layer 1 hybrid blockchain platform that will allow developers and enterprises to build quantum-resistant: smart contract, DApp, DeFi, DAO, token, CBDC, NFT, Metaverse, and Web3 solutions on top of the QAN blockchain platform in any programming language.

## Our values are the driving force behind everything we do at QAN.&#x20;

*And they are not just bullet points.*&#x20;

* Build for the future, not for the pump
* Human code, human communication
* Letting Builders build&#x20;
* Sustainable&#x20;
* High-end

## Team

30+ team members spread across 10+ countries are working on QANplatform. The team consists of cryptography experts, developers, business specialists,  and advisors. The experienced team behind QANplatform has worked in companies and projects like *PwC, IBM, Deutsche Telekom, Uber, Bitcoin.com, Ethereum, Monero, Zcash...*

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><img src="/files/ic3mQpvM3yHwwr59gnbe" alt=""></td><td><strong>Johann POLECSAK</strong>  <br>Co-founder and Chief Technology Officer (CTO)<br><a href="https://www.linkedin.com/in/pmjohann/">LinkedIn</a> | <a href="https://twitter.com/pmjohann">Twitter</a></td><td></td></tr><tr><td><img src="/files/VXTPD9M47yB0ZZzzig27" alt=""></td><td><strong>Jevgenia KIM</strong><br>CEO<br><a href="https://www.linkedin.com/in/jevgenia-kim-a5b897a3/">LinkedIn</a></td><td></td></tr><tr><td><img src="/files/N31k6kbjobb7l4428nYG" alt=""></td><td><strong>Silur (Endre ABRAHAM)</strong> <br>Co-founder and Head of Cryptology<br><em>Ex-Ethereum, Monero, Zcash contributor</em><br><a href="https://silur.dev">Blog</a></td><td></td></tr><tr><td><img src="/files/8GtQkwOOqUEdweno2v04" alt=""></td><td><p><strong>Andras AMREIN</strong></p><p>Business Development Manager<br><a href="https://www.linkedin.com/in/andras-amrein-a0b3bb66/">LinkedIn</a></p></td><td></td></tr><tr><td><img src="/files/UlR6S0QdEwCTNjHziBqz" alt=""></td><td><strong>Misha JURIN</strong><br>Strategic Partnerships and Business Development Manager<br><a href="https://www.linkedin.com/in/mihalyjurin/">LinkedIn</a></td><td></td></tr><tr><td><strong>Reach out to us at:</strong><br>hello@qanplatform.com<br>support@qanplatform.com<br>press@qanplatform.com</td><td></td><td></td></tr></tbody></table>

## Facts & numbers

* Founding date: 2019
* Headquarters: We're a fully remote team&#x20;
* 30+ team members spread across 10+ countries
* QANplatform has 4 IPs:&#x20;
  * Multi-language Smart Contract Development (Hyperpolyglot)
  * Post-quantum cryptographic algorithm implemented in Go programming language (QANplatform is using NIST approved primary post-quantum algorithm.)&#x20;
  * Proof-of-Randomness (PoR) consensus algorithm
  * Rapid cloud platform deployment
* QANplatform was selected from 100+ European startups as a finalist in the EU-India Innovation Center's Startup Program.&#x20;
* Alpine Esports, a Group Renault brand, and inter alia in the Formula 1® Esports Series signed QANplatform as its Official Blockchain Partner.
* QANplatform is among the nine globally selected startups chosen from hundreds of applicants to participate in the global EY (Ernst & Young) Startup Academy program in 2023.
* First EU country implemented QAN’s quantum-resistant technology in March 2024.&#x20;
* QANplatform joined the Linux Foundation and its Post-Quantum Cryptography Alliance.

  \ <br>

{% content-ref url="/pages/Vj6ZSvrIARS9Dp6KRRdR" %}
[Intro to QANplatform](/technology/intro-to-qanplatform)
{% endcontent-ref %}

{% content-ref url="/pages/cqD3ZcnpS5jbndv2a85X" %}
[Press kit & Media assets](/about-us/press-kit-and-media-assets)
{% endcontent-ref %}

{% content-ref url="/pages/Hcx1sd8V31TaLU6vkEj9" %}
[Media mentions](/about-us/media-mentions)
{% endcontent-ref %}


# Roadmap

Our vision of launching the world's first quantum-resistant hybrid blockchain platform—where\
developers can code in any programming language—is now becoming a reality. The team has\
been working diligently behind the scenes to bring it to life. The heart of our project, the QVM\
module (representing 70% of total development and auditing), is complete and has [passed a\
successful audit by Hacken](https://medium.com/qanplatform/qanplatforms-core-innovation-the-qvm-passes-security-audit-e6dad138207e) in July 2025. We expect to complete the XLINK audit in October, after\
which we will submit the final batch of code for review. We’ll share an estimated MainNet launch\
date based on the auditor’s timeframe. In the meantime, we’re heavily focused on establishing key\
external infrastructure partnerships and development tools for developers, aiming to make them\
available on the TestNet after the update and relaunch.

\
To keep you updated, we will begin sharing a brief monthly status updates starting in October. If\
you’d like to catch up on our previous achievements, you can read a [recap of 2025](https://medium.com/qanplatform/qanplatforms-2025-the-year-of-audits-expansion-f7a99404c1e7), [2024](https://medium.com/qanplatform/2024-a-transformative-year-for-qanplatform-d5647051648b) and [2023](https://medium.com/qanplatform/qanplatforms-2023-a-remarkable-year-in-review-d96d8ce7a7e4).

\
You can find the main milestones leading up to the MainNet launch below:

{% hint style="warning" %}
NOTE: Milestones are not listed in order but grouped according to topics.
{% endhint %}

**Legend:**\
**🛠 In Progress**\
**✅ Completed**

## I. TestNet Development and Refinement

Our TestNet serves as the foundation for rigorous testing and iterative improvement.

* **TestNet with Multi-Language Smart Contracts & XLINK v1** ✅ - Successfully launched,  \
  demonstrating core functionality
* **XLINK V1 - Docker Support** ✅ - Now easily deployable via Docker for developer  \
  convenience.
* **XLINK V2 - Desktop Application** ✅ - Currently in development, providing a user-friendly  \
  interface for interacting with the QAN blockchain.
* **TestNet v2 Upgrade & Relaunch** ✅ - Following a comprehensive audit of QVM and  \
  XLINK, we'll be relaunching the TestNet with improvements and enhanced stability.
* **TestNet v3 Upgrade** - Following the Integration Audit, this upgrade will solidify the  \
  TestNet as a production-ready environment.
* **TestNet System Status Page** ✅ - Providing real-time visibility into the health and  \
  performance of our TestNet.

## II. MainNet Audit

We're prioritizing a thorough audit process to ensure the highest level of security and performance\
for our MainNet.

* **QVM Audit (Multi-Language Smart Contract Component)** ✅ - Confirmed the  \
  functionality and efficiency of our QAN Virtual Machine.
* **XLINK Audit (Quantum-Resistant Security Component) ✅** - Audit to validate its  \
  quantum-resistant properties and overall security.
* **Integration Audit** 🛠 - A comprehensive audit encompassing: QVM, XLINK, RPC,  \
  Database Layer, Developer Royalty mechanisms, Consensus, Governance, and Token  \
  Economics

## III. MainNet Infrastructure & Developer Tools

Bringing the tools developers and users need to thrive on QANplatform is paramount.

* **RPC Nodes** 🛠 - Expanding the RPC infrastructure to provide best-in-class access for  \
  developers and dApps.
* **Indexer** 🛠 - Adding a powerful indexer to facilitate dApp development, analytics, and  \
  advanced blockchain data queries beyond basic RPC calls.
* **Oracles** 🛠 - Adding reliable Oracles to bring accurate, real-world data to the QAN  \
  blockchain.
* **Validator Pools** - Enabling broader participation in network validation, lowering the barrier  \
  to entry for users regardless of stake size.
* **Cross-Chain Bridge** - Implementing a bi-directional bridge to connect QANplatform with  \
  other leading blockchains.
* &#x20;**On-Ramp** - Making agreements with licensed 3rd party providers to enable users to easily  \
  purchase QANX, our native utility token, directly with their bank card.

## IV. MainNet Ecosystem Growth

We're actively building a vibrant ecosystem around QANplatform.

* **dApp Onboarding** - Proactively engage and support the first DeFi applications to launch  \
  on QANplatform.
* **CEX Listings & Integrations** 🛠 - Expanding access to QANX through new Centralized  \
  Exchange listings.
* **Developer & dApp Onboarding Program** - A comprehensive program, including  \
  marketing initiatives, to attract and support developers building on QANplatform.

## V. Documentation & Resources

Empowering developers with clear and comprehensive documentation.

* **Smart Contract Code Examples** ✅ - Providing practical examples to accelerate  \
  development.
* **Smart Contract Deployment Guides** ✅ - Streamlining the deployment process.
* **SDK Libraries (9+ Languages)** ✅ - Offering SDKs in a wide range of popular  \
  programming languages for seamless blockchain interaction.
* **API Method Documentation** ✅ - Detailed documentation for all available blockchain  \
  APIs.
* **Smart Contract Development Tutorials** - Creating comprehensive tutorials to guide  \
  developers through the process of building on QANplatform.
* **Security Guide** - Provide guidance on how to avoid mistakes in specific programming  \
  languages which apply to blockchain related usage.
* **Updated Whitepaper** - A new Whitepaper, reflecting the new QANplatform architecture  \
  after the MainNet integration audit.
* **Technical Architecture Documentation** - A detailed overview of the QANplatform  \
  architecture following the Whitepaper release.
* **Node Operation & Infrastructure Guidelines** - Clear guidance for operating and  \
  maintaining QANplatform nodes after the MainNet integration audit.
* **Governance Framework Documentation** - A comprehensive outline of the QANplatform  \
  governance model after the MainNet integration audit.

{% embed url="<https://medium.com/qanplatform/qanplatforms-2025-the-year-of-audits-expansion-f7a99404c1e7>" %}

\
\ <br>

\ <br>


# Press kit & Media assets

Thank you for sharing the word about QANplatform.

Press contact: <press@qanplatform.com> | [Media mentions](/about-us/media-mentions)

{% hint style="info" %}
**QANplatform** /ˈkwɑːn ˈplætfɔːrm/ or **QAN blockchain platform**

**QANX** /ˈkwɑːnˈeks/ the utility token of QANplatform
{% endhint %}

### **About QANplatform:**&#x20;

QANplatform is the quantum-resistant Layer 1 hybrid blockchain platform that will allow developers and enterprises to build quantum-resistant: smart contract, DApp, DeFi, DAO, token, CBDC, NFT, Metaverse, and Web3 solutions on top of the QAN blockchain platform in any programming language.

**Vision:** To live in a world where real and helpful use-cases are built on the blockchain.&#x20;

**Mission:** Empowering anyone to build rapidly and securely on the blockchain.&#x20;

### **QANplatform's Technology:**&#x20;

* **Green:** Lowest hardware and energy requirement on the market, you can run a node on a Raspberry Pi.&#x20;
* **High performance:** Finalizes transactions with lightning speed and able to do thousands in seconds.
* **Multi-language:** Enables developers to write smart contracts in *ANY* language.
* **Quantum-resistant:** QANplatform’s unique lattice-based cryptography secures your data transactions even against quantum computer attacks. QANplatform is using NIST approved primary post-quantum algorithm.
* **Ethereum EVM compatible:** Enables developers to switch to QAN mainnet in a few minutes.
* **Hybrid blockchain:** We have a private and a public blockchain solution, so enterprises can choose whether they want their information available for everyone or not.
* **Rapid 1-click deployment of the private blockchain:** It takes 5 minutes to deploy the private blockchain on hardware, VMs or cloud platforms.

### **QANplatform Links:**

* [qanplatform.com](https://qanplatform.com) - *preferred*&#x20;
* [Twitter](https://twitter.com/QANplatform) (Global) - *preferred*&#x20;
* [Telegram](#vision-and-mission) (Announcement Channel)
* [Telegram](https://t.me/QANplatform) (Group)
* [Discord](https://discord.gg/pEHCdjEJQc)
* [LinkedIn](https://linkedin.com/company/qanplatform)

## Logos

### QANplatform logos&#x20;

{% embed url="<https://drive.google.com/drive/folders/1FTOPxBxbhy3AVUh_xyl8116D4e5NYGd6>" %}

### QANX Token logos

{% embed url="<https://drive.google.com/drive/folders/14uxBO0ikFokd9lia1ZGlfAR1IeeTZ4xf>" %}

### Wallpapers & Press covers

{% embed url="<https://drive.google.com/drive/folders/1n_J-wfl4oGvReB1M7sCGpZWpSbyy2sOi?usp=share_link>" %}

### Spokesperson

{% embed url="<https://drive.google.com/drive/folders/1CJ4w2eaDEes_wTUioWZo5qMBEswsoTD6>" %}

### **Highlighted videos:**

{% embed url="<https://youtu.be/WtS-OQinhGw>" %}

{% embed url="<https://www.youtube.com/watch?v=Xug5eUR8FCU>" %}

{% embed url="<https://youtu.be/AYe33k4TUrM>" %}

{% embed url="<https://youtu.be/Hm4cBuUd3N0>" %}

{% embed url="<https://www.youtube.com/watch?v=pDL3SvSRPQc>" %}

### **Latest press announcement:**

{% embed url="<https://cointelegraph.com/press-releases/qanplatform-joins-linux-foundation-and-its-post-quantum-cryptography-alliance>" %}

### **Highlighted media mentions:**

{% embed url="<https://thequantuminsider.com/2024/05/09/qanplatform-launches-its-multi-language-quantum-resistant-testnet/>" %}

{% embed url="<https://decrypt.co/221751/first-eu-country-implements-qanplatforms-quantum-resistant-technology>" %}

{% embed url="<https://cointelegraph.com/news/eu-country-quantum-resistant-tech>" %}

{% embed url="<https://news.bitcoin.com/qanplatform-signs-15m-vc-deal-for-its-quantum-resistant-layer-1-blockchain/>" %}

{% embed url="<https://beincrypto.com/qanplatform-signs-15m-vc-deal/>" %}

{% embed url="<https://finance.yahoo.com/news/qanplatform-selected-ey-ernst-young-110000349.html>" %}

{% embed url="<https://www.bloomberg.com/press-releases/2023-09-21/qanplatform-selected-for-the-ey-ernst-young-startup-academy-to-accelerate-growth-and-innovation>" %}

{% embed url="<https://thequantuminsider.com/2023/09/12/qanplatform-launches-the-quantum-resistant-private-blockchain/>" %}

{% embed url="<https://cointelegraph.com/press-releases/qanplatform-launches-the-quantum-resistant-private-blockchain-the-new-era-for-web3-os>" %}

{% embed url="<https://news.bitcoin.com/qanplatform-launches-the-quantum-resistant-private-blockchain-the-new-era-for-web3-os/>" %}

{% embed url="<https://beincrypto.com/qanplatform-launches-the-quantum-resistant-private-blockchain/>" %}

{% embed url="<https://ambcrypto.com/qanplatform-launches-the-quantum-resistant-private-blockchain/>" %}

{% embed url="<https://coincodex.com/article/24584/renault-groups-sub-brand-alpine-selects-qanplatform-as-official-blockchain-partner/>" %}

{% embed url="<https://medium.com/qanplatform/alpine-esports-signs-qanplatform-as-its-official-blockchain-partner-18a6b604388c>" %}

{% embed url="<https://finance.yahoo.com/news/alpine-esports-signs-qanplatform-official-145705254.html>" %}

{% embed url="<https://medium.com/qanplatform/qanplatform-was-chosen-to-participate-in-the-eu-india-innovation-centers-preparation-program-a759e7d1bd17>" %}

{% embed url="<https://finance.yahoo.com/news/qanplatform-co-founder-cto-johann-130000105.html>" %}

{% embed url="<https://www.nasdaq.com/press-release/qanplatform-co-founder-and-cto-johann-polecsak-highlights-quantum-threat-at-aibc>" %}

{% embed url="<https://www.bloomberg.com/press-releases/2022-03-22/qanplatform-co-founder-and-cto-johann-polecsak-highlights-quantum-threat-at-aibc-conference-in-dubai>" %}

{% embed url="<https://finance.yahoo.com/news/qanplatform-launches-world-first-quantum-140034873.html>" %}

{% embed url="<https://www.investing.com/news/cryptocurrency-news/qanplatform-officially-launches-quantum-attack-resistant-testnet-rewards-network-developers-2741313>" %}

{% embed url="<https://www.forbes.com/sites/kenrapoza/2022/01/17/the-rise-of-the-new-blockchains-where-are-investors-and-developers-turning?sh=6545d7ca1425>" %}

{% embed url="<https://www.bloomberg.com/press-releases/2021-12-22/librescan-the-first-decentralized-blockchain-explorer-supported-by-qanplatform>" %}

{% embed url="<https://news.bitcoin.com/librescan-the-first-decentralized-blockchain-explorer-supported-by-qanplatform>" %}

{% embed url="<https://www.entrepreneur.com/article/391842>" %}

{% embed url="<https://hackernoon.com/why-quantum-computing-can-break-bitcoin-and-ethereum-blockchain-c61u358e>" %}

{% embed url="<https://finance.yahoo.com/news/qanplatform-presents-80-faster-cloud-134000566.html?guccounter=1&guce_referrer=aHR0cHM6Ly9hcHAuZ2l0Ym9vay5jb20vby9YMlAzaUZPVEFIV0xxZXpUR0xWcy9zL0FSaUI1c29DeGZ4ZTlHUjJWNWgyL2Fib3V0LXVzL21lZGlhLW1lbnRpb25z&guce_referrer_sig=AQAAAGmCNBl8H_7a9W6ys7uwOthYS1mpfL3q23CyPM7zg5B2tqlkCh61mXT2a1SM4YknuK_cLwchIRQWzpiMxNeSvfOKhiHbjYDxTCv3FrpsjLESEX-WjzqouZbKHrWpKfdcTs8Iib3q_ktmP3m5h894U55ujgN64gtW-VyLUvq3aeCx>" %}

{% content-ref url="/pages/Hcx1sd8V31TaLU6vkEj9" %}
[Media mentions](/about-us/media-mentions)
{% endcontent-ref %}

##

####


# Media mentions

Read some of our media mentions.

{% hint style="info" %}
Press contact: <press@qanplatform.com>

[Press Kit & Media Assets](/about-us/press-kit-and-media-assets)
{% endhint %}

## Highlighted media mentions:

{% embed url="<https://cointelegraph.com/press-releases/qanplatform-joins-linux-foundation-and-its-post-quantum-cryptography-alliance>" %}

{% embed url="<https://thequantuminsider.com/2024/10/09/qanplatform-joins-linux-foundation-and-its-post-quantum-cryptography-alliance/>" %}

{% embed url="<https://markets.businessinsider.com/news/stocks/qanplatform-joins-linux-foundation-and-its-postquantum-cryptography-alliance-1033832241>" %}

{% embed url="<https://cointelegraph.com/news/qanplatform-quantum-resistant-blockchain-testnet>" %}

{% embed url="<https://quantumzeitgeist.com/qanplatform-quantum-resistant-ethereum-blockchain-testnet/>" %}

{% embed url="<https://www.insidequantumtechnology.com/news-archive/qanplatform-quantum-resistant-technology-implemented-by-eu-country/>" %}

{% embed url="<https://decrypt.co/221751/first-eu-country-implements-qanplatforms-quantum-resistant-technology>" %}

{% embed url="<https://news.bitcoin.com/qanplatform-signs-15m-vc-deal-for-its-quantum-resistant-layer-1-blockchain/>" %}

{% embed url="<https://finance.yahoo.com/news/qanplatform-signs-15m-vc-deal-110000221.html>" %}

{% embed url="<https://beincrypto.com/qanplatform-signs-15m-vc-deal/>" %}

{% embed url="<https://www.marketwatch.com/press-release/qanplatform-signs-15m-vc-deal-for-its-quantum-resistant-layer-1-blockchain-eaf6cbc2>" %}

{% embed url="<https://ambcrypto.com/qanplatform-signs-15m-vc-deal-for-its-quantum-resistant-layer-1-blockchain/>" %}

{% embed url="<https://finance.yahoo.com/news/qanplatform-selected-ey-ernst-young-110000349.html>" %}

{% embed url="<https://www.marketwatch.com/press-release/qanplatform-selected-for-the-ey-ernst-young-startup-academy-to-accelerate-growth-and-innovation-bb1f1a9d?mod=mw_more_headlines>" %}

{% embed url="<https://youtu.be/Xug5eUR8FCU?si=F77Qe--Rgk5jzaOw>" %}

{% embed url="<https://cointelegraph.com/press-releases/qanplatform-launches-the-quantum-resistant-private-blockchain-the-new-era-for-web3-os>" %}

{% embed url="<https://news.bitcoin.com/qanplatform-launches-the-quantum-resistant-private-blockchain-the-new-era-for-web3-os/>" %}

{% embed url="<https://ambcrypto.com/qanplatform-launches-the-quantum-resistant-private-blockchain/>" %}

{% embed url="<https://finance.yahoo.com/news/qanplatform-launches-quantum-resistant-private-162200124.html>" %}

{% embed url="<https://markets.businessinsider.com/news/stocks/qanplatform-launches-the-quantumresistant-private-blockchain-the-new-era-for-web3-os-1032624407>" %}

{% embed url="<https://quantumzeitgeist.com/qanplatform-unveils-quantum-resistant-private-blockchain-ushering-new-era-for-web3-os/>" %}

{% embed url="<https://thequantuminsider.com/2023/09/12/qanplatform-launches-the-quantum-resistant-private-blockchain/>" %}

{% embed url="<https://news.bitcoin.com/librescan-your-decentralized-blockchain-explorer-dbe-founded-by-qanplatform/?source=post_page-----f8b1518268f4-------------------------------->" %}

{% embed url="<https://beincrypto.com/librescan-your-decentralized-blockchain-explorer-dbe-founded-by-qanplatform/>" %}

{% embed url="<https://finance.yahoo.com/news/librescan-announces-launch-self-hosted-140000138.html?guccounter=1&guce_referrer=aHR0cHM6Ly93d3cuZ29vZ2xlLmNvbS8&guce_referrer_sig=AQAAADLEYjoiwlJjzIalDJ_tjOiQVC9atXNkbUt0yd_0nGnOvctLJstL5LrgJMeY01chzSNsLz9ODZZ3tD4pBy00HsAS7XwJ1CazeVym3ECa-EYG8H97-WvVvNUmbRAMiMsM118f5S9q8dKjVQ1FSl2F2pgvaPv5UamS4CsjXHa08xrp&source=post_page-----f8b1518268f4-------------------------------->" %}

{% embed url="<https://www.marketwatch.com/press-release/librescan-announces-launch-of-self-hosted-decentralized-blockchain-explorer-founded-by-qanplatform-9dfb55fa>" %}

{% embed url="<https://finance.yahoo.com/news/alpine-esports-signs-qanplatform-official-145705254.html>" %}

{% embed url="<https://cryptodaily.co.uk/2023/03/alpine-esports-partners-with-l1-blockchain-qanplatform>" %}

{% embed url="<https://youtu.be/Hm4cBuUd3N0?si=jq7584EozrgK6MuG>" %}

{% embed url="<https://government.economictimes.indiatimes.com/news/technology/eu-india-innocenters-20-innovative-tech-startups-set-to-scale-indian-innovation-ecosystem/95438144>" %}

{% embed url="<https://finance.yahoo.com/news/qanplatform-co-founder-cto-johann-130000105.html>" %}

{% embed url="<https://www.nasdaq.com/press-release/qanplatform-co-founder-and-cto-johann-polecsak-highlights-quantum-threat-at-aibc>" %}

{% embed url="<https://www.bloomberg.com/press-releases/2022-03-22/qanplatform-co-founder-and-cto-johann-polecsak-highlights-quantum-threat-at-aibc-conference-in-dubai>" %}

{% embed url="<https://u.today/qanplatform-unveils-first-evm-compatible-quantum-resistant-blockchain-details>" %}

{% embed url="<https://hackernoon.com/why-quantum-computing-can-break-bitcoin-and-ethereum-blockchain-c61u358e>" %}

{% embed url="<https://www.entrepreneur.com/article/391842>" %}

{% embed url="<https://finance.yahoo.com/news/qanplatform-presents-80-faster-cloud-134000566.html>" %}

{% embed url="<https://www.forbes.com/sites/darrynpollock/2019/09/24/googles-quantum-computing-breakthrough-brings-blockchain-resistance-into-the-spotlight-again#573d71ae4504>" %}

{% embed url="<https://news.bitcoin.com/what-googles-quantum-breakthrough-means-for-blockchain-cryptography>" %}

{% embed url="<https://www.insidequantumtechnology.com/news-archive/qanplatform-raised-2-1m-venture-round-before-uniswap-listing-on-may-21>" %}

{% embed url="<https://youtu.be/AYe33k4TUrM>" %}


# White Paper

{% hint style="danger" %}
NOTICE: This White Paper is obsolete and will be replaced soon.&#x20;

Come back later for a new version.&#x20;
{% endhint %}

{% embed url="<https://drive.google.com/file/d/1jNsG-mX_Ad3jHuDKHRHVKsDZbOWdQASr/view>" %}

{% hint style="danger" %}
NOTICE: This White Paper is obsolete and will be replaced soon.&#x20;

Come back later for a new version.&#x20;
{% endhint %}

{% embed url="<https://learn.qanplatform.com/developers/roadmap>" %}

{% content-ref url="/pages/gHdy6dYartZK40ZOJViN" %}
[Pitch Deck](/papers/pitch-deck)
{% endcontent-ref %}

{% content-ref url="/pages/1XeLjExyn0ofI07KSRXE" %}
[Onepager](/papers/onepager)
{% endcontent-ref %}

{% content-ref url="/pages/sK6qpg6WYsmlwwmknKLm" %}
[Ebooks](/papers/ebooks)
{% endcontent-ref %}


# Pitch Deck

{% embed url="<https://drive.google.com/file/d/1VfhGCHw-T1J9blNra6SH0_J73_XqUkEG/view>" %}

{% embed url="<https://learn.qanplatform.com/developers/roadmap>" %}

{% content-ref url="/pages/1XeLjExyn0ofI07KSRXE" %}
[Onepager](/papers/onepager)
{% endcontent-ref %}

{% content-ref url="/pages/sK6qpg6WYsmlwwmknKLm" %}
[Ebooks](/papers/ebooks)
{% endcontent-ref %}


# Onepager

{% embed url="<https://drive.google.com/file/d/19wVr3EWx-TxqltVvX60SQNn9SbUjPDM-/view>" %}

{% embed url="<https://youtu.be/WtS-OQinhGw>" %}


# Ebooks

QANplatform Ebooks


# Quantum-computing and Blockchain: The Definitive Guide

{% embed url="<https://drive.google.com/file/d/1WvSk3176VHVCJRy0RZd60TQEEjAwv5h9/view?usp=sharing>" %}


# Blockchain's Energy Consumption: The Definitive Guide

{% embed url="<https://drive.google.com/file/d/18wppdh64Q3mRkQwb41ujHDRWKESUSGZQ/view?usp=sharing>" %}


# Blockchain's Transaction Speed: The Definitive Guide

{% embed url="<https://drive.google.com/file/d/1xUloRfED-9TBW0NO21K_rKTXSeKy9z5B/view?usp=sharing>" %}


# QANX Bridge Audit

Audited by CertiK, the #1 smart contract security auditor on the blockchain ecosystem.

## Audited by CertiK

{% hint style="success" %}
QANX Bridge is audited by CertiK, the #1 smart contract security auditor in the blockchain ecosystem.
{% endhint %}

Security means a lot to us, since we are building QANplatform, the quantum-resistant blockchain. It was important for us to audit the [QANX Bridge smart contract](https://github.com/QANplatform/qanx-bridge) as we did previously with the QANX Token smart contract with Certik, the #1 smart contract security auditor on the blockchain ecosystem.

You can find the [QANX Bridge audit report here](https://github.com/QANplatform/qanx-bridge/blob/main/audit/REP-QANX-Bridge-2021-10-27.pdf).

[CertiK](https://www.certik.io/#home) leads blockchain security by pioneering the use of cutting-edge Formal Verification technology on smart contracts and blockchains. Unlike traditional security audits, Formal Verification mathematically proves program correctness and hacker resistance.

> Other than the QANX Token and QANX Bridge the audit firm CertiK was also assigned to audit the recognizable PancakeSwap, 1inch, Tether, and Matic just to name a few.

***

### QANX Bridge

The QANX Bridge is currently not operating. For public information purposes, we are informing you that the following addresses are the QANX Bridge allocation addresses on both Ethereum and BNB Chain. These two addresses hold the QANX Bridge allocation. Please do not transfer any QANX to these addresses!

QANX Bridge allocation (ETH):\
[0x3E9d2bFEC755A2787431Dd56534226255F33A32a](https://etherscan.io/token/0xaaa9214f675316182eaa21c85f0ca99160cc3aaa?a=0x3e9d2bfec755a2787431dd56534226255f33a32a)\
\
QANX Bridge allocation (BSC):&#x20;

[0x3E9d2bFEC755A2787431Dd56534226255F33A32a](https://bscscan.com/token/0xaaa9214f675316182eaa21c85f0ca99160cc3aaa?a=0x3e9d2bfec755a2787431dd56534226255f33a32a)


# QANX Token Audit

Audited by Hacken and Omniscia, leading smart contract security auditor companies.

<figure><img src="/files/lGZqKisBiz88JGqY4jLt" alt=""><figcaption></figcaption></figure>

## Audited by Hacken and Omniscia

{% hint style="success" %}
QANX Token smart contract is audited by Hacken and Omniscia, leading smart contract security auditor companies.\
\
The QANX Token smart contract excellently passed the smart contract security audit performed by Hacken and Omniscia as well.&#x20;
{% endhint %}

**About Hacken:**

[Hacken](https://hacken.io/) is a leading cybersecurity consulting company with an essential focus on blockchain security. Hacken Cybersecurity Services is a part of Hacken Group, including CER.live, HackenAI, and HackenProof. From June 2020, CER.live is the unique cybersecurity data provider for [CoinGecko Trust Score](https://blog.coingecko.com/trust-score-cybersecurity-update/).&#x20;

> Other than QANX the audit firm Hacken was also assigned to audit e.g. Gate.io, Bithumb Global, and 1inch.

{% hint style="info" %}
Date published: February 20, 2023\
You can find the QANX Token smart contract audit by Hacken [here](https://github.com/QANplatform/qanx-token#audits-2023).&#x20;
{% endhint %}

**About Omniscia:**

[Omniscia](https://omniscia.io) is a leading web3 security firm with deep experience securing and optimizing complex smart contracts and blockchain networks.

> Other than QANX the audit firm Omniscia was also assigned to audit e.g. Polygon, AvaLabs.&#x20;

{% hint style="info" %}
Date published: February 21, 2023\
You can find the QANX Token smart contract audit by Omniscia [here](https://github.com/QANplatform/qanx-token#audits-2023).&#x20;
{% endhint %}

{% content-ref url="/pages/JyCKRh4rhBh1Vc2echaw" %}
[What is QANX? ](/qanx-token/what-is-qanx)
{% endcontent-ref %}


# QAN TestNet Audit

QANplatform received QAN TestNet audit

## QANplatform received QAN TestNet audit <a href="#id-17ee" id="id-17ee"></a>

**We are pleased to announce that QANplatform received the audit of the QAN TestNet. Based on the audit report there are only easy-to-solve issues, therefore the QAN TestNet will be soon stable to integrate further features according to the** [**roadmap**](https://learn.qanplatform.com/developers/roadmap)**.**

[QANplatform](http://qanplatform.com/), the Quantum-resistant Layer 1 hybrid blockchain platform, launched its TestNet on January 17th. The current TestNet allows participants to add the [QAN TestNet](https://learn.qanplatform.com/developers/qan-testnet) to MetaMask, thanks to the Ethereum compatibility, and transact with testnet tokens on the quantum-resistant QAN TestNet. With the QAN TestNet release, QANplatform is the first Ethereum compatible quantum-resistant blockchain platform.

*“It was important to audit the current TestNet implementation before further feature integrations like the QAN Virtual Machine (QVM). The auditor team was a pleasure to work with and we exchanged a lot of knowledge. The audit also serves as a base for high-quality documentation, which was long due anyway. We are proud of the audit results and glad that we can soon concentrate on the next steps, since we have a solid base to work with and build upon.”* — said Johann Polecsak, Co-Founder and CTO of QANplatform

{% embed url="<https://drive.google.com/file/d/1n8ucED0j3YhUAkWKzqHnbUG1g6r_jffu/view>" %}

The QAN TestNet audit was performed by VIR Zrt, an IBM Platinum Business Partner.

VIR ZRT provides IT consultancy, software development, audit, IT training, IT project management, software sales, and support to the following sectors: government, finance, energy, IT, public administration, and education. VIR Zrt’s customers are among others: the Hungarian Government, National Bank of Hungary, Mol Group, Petz Aladar Hospital, and Arrow ECS. VIR ZRT received the highest partner rank, the “IBM Platinum Business Partner” from IBM in 2020.\
\
\ <br>


# QAN Virtual Machine (QVM) Audit

QANplatform received QVM audit

## **QANplatform’s Core Innovation, the QVM Passed Security Audit** <a href="#id-1ea5" id="id-1ea5"></a>

We are thrilled to announce a significant milestone in the journey to a robust and secure QAN MainNet: the QAN Virtual Machine (QVM) has successfully completed a comprehensive security audit conducted by leading blockchain security firm, Hacken.

This audit marks the first milestone in our comprehensive QAN MainNet audit pipeline, and arguably the most challenging due to the QVM’s complexity. Beyond quantum-resistant security, the QVM is central to what makes QANplatform unique, empowering developers to code smart contracts in any programming language.

### **Why is the QVM Audit so Important?** <a href="#cc52" id="cc52"></a>

QANplatform is uniting the worlds of traditional software development and blockchain, empowering anyone to build rapidly and securely. The QVM is driving this democratization of Web3, potentially bringing over 28 million new developers into the space by removing the programming language barriers of existing blockchain platforms. But what is the QVM?

### **Understanding the QVM: Running Linux on the Blockchain**

The **QVM (QAN Virtual Machine) is the world’s first blockchain Virtual Machine capable of executing statically linked ELF Linux binaries in a deterministic way, allowing them to be used for smart contracts**. Here’s a closer look at what that means.

But first, **what is a Virtual Machine (VM)?** Think of a VM as a software-based emulation of a computer system. It allows you to run software designed for one environment on a different environment. In the blockchain world, VMs are essential for executing smart contracts — the self-executing agreements that power decentralized applications. Ethereum’s EVM (Ethereum Virtual Machine) is the most well-known example. — It’s good to know that QANplatform is also EVM-compatible, allowing any smart contract currently running on Ethereum to be seamlessly migrated to the QAN MainNet without requiring code changes.

However, the QVM isn’t just another VM. It’s fundamentally different. Most blockchain VMs require smart contracts to be written in specific, often complex or a limited set of programming languages. The QVM, on the other hand, allows developers to bring their existing coding knowledge directly onto the blockchain. This opens up a world of possibilities for developers and significantly reduces the learning curve for adopting blockchain technology.

### **The Key to Trust: Determinism** <a href="#e247" id="e247"></a>

A crucial aspect of any blockchain VM is **determinism**. **Determinism in a blockchain environment means that given the same input and starting state, the VM will&#x20;*****always*****&#x20;produce the same output.** This is essential for consensus. If different nodes on the network produce different results when executing a smart contract, it breaks the chain.

But why would they produce different results in the first place? Determinism seems straightforward for simple operations, but can get complicated easily, demonstrated in the following example:

Imagine a charity smart contract which deducts 10 USD from the donor and adds it to the charity’s balance. This is a simple rule to follow and will make all nodes end up with the same balance for both the donor’s and the charity’s account obviously.

Things get complicated when the charity smart contract is modified with a luck factor and now it should deduct 10USD + a random amount resulting from rolling a dice. How can we guarantee that this virtual dice roll ends up with the same result across all nodes without them constantly communicating with each other about every execution step?

This is a hard problem to solve, so most blockchains resort to severely limiting the possible number of operations to a very narrow, controllable subset to ensure determinism. This sadly also severely limits the freedom of developers, who are used to abundant freedom during their career.

QVM removes this barrier and lets developers code freely as they are used to, and it lets them do it in any programming language. Our modified linux based execution environment takes care of the determinism, without requiring developers to learn new programming languages or other primitives.

QVM achieves this determinism even when running complex Linux binaries, a significant technical feat. Hacken’s audit rigorously tested this determinism, ensuring the QVM consistently delivers predictable results.

### **Hacken’s Deep Dive: A Thorough Examination** <a href="#id-6cdd" id="id-6cdd"></a>

Auditing the QVM was no small task. It’s arguably the most complex component of the entire QANplatform ecosystem, therefore it was performed by Hacken, an ISO-certified end-to-end blockchain security & compliance partner for digital assets.

Unlike traditional providers, Hacken was born on blockchain, combining deep Web3 expertise with enterprise-grade quality, AI-powered offensive security, and globally recognized certifications. Since 2017, Hacken has been trusted by 1,500 adopters, including the European Commission, ADGM, MetaMask, Ethereum Foundation, and Binance to secure the new digital frontier.

Hacken’s team meticulously examined the QVM’s architecture, code, and execution logic, looking for vulnerabilities and potential attack vectors. Hacken’s team even developed an AI-powered threat modeling tool specifically for the QVM. During the QVM audit the AI tool helped draft plausible attack scenarios and evaluated over 2800 test cases uncovering 22 potential issues. Manual audits of this scale could take years and potentially miss critical edge cases.

Note: QVM module was audited at this scope as a standalone module instead of being operated in a blockchain environment. This is a stricter testing scenario since the blockchain logic itself would protect against many kinds of non-determinism. The 22 findings shouldn’t cause practical harm in a blockchain environment where expected transaction output hashes would be included in the input of the transaction initiating the QVM call. While the above findings would indeed cause non-determinism, affected transactions should burn all gas and finally simply get discarded due to their output hash not matching the one defined in the input of the initiating transaction. All of the reported issues were fixed by QANplatform team.

The AI tool — [**which was open-sourced by Hacken and QANplatform to help the Web3 developer community**](https://github.com/hknio/qan-nondeterministic-ai-agent) — provides automated tests to aid security-conscious development ultimately building more secure and reliable web3 applications. This AI tool emerges in the era where established cybersecurity players like Cloudflare are leveraging AI for generating security libraries like the OAuth 2.1 provider framework for authentication.

**Dyma Budorin, Co-Founder and CEO of Hacken said:**

> *“Hacken’s custom-built AI agent was tailored specifically for QAN and delivered outstanding results. Our deep expertise in AI-driven offensive security allowed us to accelerate the audit while increasing its depth. This isn’t a replacement for traditional audits but a powerful upgrade. We welcome QAN’s decision to make it open source, as it gives the Web3 community a real-world example of how new technology can enhance security.”*

**Bartosz Barwikowski, Lead Auditor at Hacken added:**

> *“It was exciting and refreshing to audit such a revolutionary technology as QANplatform’s QVM, an X86\_64-based deterministic runtime and work on an AI tool which could successfully broaden the audit angles of such a complex technology.”*

### **What This Means for QANplatform and Our Community** <a href="#id-00ec" id="id-00ec"></a>

The successful completion of the QVM audit is a huge vote of confidence in the technology powering QANplatform. It signifies:

• **Increased Security:** The QVM is a robust and secure environment for running smart contracts.

• **Faster Development:** Developers can leverage their existing coding knowledge accelerating blockchain adoption.

• **Greater Flexibility:** The QVM unlocks possibilities for more complex and powerful smart contracts.

• **Smooth Path to MainNet:** We’re one step closer to the full launch of the QAN MainNet and confident to move towards auditing QAN XLINK — the quantum-resistant security layer of QANplatform.

\
We’re incredibly proud of QVM, the world’s first audited smart contract runtime where developers can build in any programming language on the blockchain. This is a real enabler of mass adoption the whole blockchain community has been anticipating for many years. We are grateful to Hacken for their thorough audit. You can read the full audit report [**here**](https://hacken.io/audits/qanplatform/l1-qanplatform-qvm-feb2025/).<br>

{% embed url="<https://hacken.io/audits/qanplatform/l1-qanplatform-qvm-feb2025/>" %}




---

[Next Page](/llms-full.txt/1)

