Hacker News new | ask | show | jobs
by thisisit 3108 days ago
Okay, how much cost will it cost to run an Oracle for some existing API?
1 comments

An Oracle is just a program that movies data onto the blockchain for dapps to use.

The data is an input to a transaction that eventually results in the EVM storing that data into a contracts (dapps) memory (which you pay per byte) that can then be exposed to other dapps.

Thank for that explanation. How much would you say a simple Data input will cost?
So both instructions and memory uses something called gas. Right now 1 gas = 0.00000002 eth.

Now a MUL costs 5 gas and a ADD costs 3 for example. So you have to pay for contract complexity.

Now memory costs are not linear. The current gas cost equation for memory is Gmem * a * (a^2/512) where Gmem is a constant that is currently 3 and 'a' is the number of 255bit words (ints) you are storing.

This is for EVM internal memory that can later be accessed by the smart contract or other contracts. There is a way for contracts to output data that can be read out-of-band called logs but that is for getting data out of the EVM, not in.