The Ludos Protocol and Its Technical Structure
The Ludos Protocol implements a Plasma-like multi-sidechains system to scale the main chain, a game can issue and peg its assets on the Ludos main chain and perform complex game contract operations and store data at the sidechain level. Meanwhile, Ludos also provides State channels based off-chain smart contract interaction solution as a complementary to the sidechain system.
The blockchain game developers can always easily interact with the blockchain system through the toolbox provided by Ludos, despite of all the technical details.
Ludos believes that only an infrastructure is strong and efficient enough to support multiple scalable DApps can provide its true value.
Ludos intends to accomplish the following goals:
- Games and DApps (decentralized exchanges, player communities, etc.) will be run on individual and decentralized sidechains.
- Blockchain game developers will be provided with friendly APIs and SDKs; therefore, they will be able to focus on developing core logic but not on minor, infrastructure-level issues.
- Large-scale applications (games) with low GAS costs and high throughput will be supported.
- Sidechain applications can be updated, can build autonomy, and can even fork themselves. Data of these applications can also be shared.
1. Main Blockchain + Multi-Sidechain
Ludos takes the intensive-interaction and real-time requirements of game scenario into consideration. The Ludos Protocol uses a highly decentralized main chain with PoW+PoS consensus mechanism, which is assisted by multiple sidechains with independent consensus mechanisms, security levels, throughput, and data storage methods to balance security and efficiency.
Ludos main chain is only used for the deployment of sidechain root contracts, token/assets issuing, and settlement of transactions. Meanwhile, main chain can also serve as a judge to ensure the safe exit of digital assets during a malicious attack. The execution of specific operations (games, independent functions) is handled by high throughput sidechains.
1)Consensus Mechanism of Main Chain
- Ludos chose to use PoW+PoS as the consensus mechanism during the transition period: currently, Ludos main chain will use PoS consensus to finalize at 50 block intervals with two-thirds of the network voting on the validity of the network, so a 51% percent attack will have much smaller risk and become less rewardable. Thus, the PoW+PoS mechanism can maximize the participation of miners and ordinary users, benefiting both parties. Additionally, the PoS mechanism encourages holders of LUD Tokens to keep these coins in their wallets instead of trading them on the exchange. This will help users focus on Ludos’s technology and ecology rather than on short-term profits from market volatility.
- Ludos will eventually transit from PoW+PoS to pure PoS system.
2)Sidechain Scalability Solution
- This scalability solution is indeed an Off-Chain Trading technology. Ludos’s main chain will ensure its security.
- Ludos will give an implementation of the Plasma Protocol – Ludos Plasma. The goal is to transfer a large amount of calculations of smart contracts of Ludos’s functions or games to sidechains instead of executing them on Ludos’s main chain. Sidechains can be implemented with relatively fewer nodes or can be weekly centralized, and sidechains can also adopt PoA or DPoS as the consensus mechanism (the sidechain maintainer can choose the consensus mechanism that best meets its requirements according to the actual situation). As a result, the amount of TPS may reach up to thousands.
3)Implementation of Ludos Plasma
- Ludos Plasma implements Plasma Cash as a solution to scale Ludos sidechains. Ludos Plasma enables users to securely transfer their game assets between the main chain and game's sidechains. Ludos Plasma also sets a challenge period (three days initially) to eliminate the possibility of incurring malicious actions by sidechains’ users or Plasma operators.
The implementation of Ludos Plasma includes:
- 1. Root contracts deployed on the Ludos main chain. Core implementation code is as below:
- 2. Client components that interacts with both main chain and sidechains. Implementation code(Python) of exits and challenge is as below:
- 3. Plasma Operator. Implementation code(Python) for submitting blocks is as below:
4)Sidechain Consensus Mechanism
- Sidechains can have their own consensus algorithms.
- The default consensus mechanism of Ludos sidechains is Proof of Authority (PoA). The company that created the game can also choose other consensus algorithms such as DPoS or PBFT as the consensus algorithm of sidechains based on its own node network plan.
- A sidechain needs to provide a corresponding Plasma Review and Plasma Exit to ensure a completely trustless system.
- Ludos will introduce players, developers, and other autonomous entities into the newly created sidechain and allocate block producers across different entities; that is, it will provide consensus as a service (CaaS).
6)Consensus as a Service
- A new game’s sidechain network may not have enough nodes to achieve consensus, and the sidechain even might suffer from a Witch Attack.
- The Ludos platform will provide multiple trusted nodes to achieve the consensus of the sidechain network of a new game. CaaS node providers will be other participants from the Ludos community who will receive appropriate incentives from the platform.
- Ludos does not support the direct interaction of different sidechains’ asset exchange for now. The exchange of value between sidechains, such as cross-game digital asset trading, requires that the assets of the sidechain be sent back to the main chain through the root contract and then be exchanged through the main chain.
- This mechanism would ensure the feasibility of atomic transactions as well as the safety of assets and the simplicity of the system.
State channels are a very broad and simple way to think about blockchain interactions which could occur on the blockchain, but instead get conducted off of the blockchain, without significantly increasing the risk of any participant.
Ludos state channels mechanism has the following limitations:
- Dependent on the validity of the state
- It is only suitable for DApps that will have highfrequency status updates over a lengthy period
- Participants in a single contract must be relatively stable
- Operations within state channels are set to be hidden by default
- State channels will have instant termination capability
Examples of Alice and Bob:
Ludos relies on the Sidechain/Relay mechanism to achieve basic cross-chain functionality while combining the advantages of the three technical solutions including notary schemes， sidechains/relays and hash-locking to achieve automatic cross-chain digital asset trading trustlessly. In the cross-chain mechanism, Ludos will include the following features:
Cross-chain oracle issues
General cross-chain smart contracts
- Ludos will save core data through smart contracts recorded on blockchain while automating the execution of the platform’s core logic.
- 1) The first category is the business logic of the Ludos platform, which includes digital asset distribution, game crowdfunding, decentralized exchange, incentive systems, etc.
- 2) The second category is game logic templates and numerical models for modular development of blockchain games.
- The index server is critical to network expandability. Ludos’s index server provides basic search andfiltering functions for the platform.
- Ludos encourages developers to fork the source code and develop their own efficient and expandable blockchain applications.
- The oracle is a trustable entity that imports external information by signing; therefore, it allows the defined smart contract to react to the undefined external world.
- In the Ludos system, some functions cannot be decentralized in the early stage, such as centralized games in the platform, fiat payment services, certain services provided by our partners, random number services, and cross-platform and cross-game interaction. External data are required to realize these functions. However, these functions must be involved in Ludos’s decentralized system and must interact with Ludos main chain through smart contracts.
- The core functions of games on the Ludos platform, such as purchasing top-ups, purchasing equipment, and selling game items and lottery, are run on smart contracts. We will continue to develop new features based on different gameplay types. These codes are verifiable and disclosed on the blockchain.
- For deterministic systems such as blockchains, generating fair random numbers is difficult. Therefore, Ludos uses Oracle to obtain authoritative, customized random numbers outside blockchains.
- A zero-knowledge proof means that one party (certifier) proves that a statement is correct to another party (verifier) without revealing any information other than the statement.
- The zkSNARKs algorithm in Ludos will be mainly used in two scenarios:
- protection of the privacy in the trading or auction of game assets/accounts/information
- protection of the intellectual property of game development templates such as numerical design
4.Other Key Components
1)Updatable Smart Contracts
This set of contracts is divided into two categories:
5)Fair Pseudorandom Number
6)Zero Knowledge Proof Mechanism
5. .bc Codec Agreement of Recording Virtual Items on Blockchain
The .bc (dot blockchain) codec is a set of protocols that allows game designers, graphic designers, musicians, and other virtual content creators to use smart contract to price, attribute, and manage their works, and to record these data on blockchains.
In the future, the Ludos platform will have many games that support individual designers and artists in a decentralized way, especially VR-based games that need high-quality content producers and designers to provide players with fresh and fun 3D virtual items.
Designers can post their work via a .bc codec protocol to the Ludos platform and set prices, payment methods, properties, and background stories freely. Digital works are uniquely recorded on the blockchain.
A DAICO contract is issued by a development team that needs to raise funds. A DAICO contract first needs a Contribution Mode to specify a mechanism: everyone can contribute LUD Tokens to the contract and get the corresponding tokens. Capped Sales, Uncapped Sales, Dutch Auction, Interactive Token Releases, KYC-dynamic Cap Sales or customized sales plans designed by the team are all supported. After the contribution phase, no more LUD Tokens can be contributed. The initial token balance will be set, and the token can be traded later.
At the end of the contribution phase, the contract has a main state variable: tap (unit: go/sec; go is the Ludos currency system’s minimum unit), with an initial value of zero. Tap determines the amount that the development team can withdraw from the contract per second.
Meanwhile, a mechanism that allows token holders to reach a solution by voting also exists. Two solutions are offered:
- Increase the tap value
- Initiate self-destruction of the smart contract permanently
Both solutions can be initiated with a majority vote (e.g.: yes - no - absent / 6 > 0). Note that you cannot lower the tap value by voting. Owners can voluntarily lower the tap value, but they cannot unilaterally increase the tap value.