# 4thTech Elements

# Smart Contracts

Smart contacts are essentially code or rules written into a digital program and were written to facilitate 4thTech unique requirements.

In the case of FOURdx, a smart contract executes the following:

  • saving unique ID (e.g. represent a unique id of the data file);
  • deliver links (i.e. represents a link of the data file);
  • represent a name (i.e. represent the name of the data file);
  • provide a description (i.e. represents a description of the data file).

In the case of FOURim, a smart contract executes the following:

  • saving instant messages from the sender;
  • retrieving instant messages from receivers.

In the case of FOUR STAKING, a smart contract executes the following:

  • transferring tokens from sender to contract address;
  • creating lock schedule metadata with locking details (e.g. token amount, lock period, transaction cost discount, etc);
  • enable the transfer of tokens from contract to sender address once lock period is over.


# Storage

A database is an organized collection of data, stored and accessed electronically. The 4thTech system contains three databases:

  • MySQL database: storing user first name, last name, tax number (i.e. the data needed for digital identity verification using X.509 digital identity certificate standard), platform settings, user wallets, RSA public key for data encryption. MySQL database is protected with a firewall. Data exchanges are protected with an HTTPS connection. In the case of a user request, it is possible to delete any user-related data;
  • local or cloud file repository: storing encrypted data files. In the case of a user request, it is possible to delete any user-related data;
  • blockchain: encrypted message and timestamp of the send an instant message.

# Multi-Blockchain Interoperability

Multi-blockchain support enables transaction cost and speed choice, which is especially important when dealing with public blockchains. Next, to already supported Ethereum, two additional blockchains were added, both chosen based on their uniqueness. The support for HashNet protocol was added already in July 2020, while Edgeware, a Polkadot Substrate was added in v2.0. HashNet DLT is a ground platform we find essential to building the application that can handle a high volume of transactions that are furthermore, fairly recorded and immutable, while the platform ensures valid, scalable usage which makes it perfect for Enterprise applications. Edgeware is a high-performance, self-upgrading WASM smart contract platform, in the Polkadot ecosystem. It is a Substrate based blockchain built using the Rust programming language. Smart contracts are written in Ink! programming language. Ink! is a Rust-based eDSL for writing Wasm smart contracts specifically for the Contracts module. Special logic was added into programing, which enables us to add additional blockchain support when needed. Solana blockchain support was added in Q2 2021 with the aim to enable a secure affordable Layer 1 instant messaging solution. According to Solana.com, Solana is the next generation censorship-resistant blockchain with over 500 validators, extreme transaction speeds and low cost, therefore perfect for Layer 1 on-chain instant messaging. Solana leverages Proof of History and several other breakthrough innovations to allow the network to scale at the rate of Moore's Law.

4thTech uses hosted Ethereum-node on Infura over JSON-RPC protocol, to connect to the Ethereum node. In the case of HashNet protocol, 4thTech uses Tolar Gateway which transforms JSON-RPC calls to gRPC (i.e. universal RPC framework) calls to connect to the HashNet node. In the case of connecting to the Polkadot/Edgeware and Solana node, 4thTech uses JSON-RPC protocol.

# The FOURdx smart contracts in production

Platform Contract address Link
Ethereum 0x82cebDEabB79FdFaB70649834ddD85f42b6B9464 Link (opens new window)
Edgeware jM7MuqQNvUdg67hjf8g3WqB2VYEfWpojUsBpdsVT9uPBePU Link (opens new window)

# Scalability

4thTech has been up and running for the past three years. This time was also spent exploring and developing solutions in regards to project scalability.

In the case of 4thTech blockchain applications development, developed Docker containers will be integrated into Kubernetes clusters, which will enable the overall scalability and elasticity of the 4thTech systems.

# Security protocols

4thTech utilizes advanced encryption standard (i.e. AES), with a combination of RSA encryption and hash algorithm 256 (i.e. SHA 256) to secure immutable data exchange. The data files are encrypted with a symmetric algorithm (i.e. AES), as the asymmetric algorithm (i.e. RSA) is used to encrypt the symmetric key and initialization vector (i.e. IV) with the public key of the receiver.

4thTech encryption design does not allow an attacker to infer relationships between segments of the encrypted message. SHA 256 is defined as one of the most secure ways to protect digital information. SHA 256 is a mathematical process that generates a 256 bit (64 characters long) random sequence of letters and numbers (hash) out of any input. Secure hash algorithm 256 is used to calculate the file content hash value when executing an on-chain data file exchange transaction via smart contract.

# Tokenization Service

4thTech tokenization service (i.e. TS):

  • enables the monetisation of 4thTech transactions (i.e. TX) and services through the use of cryptographic tokens;
  • enables users to “fuel” the data file & metadata wallet to wallet exchange with system supported assets (FOUR, ETH, EDG…);
  • enables users to receive service fee discounts when staking FOUR;
  • enables the right to access (i.e. FOUR staking is needed to access FOURim).