In a previous post on EOS, I covered how RAM expenses were not so daunting as otherwise believed. My main concern was CPU restraints for the EOS system.
To this end, I sent an inquiry email to EOS New York, were I contacted my friend, Rick.
Rick made me aware of a couple of things concerning my post, one being their EOS calculator. I hope he does not mind me quoting him: "It's not live yet, but our goal in the next release is to give devs an indication of how many resources are needed to do a sample of actions (e.g., airdrop, run a game, run a simple smart contract) which will include estimates across all resources. We recognize this is important information for development planning purposes so we're working as fast as we can to deliver this."
For the time being, EOS New York does run a basic resource calculator at https://www.eosrp.io/#calc
Estimates Using the EOS Calculator
Let us imagine a basic smart contract, which occasionally posts some custom JSON to the blockchain based on transactions sent to the contract. We could imagine this is a paid registry contract, where a person pays a fee in EOS, and registers a custom JSON through the contract to validate they've been registered into some system. Keep in mind, I'm very ignorant of the specifics of doing things on EOS, so my estimates here could be wildly off such as EOS requiring certain variables declared that I am unaware of.
RAM Varaibles
- On/Off Kill Switch Variable (Boolean: 1 byte)
- EOS Master Key Public Address Reference (String: 53 bytes) ... EOS might use username instead
- Backup Master Account / Key (String: 53 bytes)
Approx Cost for 107 Bytes of RAM: 0.00963480 EOS (1 time fee) or $0.05 USD
Bandwidth
1 MB of Bandwidth, would be equivalent to posting about 500 pages of text. So 1 MB per day would mean a contract could post about 500 pages of text per day. This is a lot of bandwidth for a paid registry that is posting small custom JSON info to the blockchain. Meaning, we should be able to do with far, far less bandwidth.
A custom JSON registry might look like:
{"user": "sixteen890123456", "group": "user567890", "active": "1"}
In this example we see the maxlength of the string is 66 bytes. By the EOS Calculator, each registry costs: 0.00003265 EOS. This is about 0.0002 USD. One dollar then buys us about 5000 registries of this length. So if we had a system with 1 million registries, this would ultimately cost:
1 mil x 0.0002 USD = $200 in EOS
CPU
The processing for this type of contract would be small because ultimately it is simple code which just checks if the user sent the correct fee amount. An advanced contract might also poll some external data source to see if they were already registered, or on a blacklist for registry. Yet on modern processors, such calculations are trivial, taking less than a second to execute. One hundred executions, I would assume to be less than 0.1 seconds. I will just assume this is the expense, due to my ignorance.
100 executions arriving at one tenth of a second would cost 0.268 EOS or $1.41 USD. The large value here has me believing I probably over-estimated the cost.
If all 100 executions contained a minimal fee as part of the registry, then likely at $1.41 cost is trivial as well, assuming something like a $1 USD registry fee.
CPU Market to Launch (REX)
Rick also made me aware of the REX Proposal. In essence, it is a rental system for CPU usage. Token holders stake into the REX system, get a REX token which is a 1 for 1 with their EOS, and the CPU they were not utilized is now rented via the REX system. The details of he proposal can be found here: https://medium.com/@bytemaster/proposal-for-eos-resource-renting-rent-distribution-9afe8fb3883a
Presently, the main way to get any CPU at all is to just own EOS. Owning a capital asset just to use CPU is relatively expensive. Making a rental market will probably cause "expensive EOS CPU" hype as the prices bid on the marketplace, ultimately whatever that price is, it is cheaper than just outright buying EOS and holding it. If this is not so, then it would be profitable to just buy EOS instead of buying CPU, and we could buy EOS to sell the CPU and make a profit. While such a strange thing might happen initially for a brief period, when the market stabilizes to sane prices, it makes the CPU rental model a cheaper way to buy CPU.
Lowering CPU costs for developers is the main reason the REX proposal is going forward.
Published on
by crypto-investor
Great post. Thanks @crypto-investor
Thank you much, sir!
Great insight into the inner workings of EOS Ted. Resteemed for future reference! SK.
Posted using Partiko Android
Thank you, sir
Any update on a timeline for when we might actually see the REX implemented?
Sorry, no info in that regard.