Nano contracts
Nano contracts feature is being progressively rolled out but is still in beta testing, and currently only available on Hathor Network testnet. It is not yet available on Hathor Network mainnet.
TL;DR
Nano contract is a type of smart contract exclusive to Hathor technology. Every smart contract deployed on Hathor blockchain is referred to as a nano contract. The distinguishing factor of a nano contract compared to a conventional smart contract is that Hathor platform provides contract templates, making it possible to create contracts on Hathor blockchain without needing to develop their code.
Introduction
This article talks about nano contracts. We will cover:
- what nano contracts are;
- how they are different;
- what problems they solve;
- what their advantages are;
- what their capabilities are; and
- how to use them.
Glossary
This term is used throughout this article:
-
Smart contract is a software that is stored on, executed by, and has its outputs recorded on a blockchain network.
What are nano contracts?
Nano contracts are an exclusive feature of Hathor that enables users to create smart contracts without needing to develop them, in a more secure, easy, and rapid manner. Nano contracts are Hathor's approach for smart contracts. Every smart contract deployed on Hathor blockchain is called a nano contract.
To create a nano contract, a user does not need to develop its source code. They may just select an available blueprint that can acommodate their use case, and define the values for the set of parameters that such blueprint needs to uniquely specify the use case.
A blueprint is the source code that models a general category of nano contracts use cases and serves as a template for creating a nano contract. Hathor platform provides its users with a catalog of blueprints. The catalog of blueprints is the set of all blueprints built in Hathor.
How are they different?
The following diagram depicts the difference between creating a conventional smart contract and a nano contract:

For example, suppose a betting company wants to create a smart contract that implements a betting option. On other blockchain platforms, the company would need to design, implement (code), test, and audit the smart contract before deploying it on the blockchain network.
In turn, on Hathor, the company can skip the development, test and audit stages of the smart contract implementation. Hathor has in its catalog the bet blueprint. Bet is a blueprint that can be used to model betting options. Thus, the betting company can select the bet blueprint, and define the values for the set of parameters that the bet blueprint needs and that uniquely specify the betting option. Such set of parameters may include, for example, the description of the betting event, the odds, the possible results that bettors can place bets, etc.
What problems do they solve?
Nano contracts were conceived to address the major problems in the conventional approach to smart contracts, namely:
- High development cost
- High code complexity
- High security risks
- High auditing cost
- Low scalability
- High operational costs
- Immutability dilemma
What are their advantages?
For solving or at least mitigating the problems presented in the previous section, we can synthesize that nano contracts have four key advantages over conventional smart contracts:
- Affordability
- Usability
- Security
- Efficiency
Affordability
Nano contracts are more affordable. They are accessible to users who otherwise would not have the resources to use them. Some individuals and organizations would not have money, time, and personnel to develop conventional smart contracts, but they can have the resources to create nano contracts. Nano contracts make blockchain projects accessible to a vast number of previously overlooked users.
Usability
Nano contracts are easier to create. Creating nano contracts is both practical and convenient. The challenges of contract development, code complexity, code auditing, and security risks are all managed by blueprint developers, allowing users to focus solely on the use cases they aim to build on the blockchain.