Last modified: Fri Sep 20 2019 11:21:30 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 they are 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 here and there
- when creating your ORG.ID, when adding it to segment directories, when working with associated keys etc.
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 sign off 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 smart contracts and the 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, creating 0xORG smart contract on Ropsten network costs around 877852 gas. Depending on the network load, it may be anywhere between 0.0219 (gas price 25 Gwei) and 0.000877 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, changing the ORG.JSON URI on Ropsten network costs around 68000 gas. Depending on the network load, it may be anywhere between 0.0017 (gas price 25 Gwei) and 0.000068 ETH (gas price 1 Gwei).