Draft:Raptoreum

Raptoreum (RTM) is a decentralized ASIC & FPGA  resistant hybrid proof of work digital currency. It runs on a network of distributed nodes on which transactions are verified through cryptography and recorded on the Raptoreum ledger also known as a blockchain. Raptoreum can be sent from user to user on the peer to peer Raptoreum network without the need for central bodies to process the transaction. This cryptocurrency released its main net in February 2021 after almost 3 years of test net and was created by the Raptoreum Team. Raptoreum is based on its custom proof of work Ghostrider hashing algorithm created by Tri Nguyen, lead developer at Raptoreum, and is designed to be low power, Green , and forcus at promoting decentralization by cycling several different algorithms randomly, discouraging the ASIC and FPGA mining farms allowing anyone with an everyday CPU to join the network. Raptoreum allows for asset creation, futures and smart contracts in common programming languages such as Python and Java using a backbone of Apache Spark. This model proposes to cater for the majority of developers in the world as opposed to a limited number who can program in Solidity for smart contracts on the Ethereum Network and others. It is also notable that the team proposed development angle in its contracts might improve traditional business integration with blockchain. This cryptocurrency is fully open source.

RTM is created from a process called mining. Raptoreum has been previously criticized due to creating a shortage in the available amount of AMD Ryzen processors as users surged to buy them causing huge price hikes. Raptoreum has also been praised due to its efficiency and low cost to entry for the everyday user.

How it started
The name 'Raptoreum' was derived from the Victorian term for a bird of prey being 'Raptor' and 'eum' meaning 'pertaining to'. It also derives from the team's aims in solving previous issues with both Ravencoin and the scalability issues of the Ethereum network and began as the fairly simple idea, introducing smart contracts allowing on chain trust less transfers on the Ravencoin codebase with the automation of assets with RTM (Raptoreum). Ravencoin suffered several breaches of its asset layer so the codebase was abandoned by the Raptoreum team. The project evolved by adding features that expand the asset layer.

The Raptoreum Code
The RTM project is built on customized Dash code with its roots in the Bitcoin codebase, and its latest release aims to expand its capabilities. The Raptoreum blockchain inherits its distributed node system with chain locks while adding:


 * 1) The development of an asset layer
 * 2) The option to lock coins or assets into custom transactions which can unlock at block height or timestamp
 * 3) Trust less on chain transfers of assets and native coins via Smart Contracts
 * 4) Integrating a VM protocol allowing for Smart Contracts in programming languages including Java and Python through Apache Spark

The RTM development attracted attention by allowing a variety of industries under the current distributed application umbrella. Raptoreum provides common programming languages connected to blockchain and contract development helping wider audiences by offering solutions for all digital interactions and utility.

Smart Contracts
Smart contracts are programs stored on the blockchain that execute when predetermined conditions are met, and are typically used to automate the execution of agreements enabling participants to be in the knowledge of the outcome without loss of time or centralized involvement. When first introduced, smart contracts allowed for the execution of code on the blockchain which delivered new use cases with the development of applications that exist and execute inside blocks on chain. This is how Ethereum and many other first generation smart contract platforms currently operate.

The RTM team have explained that blockchains such as Ethereum (ETH) and Tezos (XTZ) and others fail by utilizing uncommon languages such as Solidity, Vyper, Rust & Mycelium for their contracts which account for just under 3% of all developers (as of 2022). Ethereum's own contract scalability comes with its detriment because contracts exist in the Ethereum block itself and have a hard coded size limit, and only one smart contract can be executed at a time slowing things down when the network is busy vastly increasing gas fees.

With Raptoreum's approach to decentralized program storage and execution by using a combination of its current RTM 'SmartNode' network and Apache Spark™, a new generation of smart contract solutions can be executed. The initial transaction to setup a SmartNode is made on the Raptoreum blockchain, whereas the SmartNode layer exists outside the chain on thousands of CPU's around the world in which Raptoreum uses for the purpose of hosting and executing its contracts in common programming languages with interoperability and the help of Apache Spark™. The project wants to provide a platform that achieves high performance for batch and streaming data using a DAG scheduler, a query optimizer, and a physical execution engine. Raptoreum's model supports batch job submissions which help network throughput with developers being able to execute multiple smart contracts at once. Raptoreum's take on running the contracts at SmartNode layer and out of the block itself, allows for a greater flexibility with its larger data size and choice of languages.

How smart contracts will work on Raptoreum
In terms of decentralized and automated job execution secured by blockchain technology, Raptoreum seems to widen that scope. A quick example would be a token standard in a specific language using a specific Spark binary meeting a set of standardization requirements allowing for the open sourcing of standardized token creation and live network verification of open source code if a user so wishes to create one with those specifications. This seems to allow for wider execution options.
 * 1) A user submits a job or batch of jobs through an execution request by using an RPC call. This will then create a special type of transaction at the Raptoreum blockchain. Once this transaction is fully confirmed, the job will enter the execution queue with the smart contract secured to the chain.
 * 2) Raptoreum's SmartNodes create a quorum with each other to double check if the binary hash matches the creation of the smart contract.
 * 3) 'Active' SmartNodes keep track of the job queue and a SmartNode is then elected to submit the job using Livy to create a Spark-submit.
 * 4) Both tasks above 2 & 3 happen in the same Quorum message.
 * 5) Upon successful submission of the Livy Spark-submit, Apache Spark™ then takes over by directing a cluster of 'active' SmartNodes within the Raptoreum network to complete the job.
 * 6) The job result be it success or failure is then broadcast to all SmartNodes and when successful, will be recorded on the blockchain or at a database managed by the SmartNodes.
 * 7) Raptoreum's SmartNodes are able to send zmq messages allowing any connected application to listen and react in real time based on the results of the incoming job submissions.

Additional Information

 * The first “value based” checks built into the Raptoreum chain which will vary the cost of smart contract execution services based on the value over time instead of a set number of RTM coins. This will avoid crippling development due to expensive transaction fees.
 * Time locks are for auto-contract triggers that can set a future termination time for contracts when they are created (futures-based contracts).
 * Much larger sized smart contracts.
 * Low transaction fees compared to other platforms.
 * Job batch submission and execution.
 * Token Standardization with on-chain binary verification.
 * Real-time communication between decentralized jobs and listening applications running inside or outside of the Raptoreum network.
 * Decentralized job queue so that reactive SmartNode clusters can pickup jobs from other clusters should Smartnodes go offline for any reason.
 * SmartNode requirements promote the resources for large scale data processing and job execution for mass decentralized applications.

Focal points
The Raptoreum smart contract framework focus to provide smart contracts, futures, assets, NFT's and decentralized applications that are faster, more robust and with high programmability through new use cases powered by decentralized applications. Apache Spark and its underlying languages are the backbone of our current digital society.

SmartNodes
Raptoreum's SmartNodes are an evolution of the original Dash master nodes. They provide full copies of the blockchain, support the 51% protection with its chain-locks, and also a second layer of services to the network with functions such as 'InstantSend', 'PrivateSend' and custom usernames. Raptoreum focus to solve Ethereum's issues by allowing its smart contracts to be executed at SmartNode level through a decentralized processing network, removing the confines of the chain and increasing functionality, thus its name, 'SmartNode'. These nodes perform functions that focus for a secure, fast and developable network with its focus of avoiding the limitations of first generation asset solutions who's contract run inside blocks on the ledger. This layer also houses the binary code needed for decentralized applications verifiable through a binary hash stored on the RTM chain when the contract or application is launched. Raptoreum's Dash inherited chain-locks prevent the ledger from being organized by 1 block which allows protection from a traditional 51% attack because an attacker would need to control 51% of the network hash rate and also 60% of active SmartNodes on the network simultaneously, making such an attack almost impossible and extremely expensive. Since these chain-locks prevent the reorganization of the chain, they also all binary hash transactions of loss and tampering, providing immutable verification of the matching binary code as long as the network is live.

SmartNodes need to be equipped with a minimum of 8 Core CPU's+, 16GB RAM+ and 512GB SSD+ to provide distribution of available resources and versatility over its predecessors.