Whitepaper

Introduction

ChaCha3 is a cryptocurrency designed to be fun. They are credits given as a reward to those who successfully mine valuable elements from asteroids. These credits are used to transfer value and mint items.

Blocks

Each block, representing an asteroid, contain unique metadata to represent their type, position, orbit, and other characteristics. The larger 32-bit values are used for positions and coordinates. The smaller 8-bit values are used to represent characteristics and properties.

Meta name Integer size (bits)
A 8
B 8
C 8
D 8
E 8
F 8
X 32
Y 32
Z 32
W 32

Block meta data are meant to be unique. Therefore, there is unlikely to be two asteroids with the same characteristic. Miners can specific a fix some of meta parameters to find blocks of a specific parameter if they wish. It would lower the probability of finding the block in exchange of some form of customization.

The transactional limit per block is set to 1200. This transaction limit is sufficient to allow most transactions to go through while maintaining quality of transactions. As most of the storage in nodes are used for storing transactions, it is important to ensure that only quality transactions go through the network. Maintaining reasonable storage requirements for nodes is important to keep the barrier of entry low for running nodes and keeping the network decentralized.

Blockchain

The chain is able to handle high transaction volume with a block time of 1 minute. The block time is sufficient enough to get quickly get confirmation for online transactions and to be secure. A lower block time could get confirmations quicker but confirmation would be unreliable and would lead to having the need to wait for more confirmations to be reliable and prevent fraudulent transactions.

The chain verification is unique in that it uses cache values to verify account balances instead of the commonly used method of transactional references. It means transaction verification can be done in more efficient. In the case of forks or block resolutions, the balance values can easily be revert to prior block versions. Senders only need to sign the transactions and the chain verifies the signature and balances. Although, the transactions indexes are still also cached for reference

{
  "0x0044f08cbabf8d9d4383b384d93733ed32c57000c63ede8aca": {
    balance: '1000000000000n',
    transactions: [
      ...
    ],
  }
  "0x0002a149e0b6ed3f4492818d31b6704bee96e0b3e5fbd282a7": {
    balance: '20031233847992n',
    transactions: [
      ...
    ]
  }
}

Wallet

Wallets are based on public key cryptography where private and public keys are generated. ChaCha3 specifically uses Elliptic Curve Digital Signature Algorithm (ECDSA) with secp384r1 curve. It provides 192 bits of security strength, higher than the usual 128 bits in most cryptocurrencies.

The private keys provide full access to an account, allowing anyone with access to them to sign and create transactions. Therefore, it is necessary to protect the wallet with adequate encryption. The private keys are encrypted using AES-GCM256. The AES encryption requires a 256-bit key, which is generated using a password. The encrypted private key bytes have the following structure:

Data Size (bytes)
Version 1
Initialization Vector (IV) 12
KDF Salt 16
Authentication Tag 16
Encrypted payload 16

Keys are generated from the password using a key derivation function (KDF). Specifically, it uses the Argon2i for the KDF. Argon2 allows the configuration of rounds, thread, and memory usage to derive the keys to slow down attacks such as password brute forcing. The configuration has been set to be run adequetely slow enough to deter attacks but fast enough unlock using today's computers (around 0.3 - 0.5 seconds). The configuration is as below:

Option Value
Parallelism 8
Memory 64 MB
Rounds 40
Salt length 16 bytes

The configuration can be adjust in future wallet version to ensure sufficient protection from next generation computing power. As the encryption/wallet version is embedded in the private key fingerprint, the encryption format and version can be adjusted. In addition of 16 byte salt prevent rainbow table attacks. It ensures that different wallets encrypted with the same password generates the different keys.

Proof of work

Mining using Proof of Work (PoW) is the most equitable method to distribute currency at the introduction of a cryptocurrency, as everyone has a fair chance of mining with no pre-existing stake. As mining has become increasing popular, PoW methods for new cryptocurrencies have evolve to evade existing mining techniques such as ASICS miners for it to be truly new.

ChaCha3 uses a relatively new hash algorithm Blake3, that has evolved from Blake2 that has proven to be secure. As the hash algorithm and protocol is completely new, there are few to no dedicated miners and GPU optimization. Therefore, there is room and incentive for the community to built upon them.

Mining Reward

The mining reward are known as credits or creds. Miners are rewarded with 1 Quintillion (exacred) for the initial blocks. This value is halved every 1 Million blocks, approximately every 2 years. There is no set limit to the total number of blocks. However, the reward would diminish after multiple rounds of halving. The total supply is expected to go above 2 Septillion (yotacred). Below is the supply chart for the first 20 years.

The units, denominated in satoshi, are named using SI prefixes instead of divided using decimal places, keeping the units simple.

Amount Name Note
1,000,000,000,000,000,000,000,000 Yottacred Total supply just above 2 yottacred
1,000,000,000,000,000,000,000 Zettacred -
1,000,000,000,000,000,000 Exacred Initial mining reward
1,000,000,000,000,000 Petacred -
1,000,000,000,000 Teracred -
1,000,000,000 Gigacred -
1,000,000 Megacred -
1,000 Kilocred -
100 Hectocred -
10 Dekacred -
1 Cred -

Difficulty retarget

The retarget are on every 1440 blocks (approx. 1 Earth day) . With fast retarget times and adjust factor clamped between 0.5 to 4, we can expect to see less difficulty slog and volatility.

Transactions

Transactions can be created to send credits, create items, and transfer ownership of items including mined blocks.

They contain the following fields:

Field Description
Version Version of the transaction
Sender Key Public key of the sender and creator of the transaction. For generating sender address and verifying signature
Receiver address Receiver address of the transaction
Signature Signature to verify sender
Time Timestamp of the transaction
Amount Amount or cost
Type Type of transaction (mine, send, mint, etc.)
Fee Fee reward to miners to increase priority of transaction

Most transaction would be of type send. The mine transaction type is only for the blocks coinbase transaction and can only be created by miners in their blocks. The creator of the transaction can attach a fee to increase priority of the transaction by miners. There is also transaction type for minting items and transferring ownership.