Last modified: Thu Apr 18 2019 08:29:10 GMT+0000 (Coordinated Universal Time)
How much does it cost to publish Inventory?
In this tutorial, you will learn about transaction costs on Ethereum and how big are they in Winding Tree ecosystem.
- Ethereum wallet with ETH
Step by step
You pay certain amount of ETH for every Ethereum transaction. In order to use Winding Tree ecosystem, you need to create a transaction at two possible occasions - registering and updating an inventory.
Transaction cost in Ethereum is based directly on how much computational power your transaction needs and how much data it is storing on the network. For every operation there is a fee specified in the Ethereum Yellow Paper (Appendix G).
Every time you post a transaction, you tell Ethereum what's the maximum amount of gas you are willing to spend (gas limit) and how much ETH you are willing to pay for a unit of gas (gas price). This determines how much ETH a miner will get for that transaction when they process it.
Although the total amount of gas that a transaction needs is deterministic, it may differ between Ethereum networks due to experiments and slight variations. After all, testnet is for testing.
Another factor coming into play is the gas price. As it directly influences how much ETH the miners will get, the transactions that will reward more ETH usually get mined first. This can spiral up the gas price when the network is overloaded. On the other hand, during times with low traffic, you can get away with minimal gas price.
As such, all numbers here are purely orientational. It heavily depends on current state of the network, current exchange rate of ETH to fiat currencies, current implementation of Winding Tree Index and amount of data you are storing.
Notice: Ether has many sub-units, just like USD has cents. One of them is Gwei and is usually used when talking about gas prices. 1 Ether consists of a billion Gweis, i. e. 1 Ether = 1,000,000,000 Gwei (109).
Registering new inventory
From experience, registering a hotel on Ropsten network costs around 575000 gas. Depending on the network load, it may be anywhere between 0.0143758 (gas price 25 Gwei) and 0.000575 ETH (gas price 1 Gwei).
Updating an existing inventory
You need to update the inventory essentially only when something stored on-chain changes which in the right setup should be virtually never.
But from experience, updating a hotel on Ropsten network costs around 52000 gas. Depending on the network load, it may be anywhere between 0.0013008 (gas price 25 Gwei) and 0.000052 ETH (gas price 1 Gwei).