# 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.

# The FOURdx smart contracts in production

Platform Contract address Link
Ethereum 0x82cebDEabB79FdFaB70649834ddD85f42b6B9464 Link (opens new window)
Ethereum Kovan 0xa334fe6279Fb2BaEC093bB083426cadA1017d4E4 Link (opens new window)
SI-Chain (HashNet testnet) 5452790f993b65608c4bb85a318193f8ebb77a753f601280f8 Link (opens new window)
Edgeware jM7MuqQNvUdg67hjf8g3WqB2VYEfWpojUsBpdsVT9uPBePU Link (opens new window)
Solana DevNet 9fdByGW3FymQEwWYHuA9ZXdEQPsiLa3DwpjgF8pCyhWc Link (opens new window)
Solana MainNet 9fdByGW3FymQEwWYHuA9ZXdEQPsiLa3DwpjgF8pCyhWc Link (opens new window)

# The FOURim smart contracts in production

Platform Contract address Link
Solana DevNet Hk5f9Xw9PdaQ9GEg8TPVFusojLA9otDpUkziXw1hAVE5 Link (opens new window)
Solana MainNet Hk5f9Xw9PdaQ9GEg8TPVFusojLA9otDpUkziXw1hAVE5 Link (opens new window)

# Storage

A database represents an organized collection of data, stored and accessed electronically. There are 4 databases forming in the 4thTech system;

  • MySQL database is used to store; (1) user nicknames; (2) platform settings; (3) user wallets, and; (4) RSA public key for data encryption. Data exchange within the MySQL database is protected with an HTTPS connection and a firewall. In the case of a user request, it is possible to delete any user-related data to comply with GDPR regulation;
  • data file cloud repository is used for the temporary 7-days storage of encrypted data files that are exchanged between wallets in the dMail process. The decryption of the data files is possible only with a private key of the user. Data file cloud repository is protected by a firewall. In the case of a user request, it is possible to delete any user-related data to comply with GDPR regulation;
  • local storage is used to store; (1) FOURwaL private keys; (2) dChat short messages, and; (3) user-initiated backup of conversations, data files and reports. The security of local storage is in the users domain;
  • blockchain (Ethereum, Tolar HashNet, Substrate, Solana) is used to store; (1) a link to the encrypted metadata file and timestamp (dMail); (2) encrypted message, timestamp and sender address (dChat). The overall security of the blockchain network depends on its decentralization, while the access security depends on the users private key safety measures.

# 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, three additional blockchains were added to support 4thTech dID, dMail and dNotary, all chosen based on their uniqueness. The support for Tolar HashNet protocol was added in v1.0 already in July 2020, while Edgeware, a Polkadot Substrate was added in v2.0. Solana blockchain support was added in Q2 2021 with the aim to enable a private, immutable on-chain dChat. Tolar HashNet can handle a high volume of transactions, while the platform ensures valid, scalable usage which makes it perfect for Enterprise applications. Substrate 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. Solana is the next generation censorship-resistant blockchain with over 500 validators, extreme transaction speeds and low cost. Special logic was added into programing, which enables us to add additional blockchain support when needed.

4thTech uses hosted Ethereum-node on Infura over JSON-RPC protocol, to connect to the Ethereum node. In the case of Tolar 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 Edgeware and Solana node, 4thTech uses JSON-RPC protocol.

# 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

4thTech Tokenization; (1) enables the monetisation of 4thTech transactions (i.e. TX) and services through the use of cryptographic tokens; (2) enables users to “fuel” the dMail & dChat wallet-to-wallet communication TX with underlying network supported assets (ETH, TOL, EDG, SOL); (3) utalizing FOUR token staking, it can enable users to receive dMail & dChat service fee discounts including right to special features access (i.e. still in concept mode), and; (4) utalizing FOUR token staking, it will enable software, licence & white-label access for end-users and partner projects (i.e. still in concept mode).