Comparative analysis Reversible Logic Engineering Analysis of features and software solutions
The PRIZM core is developed based on the NXT cryptocurrency source codes. The source code for PRIZM is published on GitHub, but not all files are published. It uses the Proof-of-Stake algorithm, the Diffie-Hellman elliptic Curve25519 (ECDH) algorithm, the SHA-256 hash algorithm, and AES-256 symmetric encryption. As an algorithm for forming blocks, Proof-of-Stake (PoS) is used.
The algorithm has the following effects:
- Solved the problem of excessive power consumption
- Minimized costs of system members on node support
- Game theory mathematics contribute to system decentralization
- The average generation time is self-regulating by a floating base target, aiming for a value in the range of 59-60 seconds
The following transaction types are available:
- regular payment (transfer of PRIZM from address to address)
- message (sending text information)
- setting the name / description of the address (publishing text information on the blockchain and creating a data connection with the address)
Details about the type of “Message”. The publication of text or other data, there are subspecies:
- Public message for the recipient
- Encrypted message for the recipient
- AES-256 is encrypted, the key is calculated by ECDH (sender_private_key,
- Public note for yourself
- Encrypted note for yourself
Within one transaction, subtypes of the “Message” type can be combined in any combination.
A new algorithm for issuing new PRIZM coins and charging them to a virtual address account. Previously, this algorithm was not used in other cryptocurrencies. With an event that changes the balance of the address, the virtual account is reset; PRIZM coins deleted from the virtual account are sent to the owner address from the GENESIS address in the form of real coins. The GENESIS address has a negative balance, the balance module of which is constantly increasing, accurately reflecting the emission of cryptocurrency.
PRIZM coins are credited to the virtual account every second, the amount of charges depends on the personal funds of the address and the amount of personal funds of other addresses associated with the main address.
During the first transaction of the main address to a new address, a connection is created that cannot be destroyed. The links are layered and are stored in the para table of the paraprizm.h2.db database. Coins in the account of linked addresses are considered part of the amount only if the distance between the address for which paramining is calculated and the linked address is less than 88 other addresses.
A new address means an address without a single transaction and the absence of PRIZM coins in the account.
Advantages of the system
- A minimum of transaction types makes the system predictable and reliable, minimizing the number of potentially vulnerable sections of code;
- The variability and ease of integration of arbitrary data into the transaction body provides ample opportunities for using the PRIZM blockchain in distributed applications;
- The ability to integrate arbitrary data facilitates integration with third-party services PRIZM, as it reduces the identification of incoming payments to a simple check, which is much simpler than the methods that have to be used to integrate Bitcoin and its tokens;
- Military-grade encryption standards;
- An innovation that implements emissions in the form of “paramining” is an interesting phenomenon that requires further study;
- Paramining saves energy and facilitates network support, since it does not require expensive equipment for issuing coins, which makes PRIZM more accessible for maintaining its own node compared to Bitcoin, Ethereum and other PoW currencies;
- Emission is fully transferred to ordinary users;
- The probability of an attack of 51 percent (double spending) is much less than that of Bitcoin, due to the excessive cost of the attack (the cost of an attack exceeds the attacker’s potential benefit: you need to buy back half of all existing PRIZM coins);
- Convenient JSON RPC: you can almost always find a method that allows you to get information of interest.
The resulting system problems
- Static base target problem due to the increase in the volume of circulating PRIZM coins, the total amount of funds generating blocks using the PoS algorithm may go beyond the predetermined limits of the base target, which will lead to a decrease in the average block generation time of fewer than 59 seconds. However, in the course of the study, a deterministic mechanism was discovered that changes the limits of the basic goal to fully compensate for this effect.
- The problem of low attractiveness of site content due to the fact that the issue is created by ordinary users, maintaining your own site is at first glance not as financially attractive as maintaining it for Bitcoin or Ethereum. On the other hand, the cost of maintaining the site is several times less: it does not require a large amount of disk space; it does not require large computing power; it is not necessary to perform constant heavy calculations with energy costs. In general, the absence of emissions in favor of the creator of the block when creating blocks fully offset by low requirements for ownership of the system node, and the commission funds are more than enough to pay back the invested funds. Also, when receiving commissions for creating a block, a trigger is triggered that creates a transaction with paramining to the address of the creator of the block, which avoids commission for an outgoing transaction to activate the trigger.
The problem of the basic goal is solved by regularly changing the basic goal. Once in a certain number of blocks, the target is recalculated in accordance with the current emission in such a way that the mathematical model of the block generation algorithm maintains proportions that ensure uniform generation of blocks and protect the network from double waste attacks and others.
- decompilation of the source code of the PrizmEngine.jar file from the prizm-dist-184.108.40.206a.tgz package obtained from https://github.com/prizmspace/PrizmCore
- database analysis prizm_db / paraprizm.h2.db and prizm_db / prizm.h2.db
- monitoring network interactions between nodes in a synthetic environment
- Functionality ParaEngine.java
It is necessary to answer the questions:
- Why is the class not published?
- What is real class functionality?
The file is obfuscated to prevent uncontrolled creation of hard forks; Obfuscation does not interfere with restoring the abstract model of the class’s functionality based on the code structure:
- Connection to the paraprizm.h2.db database
- Database Integrity Check
- Restore Database Integrity
- Database update
- Public methods of the class and inverse functional:
- popLastBlock – starts reverse calculations for the paraprizm.h2.db database and turns it into the state in which it was 1 block back
- rollbackToBlock – control code for the popLastBlock method
- getBaseTargetStart – returns the nearest height at which the limits of the base target should be updated
- isBaseTargetRegionBegins – answers the question whether the blockchain is at the height of changing the limits of the base target
- calculateBaseTarget – recalculates a new base goal to compensate for the increase in the number of PRIZM coins involved in creating blocks
- getBaseTarget – returns the cached base target for a given height
- convert – converts a transaction to a format for internal computing
- check – creates and validates transactions GENESIS addresses
- canReceive – validates duplicate transactions for a GENESIS address
- getMetrics – returns data about a virtual address account
- getFixedFee – calculates a fixed commission
- private class ParaEngine.java conducts complex internal calculations
- it is impossible to create hard fork without these calculations
- class interface is transparent
- methods receive only the data that is required for data processing
- no opaque requests to external (unfocused) code
- no suspicious behavior detected
- the code is functional
Innovations and improvements
The PrizmEngine.jar file was decompiled, followed by the construction of maps of the remote, created, and modified logical connections of the methods relative to the NXT code.
The method was applied after obtaining permission from the official representatives of the cryptocurrency.
A comparative analysis of the source code and the database revealed the following changes, code improvements and innovations that are not related to building up external functionality and distinguishing the PRIZM core.
Innovations and optimizations in the PRIZM code base
- A new algorithm for removing obsolete records from the database, the task is divided into small parts, performed in a different order, the performance gain is measured in multiple numbers
- The use of indexes on the used database columns is widely introduced, which speeds up query processing
- The constant value limiting the base target has been replaced by a dynamic
- The dependence of the base target on the current emission is created, which stabilizes the speed of block generation in an environment with a varying volume of PRIZM coins participating in the PoS algorithm
- Reimplemented the transaction request algorithm from the database in which the target address is involved; the new algorithm limits the number of conditions and the amount of data read, which has a beneficial effect on performance
- New mechanism for scheduled blockchain scanning from the GENESIS block;
- New mechanism for checking blocks before real data processing
- Additional verification of transactions before real data processing
- Reduced maximum transaction size by 85% to 1.5 KB
- New mechanism for checking unconfirmed transactions in the database, which starts when the node starts
- New algorithm for checking raw transaction bytes
- New mechanism for creating a self-signed SSL certificate
- Reimplemented queries to the database, the number of conditions and the amount of requested data are limited
- New SSL encryption mechanism using host internal tools
- New mechanism of dynamic fluctuations of the base target
- The average block transaction capacity has increased significantly; network throughput increased in proportion to 85% change in maximum transaction size
- The performance of the blockchain download process and the processing speed of outdated data has increased in multiple values, increasing the overall maximum fault tolerance of the system in the long term
- Replaced mechanisms for working with the database led to multiple reductions in the delay in processing API and P2P requests, to a multiple reductions in the time for block validation and blockchain scanning
- PRIZM is more productive and reliable in the long run than NXT
- The PRIZM core is capable of processing more data without significant performance impact.
- System security is enhanced by multiple additional checks that do not have a noticeable effect on performance
- A number of new checks and validations are performed before the actual data processing begins, eliminates the possibility of deliberate node overload with useless data processing, reduces the load on the disk and network subsystems
- The mechanism for automatically creating an SSL certificate allows users to immediately start using the host they started using the universally accepted HTTPS data encryption protocol, which is especially important for forging addresses because, in order to start the process of creating blocks, it is necessary to transmit the passphrase of the address to the host side via the Internet (to create digital block signatures).
- PRIZM is 10 times faster than the first transaction confirmation and hit the blockchain
- PRIZM has 5 times faster transaction acquisition of irreversible status
- More blocks are needed to declare a transaction irreversible, but the high speed of creating blocks means that after 10 minutes the transaction can be considered irreversible. This is an excellent result for the payment of goods and services due to the reduction of the transaction time.
- The more dynamic growth rate
- The maximum rate for the year is much higher than that of Bitcoin, which indicates the positive prospects for further growth.
- Significantly more profitable commissions
- Small commissions minimize losses during the redistribution of funds between controlled addresses and payment for goods and services, favor the further growth in the popularity of cryptocurrencies.
- PRIZM user activity is more than a third of Bitcoin user activity, which is a worthy result, considering that PRIZM is almost a decade younger than Bitcoin.
- The prospect of financial gain through trading is superior to Bitcoin
A stable rate with rare but significant fluctuations up allows you to give a positive forecast regarding the profitability of currency trading. The prospect of financial gain through investment storage
Paramining has created a new niche in the world of cryptofinance, providing the opportunity to profit without the need to engage in trading
PRIZM is positioned as a cryptocurrency payment system. It does not promise distributed applications, smart contracts or tokens, but provides tools for building various add-ons on its basis. The PRIZM kernel does the minimum that it promises, but it does well.
The kernel supports expansion using add-ons, which allows you to extend the functionality of the API and integrate the kernel with complex analytical tools without making changes to the source code and recompiling the kernel; add-ons provide full access to real-time blockchain events. The functionality accrued with add-ons does not lose working capacity when updating the PRIZM kernel version.
The level of optimization of performance and node security shows that the code base is regularly updated and maintained; developers regularly conduct performance analysis and make appropriate modifications. The system is in good technical condition and has been able to function for decades.
PRIZM cryptocurrency is expected to continue to grow in popularity. The tendency to maintain the average rate over the next year will continue. With the further integration of cryptocurrency into various services for trading goods and services, the rate will grow.
Prizm coin is growing rapidly in price and popularity and also available for trading on many popular crypto exchanges in the US, Canada, UK, and Australia.