Ecosystem

Three of Ontology-incubated projects, @GoWithMi_GL, @moviebloc, and @topnetwork_top, have been hugely popular with investors since day 1 and are all in the Top 10 in return on investment on CryptoRank https://cryptorank.io/ieo-platforms-roi …

Off-Chain Scaling

Why is off-chain scaling important:

Blockchain offers users a trustless computing environment. For dApp users, the method of using blockchain is generally as follows:

The user sends the signed transaction directly to the blockchain network, and cryptography ensures that the user’s signature is not forged. A trustless blockchain environment will ensure that user requests are processed by the correct smart contract (on-chain code).

However, since the operation of the smart contract on the chain is generally based on the amount of computation consumed, if a smart contract is used to implement complex business logic, the user will have to pay a large fee each time the dApp is used. This will increase the burden on users to use this dApp, which is not conducive to its promotion. Therefore, in reality, most dApp developers generally implement their own complex business logic off the chain, and only perform business result verification and token settlement on the chain (using smart contracts). That is, most dApps today work as shown below:

In order to further reduce the cost, and to facilitate dApp iteration and avoid the security risk of smart contracts, more often than not, dApp developers want to complete all business logic off the chain, and only process token settlement on the chain. dApp developers only call the business result validation logic on the chain when necessary (when off-chain disputes need to be resolved), which is the off-chain scaling method we are discussing in this article.

2. Create an off-chain trustless computing environment:

From the above figure, we can see that from the user’s point of view, the trustless computing environment includes the on-chain part and the off-chain part. In this scenario, the user sends his transaction off the chain, which is then processed by the off-chain code. When the user disputes the processing result of the off-chain code, the off-chain status is sent to the on-chain code to be processed, which is responsible for resolving user disputes. The on-chain code here mainly refers to dApp smart contract and off-chain code mainly refers to the result verification in the off-chain code, instead of all dApp business logic.

On the blockchain, code is law. The code only refers to the code running on the blockchain platform, mainly including on-chain smart contracts, virtual machine, and ledger status related codes. As can be seen, in the current off-chain scaling solution, the on-chain code is law, while off-chain code is not law.

Therefore, in the actual design, it is required that the logic of the on-chain code and the off-chain code need to be equivalent. Since the on-chain code is law, the development of the business verification logic can be completed using the development and testing process of the standard smart contract. However, since the off-chain code does not need to be implemented using a smart contract, its coding should be simpler and more convenient. However, this is often not the case. Since the on-chain code has already defined the relevant logic, the off-chain code must be 100% compatible with the logic of the on-chain code, that is, the off-chain code must be the state in (1) and (4), and the state in (2) and (3) may not exist, otherwise the user will be able to use this inconsistency for fraudulent behavior, and the on-chain code will not be able to identify the fraudulent behavior.