Skip to main content
17 votes
Accepted

How does buying and selling RAM work on EOS?

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 ...
bytemaster's user avatar
  • 1,434
14 votes
Accepted

How to get current (last) RAM price?

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": ...
Vlad's user avatar
  • 885
13 votes
Accepted

How to calculate the RAM size of a contract in EOSIO and then i can know how much EOS i need to pay for every contract

/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 ...
bytemaster's user avatar
  • 1,434
13 votes
Accepted

Removing contract to release RAM - the smallest contract possible

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 ...
confused00's user avatar
  • 5,554
11 votes
Accepted

What is the Bancor algorithm and how it is used for RAM trading?

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 ...
Nat's user avatar
  • 3,425
10 votes
Accepted

How to increase RAM on Jungle testnet?

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> <...
Umesh Maheswari's user avatar
7 votes

How can I see where I'm using my EOS RAM?

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 ...
Phillip Hamnett - EOS42's user avatar
6 votes
Accepted

Who will get the ram back when delete records?

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 ...
John Haager's user avatar
  • 1,844
6 votes
Accepted

Clearing RAM tables of eosio.token contract

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 ...
Andres Berrios's user avatar
6 votes

What is the typical RAM size of smart contract?

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++; ...
confused00's user avatar
  • 5,554
6 votes
Accepted

Is there a flaw in deciding who can pay for RAM?

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: ...
confused00's user avatar
  • 5,554
6 votes

I'm still wrapping my head around EOS RAM and CPU resources. How do they work exactly?

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 ...
confused00's user avatar
  • 5,554
5 votes

Is there a math error in Bancor paper?

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.
bytemaster's user avatar
  • 1,434
4 votes

How does buying and selling RAM work on EOS?

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. ...
John Haager's user avatar
  • 1,844
4 votes

How does buying and selling RAM work on EOS?

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 ...
Vlad's user avatar
  • 885
4 votes
Accepted

Is there a math error in Bancor paper?

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 ...
Sergio A. Yuhjtman's user avatar
4 votes
Accepted

How is the ram reallocated when a table is modified?

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
Tal Muskal's user avatar
4 votes
Accepted

How can the payer for the modified table = 0?

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
Tal Muskal's user avatar
4 votes

How RAM was allocated in dapp and how to optimize the table?

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 ...
tmm's user avatar
  • 2,114
3 votes
Accepted

How to calculate memory quota, net bandwidth and cpu bandwidth limit in an account?

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 ...
Leo Ribeiro's user avatar
  • 3,023
3 votes
Accepted

Can I build EOSIO with less than 7GB of RAM? | Answer: Yes

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 ...
Nat's user avatar
  • 3,425
3 votes
Accepted

How can we know the usage of ram for eos?

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 ...
confused00's user avatar
  • 5,554
3 votes
Accepted

Do I get RAM back after deploying a contract?

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 ...
Nat's user avatar
  • 3,425
3 votes

How to solve "Account using more than allotted RAM usage"?

You can buy more RAM for your account xxxxx: cleos system buyram xxxxx xxxxx "10 EOS"
lemon's user avatar
  • 133
3 votes
Accepted

What is the ChainBase database used for?

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 ...
fen chen's user avatar
  • 163
3 votes
Accepted

Why do token transfers on EOSIO consume RAM?

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 ...
confused00's user avatar
  • 5,554
3 votes

When to use RocksDB compared to Chainbase?

RocksDB intended use is to perform better than Chainbase with data sets that have larger (64KiB+) data associated with the average row in the database and data access patterns that favor fewer highly ...
Sergey Metelin's user avatar
2 votes

What EOS Chain Information/Interaction do you wish was more publicly available?

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
Lau's user avatar
  • 203
2 votes
Accepted

What EOS Chain Information/Interaction do you wish was more publicly available?

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 ...
tmm's user avatar
  • 2,114
2 votes
Accepted

How RAM is managed between PBs

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 ...
John Williamson's user avatar

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