For the last 2 weeks our team was engaged in launching the alpha version of the Robonomics smart contracts infrastructure in the Ethereum mainnet. The main task that we were solving by the alpha release was the implementation of Robonomics platform’s version history and testing the XRT emission mechanism in accordance with the model described in Whitepaper.

XRT emission for execution of Robonomics program in Ethereum

I strongly recommend that you all read chapters 5.2 , 5.3 and 6 of Robonomics White Paper in order to understand the principles of providers’ work and models of XRT emission.

The first transaction for XRT emission took place on June 14, 2018. The emission amounted to 0.000973391 XRT or 973 391 Wn.

In this context, charges of the Robonomics providers amounted to:

890 287 gas for the creation of a liability contract;

168 153 gas for the finalization of a liability contract.

As it is easy to see, there is a discrepancy between the amount of utilized gas for the creation and finalization of the liability contract in total and the emission of XRT. However, the Robonomics Whitepaper states the rule: Emission of 1 wn = 1 gas utilized by Robonomics. Let us see why there are variations.

Blind spots for gasleft() in solidity

Solidity has a global variable that allows us to calculate the remaining gas when the contract is executed by Ethereum’s virtual machine.

At the very beginning, when creating a liability contract, we record the amount of gas remaining, i.e. how much gas is allotted for the execution of the program. And we check again how much gas is left at the end of the function’s execution, whether we need to create or finalize a liability contract. This way, we can figure out within the execution of a function how many calculations it costs. Based on these data, we can safely request for the function of new coins’ emission from the contract.

Now there is a difficulty with the fact that until the moment when the function of creating or finalizing a liability contract begins and after exiting from these functions, Ethereum’s virtual machine still spends that gas that we “do not see”. For the period when the alpha version of the network is effective, an error index of 110 525 Wn will be introduced and we will dig further in order to find out how the emission model can be brought to the output figure most closely approximate to the total costs of the provider. The error rate between the utilized gas and the Wn emission, is from 5 to 15% today, including the error index. And while it is not critical, we are still willing to work on its improvement.

Trying XRT emission in June

We have drafted an instruction manual, using which you can create your own lighthouse and “work” on it, receiving XRT emission. And while we are warning you that this is an alpha release and all that you are going to “mine” will not be the original XRT token, we are still preparing a bounty program, using which you can transfer XRT alfa into the future “original” ones. The document is open for your comments, so do not hesitate to write in and contribute to it. Link to the document:

https://docs.google.com/document/d/1x-CKQlxeou4BE4mMJtiBeNFMPM2Hype-oXyL1TPu5FU/

Link to XRTD-program, the generator of supply and demand: https://yadi.sk/d/rORHPEHH3Y7TBD