Hot answers tagged

17

Buying/Selling uses the Bancor algorithm to sell the limited supply at market prices and buy it back at market prices when it is not needed anymore. Market prices will be impacted based upon speculation, actual demand for RAM, and increasing capacity provided by block producers.


14

Yes you're on the right track. Running cleos -u https://nodes.get-scatter.com:443 get table eosio eosio rammarket gives you: { "rows": [{ "supply": "10000000000.0000 RAMCORE", "base": { "balance": "67254241906 RAM", "weight": "0.50000000000000000" }, "quote": { "balance": "1021789.6640 EOS", "weight": "0....


13

Update 19th September: As of v1.3.0, it is now possible to delete the smart contract from an account using the --clear flag ($ cleos set contract <account> --clear) To make a small contract, I suggest not using cpp or eosiocpp/eosio-cpp at all. The smallest contract I managed to upload on chain takes 0.392 KiB and it's written in webassembly: ...


11

/libraries/chain/include/eosio/chain/config.hpp defines setcode_ram_bytes_multiplier to 10x the number of bytes of the compiled WASM. This covers the overhead of the VM and other memory. This is the base amount just for the code. From here there are other constants you can review: overhead_per_row_pper_index_ram_bytes = 32 + sizeof(key) + row data for ...


11

Traditionally, price discovery is achieved through buying and selling with bids and asks. Liquidity, or the relative ability to move larger sums of assets with low price slippage, was created by market makers, or large financial institutions who's job it is to continue buying and selling. Bancor's price discovery is dictated by a formula. This effectively ...


10

You can use the buyram action of system contract. The above transaction can be performed using cleos as shown below. cleos --url <jungle-testnet-url> system buyram <payer-account> <receiver-account> --kbytes 1000


6

When a record is created, the user specified in the emplace call will be charged for the RAM usage. A subsequent modify call on that record will specify a user (possibly different) that will be charged. That user will incur the storage cost of the entire row, and the original user (if different) will have their RAM returned to them for use elsewhere. When ...


6

For some examples, you can check the sizes of the wasm files in EOSIO contracts (sizes are approximate): $ ls -l eos/build/contracts/* | grep wasm | awk 'BEGIN {print "SIZE \t NAME"} {sum+= $5; n++; print $5/100"KB " $NF} END {print "average: " sum/n/100"KB"}' SIZE NAME 44.05KB asserter.wasm 345.34KB dice.wasm 59.9KB eosio.bios.wasm 217.36KB eosio.msig....


6

Yes, I believe that your understanding is correct, as confirmed in a discussion on Telegram Developers Channel pasted below--Todd Fleming is a contributor to EOSIO codebase: 16th of August User: is there any way for an user to remove RAM allocated that they own ? let’s say that I own a malicious contract that once an action hit, check ram of user, and ...


6

There is currently no method to know which tables your RAM is sitting in. The only way you could figure this out is to look at everything you ever did, check the code for the smart contracts where you did it, and try to figure out from that where your RAM is.


6

EOS account can choose to buy ram or cpu? Can they not buy any at all? You need RAM for the nodes to store data about your account,--including account name, public keys, and other meta-data--in the blockchain state. CPU and NET are needed for executing the transaction that creates your account and storing that transaction on the blockchain, respectively. ...


5

The forumula is ambiguous over "when" in time you read the balance (before or after). For all of my testing I was never able to get the paper's formula to work without giving profits to users.


5

UPDATE: Updated the code to compile with eosio.cdt version 1.6.1. I finally got it working nicely! Parsing the token symbol in the action parameters was especially complicated. The other solution posted has a couple of issues that will prevent you from clearing all the RAM properly: It doesn't delete the stat table, leaving there some info about the ...


4

According to Dan Larimer, in Dawn 4 RAM can be bought at the current market price. If, later on, the RAM is no longer needed, the developer can sell the RAM at the then current market price. Depending on the state of the blockchain, the developer may realize a profit or a loss on the sale. There is also a 1% market fee involved in these transactions that ...


4

Please read Introducing EOSIO Dawn 4.0 where it is explained in details. The TL;DR is that RAM will be bought and sold at market price (but that's an oversimplification - you should refer to the article).


4

After considerable thought and discussions with other people, I affirm that there is no error in Rosenfeld's Bancor paper as Dan Larimer suggests. Therefore, there seems to be no theoretical explanation (so far) for the individual formulas implemented in convert_to_exchange and convert_from_exchange at exchange_state.cpp (EOSIO Dawn 4.0). https://github....


4

userb picks up the entire ram cost. usera gets their ram back: reference here: https://github.com/EOSIO/eos/blob/v1.0.8/libraries/chain/apply_context.cpp#L459


4

This line indicates that passing 0 in the payer argument keeps the existing payer for the entry. https://github.com/EOSIO/eos/blob/v1.0.8/libraries/chain/apply_context.cpp#L456


4

I don't know how you calculated your contracts RAM consumption, but the devil lies in the details. Index Basics Using an index is always connected to sacrify some memory for speed. This is a well researched database topic. An index is an optimized datastructure with some overhead which organizes data records e.g. in an tree like structure. You can read ...


3

You can do that by simply running cleos get account youraccount, also you can check it out in https://eosflare.io Finally, if you want to have a better understanding about EOS RAM and Bandwith check my study here: https://steemit.com/eos/@leordev/eos-ram-and-bandwith-analysis-airdropping-steps-on-junglenet I hope it helps you!


3

Minimum requirements: 4GB RAM 2 cores The auto build script (./eosio_build.sh) capures your OS and selects the build script in ~/eos/scripts/ for your OS. You can nano your OS's build shell and perform the change in the photos below. cd ~/eos/scripts sudo nano eosio_build_ubuntu.sh Ubuntu: Mac: Fedora Amazon Centos I got the photos from this ...


3

Usage of RAM for an account: $ cleos get account <account_name> Maximum RAM of the network (max_ram_size): $ cleos get table eosio eosio global Unused RAM of the network: $ cleos get table eosio eosio rammarket


3

You answered your own question in a few minutes, but I'll post this anyway since I typed it out. Let's say you deploy an eosio.token contract that allows users to create their own 0 balance to opt into an air drop. That's ~188kb for you and ~0.3kb per user to create their row. That user has committed RAM to have the ability to execute a transfer command in ...


3

You can buy more RAM for your account xxxxx: cleos system buyram xxxxx xxxxx "10 EOS"


3

1.What is chainbase used for? we can find the answer in : about chainbase 2.when we add a new object (i.e., row) to the table by Multi-Index such as class addressbook: contract { struct address { uint64_t account_name; string first_name; string last_name; string street; string city; string ...


3

I don't think the other answers clarify this aspect, so I'll post this as well: I just can't figure out why token transfers on EOS are stored in (expensive) RAM and not just simply in the blockchain? Token transfers are stored in the blockchain, not in RAM. The balances for tokens are stored in RAM for the reasons mentioned in other answers, but the ...


2

Just a quick shot: Search for blocked/still available names and namespaces like it's done when buying an domain online Cost calculator for creating an account


2

Great idea, I would love to use that. If you need any help, I may use some spare time to participate. in addition to 5. voting: stats for BPs (e.g. how long have they have been active as BP, missed DPoS turns etc.) history of voting for freezing accounts, change account code, protocol/constitution changes 8) When added to EOSIO, information about EOS ...


2

From the white paper "Bandwidth and computation have two components, instantaneous usage and long-term usage. A blockchain maintains a log of all Actions and this log is ultimately stored and downloaded by all full nodes. With the log of Actions, it is possible to reconstruct the state of all applications." State including RAM, this ability it gives the ...


2

EOS is designed to allow developers creating new business models. Maybe this part of the whitepaper helps you. Delegating Capacity A holder of tokens on a blockchain launched adopting the EOS.IO software who may not have an immediate need to consume all or part of the available bandwidth, can delegate or rent such unconsumed bandwidth to others;...


Only top voted, non community-wiki answers of a minimum length are eligible