Skip to content

TimeNode economic strategy reference

Piotr Kosiński edited this page Jan 24, 2019 · 2 revisions

Economic strategy reference

Variables

Economic strategy make sure that TimeNode operations stay profitable under various conditions.

  • bounty - the amount of ETH added by the transaction sender to incentivize the TimeNode
  • deposit - the amount of ETH set by the transaction sender to be locked by the TimeNode
  • modifier - the payment modifier - the value between 0 and 1, proportional to a time position in the claiming window
  • callGas - minimum gas price request by the transaction sender
  • reimbursedGasAmount - (txRequest.callGas + 180000) / 64 * 65
  • reimbursement - each transaction execution is reimbursed by transaction sender with reimbursedGasAmount * callGas
  • claimingCost - cost of claiming transaction - 100000gas*gasPrice
  • networkGasPrice - the current network gasPrice
  • minimumProfitability - parameter set by TimeNode operator

Expected reward

Claiming by default starts 1h before the execution, at this point we need to estimate the futureNetworkGasPrice, also since the modifier* is increasing the closer we are to execution time, our knowledge about the futureNetworkGasPrice is getting better (assuming that the estimation is better the closer we are to the event) and we can assume futureNetworkGasPrice = networkGasPrice

TimeNode claims + executes

totalClaimingCost = claimingCost + deposit

expectedReward = bounty * modifier - totalClaimingCost + deposit + reimbursement - reimbursedGasAmount * futureNetworkGasPrice

During the claiming process, we assume that TimeNode will start claiming as soon as:

expectedReward >= minimumProfitability and variables at this point are modifier and futureNetworkGasPrice

During execution, the only variable is networkGasPrice which is known at this point.

  • networkGasPrice =< callGas then the callGas has to be used and expectedReward ~= minimumProfitability
  • networkGasPrice > callGas TimeNode has to minimize the loss, the amount of ETH at risk is expectedReward + deposit, which means that maximumGasPrice = callGas + (expectedReward + deposit) / reimbursedGasAmount

Conclusion

minimumProfitability parameter acts as protection from any significant networkGasPrice increase during between claiming event and execution event (by default ~ 1h)

TimeNode executes only

In this case since TimeNode didn't have the claiming cost:

expectedReward = bounty * modifier + deposit + reimbursement - reimbursedGas * futureNetworkGasPrice which is

  • networkGasPrice =< callGas then the callGas has to be used and expectedReward ~= minimumProfitability
  • networkGasPrice > callGas TimeNode will execute if minimumProfitability is reached so maximumGasPrice = callGas + (expectedReward - minimumProfitability) / reimbursedGasAmount