At 9:00 pm Beijing time on August 26th, the chief architect of Ultrain Shen Yufeng, conducted an AMA (Ask Me Anything) activity in the “code open source” to answer the previous collections. Community members have questions about open source code and he helped them understand more clearly the meaning and many points of knowledge of Ultrain code open source.

Q1. What is the structure of the Ultrain’s side chain?

The overall multi-chain architecture diagram is like this:

alt text

alt text

Dapps are running on specific shard-chain, and the main-chain is managing all the

Shard-chains; and the general lifecycle of the shard-chain is like: some enterprise wants to rework some of their business using blockchain technology; so he acquires and deposits a certain amount of UGAS on the main-chain and requests an exclusive shard-chain. Main-chain locks up the deposit and then summons and assigns a certain number of miner machines to form a new shard-chain. The enterprise can exclusively use all the computation/storage/network resource of that shard-chain; And the deposited UGAS from the enterprise is slowed released to the miners of the shard-chain as the reward for their contribution of hardware resource.

And also we have the non-exclusive, or shared shard-chain, where small Dapp developers can buy portions of the overall resource accordingly to their needs and also pays UGAS in proportion.

One important feature of the design is that miners don’t stay on one particular shard-chain permanently, instead they are rotated to different shard-chains now-and-then, so the chance that miners collude together to attack a particular shard-chain is extremely low if not practically impossible, so the over all security of the whole Ultrain network is very high.

The detailed design can be found at’s Multi-chain architecture - revised.pdf

Q2. Is the consensus mechanism the same as the main chain? How does the interaction with the main chain work?

The consensus algorithms are the same on both main/shard-chains, which is called R-POS. It is an original innovative consensus algorithm created and implemented by the Ultrain team. First of all, it is a Proof-of-Stake algorithm, any one can become the member of block producing committee by staking a certain amount of UGAS; and during each round of block production, VRF-based random number is used to select a few block producing candidates from the committee, then the rest of the committee vote on the candidates to reach consensus on one block producer for that round. The voted block producer decides the block to be produced and earns the block reward. Currently for singe-chain, we can reach about ~1000 TPS and about ~10 seconds confirmation time.

The interaction between main/shard-chains are mainly based on the techniques called “light-weight client” or just light client. Let me try to explain the idea of light client. Suppose we have main chain and one shard chain called chain A; All the block header information for chain A are stored on main chain, because the size of block header is much smaller than the size of whole block, so we call that main chain is the “light-weight” client of chain A (suppose we save all the block history of chain A on main chain, then main chain is a full-node or heave-weight client of chain A). And also vice versa we also make chain A to be a “light client” of the main chain.

With the weapon of light client, we can now safely do many cross-chain verifications; for example, say that I have an account XYZ that wants to transfer 100 UGAS from main chain to chain A. First of all XYZ needs to deposit the 100UGAS onto a certain main chain account/contract and locks it up, then we can release the 100 UGAS on chain A. now the question is how can chain A safely know that the 100 UGAS has been locked up on main chain? here is where light client comes to help; because chain A is the light client of main chain, he keeps all the block header information of main chain, so by using these block headers (plus merkle proof techniques) chain A can cryptographically verify that XYZ has indeed deposited 100 UGAS on main chain and then the according 100 UGAS can safely be released on chain A. Basically all the interaction between main/shard chains are relying on this light-client mechanism.

Q3. If the code is open source, others could directly fork, re-establish a new chain with zero cost, if they reduce the business cost of the merchant’s uplink, what kind of impact will the Ultrain cause?

First of all if this indeed happens, it means they appreciate the excellency of Ultrain’s technology. There are so many choices of open-sourced public chain projects and by choosing forking Ultrain’s code, it is a very positive acknowledgement of Ultrain team’ technical capability J

And from our perspective, the various technical components of the whole Ultrain project like consensus, multi-chain architecture design, p2p and etc are actually project-agonistic and not necessarily be confined to the “Ultrain chain”; and our license is MIT License, which has very little restriction and essentially you can take the code and do anything you want. We benefit a lot from the open-source community so we are more than willing to contribute to the open-source community. Happy hacking!

Forked chains are actually very common, like BTC vs LTC/DOGE/BCH; Ethereum vs ETC; and also like EOS vs EOSForce; but honestly speaking we rarely see that the forked chain can do significantly better than the original chain.

As for the specific question, I think now the competition between different public chain projects are along many different dimensions, like technical capability, engineering realization, community building, marketing, business development, core team building etc. I don’t think one single factor like lowering the on-chain operation cost can win the competition single-handedly.

Q4. After the code is open source, if there is a bug, will it be used by hackers?

First of all, no software is without bugs. Like in the early history of Bitcoin there is integer overflow bug that creates billions of bitcoins from vain and it was fixed by an emergency hard-fork; For Ethereum there is the famous The Dao exploit that results in the forked ETC from Etehreum; And also remember just recently for Cosmos there is the validator unstaking bug;

For Ultrain, before open-source we have our code audited by various blockchain security companies like SlowMist and KnownSec; And we keep constant monitoring

of the network status and do our best to respond to any emergency bug.

Our code repo is here and welcome for bug-hunting.

Q5. What is the meaning of technology open source for the Ultrain?

The most significant meaning is that it proves that the Ultrain network is truly a fully decentralized public blockchain network. The code does not lie. Everyone can freely download and compile the code to build and run a Ultrain node, and freely join the Ultrain network to contribute hardware resource and earn reward.

Q6. How to land Dapp? What is the current application situation?

This year we have put tremendous effort and resource into launching enterprise level application on our blockchain network; For example, we have collaborated with YOHO!, which is the biggest collectible sneakers sellers in China, for putting their sneakers’ authentication information onto our blockchain for the buyers to trace; Several hundreds of thousands sneakers information have been recorded on chain up until now; And our recent super-nova hackathon has also incubated many creative Dapps, e.g. the second place winner CryptoSanguo will launch on our mainnet in Sep. Stay tuned if you are interested in games and crypto assets.

Historically our token UGAS is an ERC20 token issued on Ethereum so it only has limited functionality like trading in exchange and can’t be actually used on our mainnet, which suppressed a lot of practical application scenarios to happen on our mainnet; Now that we have officially started our ERC20 -> Mainnet UGAS migration process and it is estimated all the tokens will be mapped to Ultrain mainnet before 9.15; and after that we expect a lot of applications with practical use cases will emerge and run freely on our mainnet with the support of native UGAS.

Q7. How does the miner mine after the code is open source? How to ensure the income and asset security of miners?

Ultimately what I want to see happening is like: interested miner first acquires a certain amount of UGAS; he can use wallet to stake the UGAS to become a qualified miner of the Ultrain network; Then he downloads the source code and build a Ultrain node program. Then on his home PC he can run this node program to join the Ultrain network to contribute his hardware resource to the network and earn rewards.

Open sourcing is a necessary but not sufficient condition for reaching the abovementioned goal; the key problem we are facing is that most interested and potential miners have no technical background, they don’t know the code, and don’t know hardware maintenance. And most of the potential miners we have talked to are more interested in choosing the cloud-mining option, in which all the machines are hosted on (different) clouds and maintained by professionals, so they don’t have to worry about the economical loss caused by like machine misbehavior or node program exceptions, and also don’t have to worry about asset stealth because their PC gets hacked.

In summary, if you want worry-free then cloud-mining suits you better; and if you have strong technical background and don’t mind getting your hands dirty, then home PC mining will be fun for you.

But to realize the ideal, we will keep improving the whole experience of setup and running the mining node, make it easy to use and more robust and ultimately everyone can just one click to mine on their home computer; and only then we can say we have fully realized the ideal of making Ultrain a permission-less and decentralized blockchain network.

Q8. How to dock developers? What is the github address for submitting bugs?

You can visit our developer portal at to get yourself familiar with our chain environment and the related dev tools. Or you can directlyu reach to our staff through various community IMs.

For filing bugs, you can crate issues at

and also we will launch bug bounty program soon.