eos icon indicating copy to clipboard operation
eos copied to clipboard

RAM costs for new accounts (i.e. incremental costs for dApp user acquisitions) are too high

Open 7-of-9 opened this issue 8 years ago • 61 comments

If one of the goals of EOS is to be able to very large platforms (e.g. social network), then how can 4kb * 0.015 EOS RAM cost per account be within the desirable tolerances?

0.5-1.0 USD per account simply can't work if your target is to create tens or hundreds of million user accounts for your dApp!

Am I missing something, e.g. is there any way for a dApp creator to somehow reclaim RAM costs for dormant or inactive user accounts that it has created?

7-of-9 avatar Jun 17 '18 07:06 7-of-9

Yeah, if we want to open account for 10k user you cant simply fork out USD10k right? that would be insane

fundurian avatar Jun 17 '18 09:06 fundurian

I am investigating EOS for an application where we plan on having several million accounts with our own currency. Each wallet will have a small number of tokens, and most of them will be inactive. After reading this, do I understand correctly that we will have to stake several million dollars worth of EOS just to give everyone a wallet?

If this is correct, this is a serious issue that needs to be corrected if EOS wants to be a realistic choice for new token launches. It makes no sense that every account needs to be kept in RAM at all times. Can the guys at Blockone please clarify this, and if the problem is as stated in this ticket, come up with a workaround for this problem?

BreakingSiam avatar Jun 17 '18 13:06 BreakingSiam

@BreakingSiam - completely agree. This is a show-stopper and huge limitation factor. Not only this, but the problem only gets worse as EOS/USD increases.

One idea I'm toying with: creating new accounts on a private EOS net (i.e. SYS-denominated nodeos BP instance), and only "migrating" the accounts' keypairs to mainnet for "paying" user accounts. But it's clearly a disgusting hack.

7-of-9 avatar Jun 17 '18 15:06 7-of-9

ram is really expensive now

sportsminer avatar Jun 17 '18 16:06 sportsminer

I believe it's a more existential problem than current RAM prices. Clearly, meaningful storage needs to be paid for, but in commercial terms the storage costs of a new "empty" account need to be zero, for the same reasons that transaction fees need to be zero.

7-of-9 avatar Jun 17 '18 16:06 7-of-9

Build a SQL table of all your user's accounts, and only use the chain for recording transfers between them (e.g. transaction type "myapp_transfer" with data {"from": "myuser1", "to": "myuser2", "amount": "0.2 mytokens"}). Then you have a chain-certified transfer for every real transaction that happens in your app, and anyone can just sum all the transfers to verify who has what balance. You'll only need one eos account (your app) and some cpu/bandwidth for executing the transactions. Obviously not the best solution, but it works. If you want to use EOS's user system and don't want to pay for accounts then ask that people register their own EOS account before connecting it to your app. You can offer a "registration service" where someone pays you ETH and you use an equivalent amount of EOS to make an account for them, then send them the private key and have them do an updateauth on it to replace its owner and active keys with their own generated keys.

PeterGaivoronski avatar Jun 18 '18 01:06 PeterGaivoronski

Certainly we can come up with off chain solutions. In fact, why even use the chain at all?

I always assumed the contract would be the party responsible for allocating RAM, not the individual's account. That makes so much more sense. Then, the necessary RAM is limited to the number of simultaneous transactions for any smart contract, which is very small.

I just can't understand why Blockone would choose such an obviously broken model. Whatever problem it solved for them surely couldn't have justified the downsides. It is absurd for millions of user accounts to have dedicated RAM. At any given time only a tiny fraction of a percent of them are actually executing transactions. This model makes the entire system unacceptably expensive for all but the most trivial real world applications.

If the understanding of operation presented in this ticket is correct, then Dan needs to step up and do something about it. Because if he doesn't, someone will fork the project and do it the right way, leaving EOS to wonder why it failed, and leaving investors unwilling to trust Dan on his next ICO.

BreakingSiam avatar Jun 18 '18 02:06 BreakingSiam

@PeterGaivoronski thanks - all reasonable workarounds. However, the target is to make signup as user friendly as Facebook, i.e. users shouldn't need to know about wallets, private keys, or create accounts elsewhere and then import them.

And us (the dApp owner) ever seeing, receiving or storing our users' privkeys is completely outside of acceptable scope for our project: we need to be truly decentralized, with privkeys only ever living in the user's browser session.

If I understand correctly, previous beta versions of EOS didn't have the RAM cost tied to accounts. I agree with @BreakingSiam -- this is an enormous barrier to dApp development. I was (still am) very impressed with EOS technical fundamentals, but such a glaringly obvious (deliberate??) limitation does make me question the motivation: this seems to effectively price out startups from the EOS platform.

7-of-9 avatar Jun 18 '18 03:06 7-of-9

Another consideration is that, based on Dan's video, 2 TB is the practical limit on RAM they are considering. Since the recommended figure for RAM per user account is 4KB, and because this must be guaranteed, it puts a limit of less than 500 million total EOS users. This system means that for our application to work, which envisions installing software on the phones at the factory, we would need to own 20% of all EOS tokens.

Seriously? We have to purchase a fifth of the network in order to process a few hundred thousand transactions a month? TWO BILLION dollars??? Yes, there are registration workarounds that we could do (which would make it more difficult for the user), but the easiest workaround is actually to do our own POA side chain on Ethereum and ignore EOS altogether.

It is too bad, because I really do like the technology. I had great hopes for EOS. But if this is correct, it seems that nobody at Blockone has actually considered the needs of stakeholders.

BreakingSiam avatar Jun 18 '18 03:06 BreakingSiam

What do you think about the following solution. Assuming that users interact with a EOS-based services not directly, but through a custom UI / middleware solution. The service can dynamically delegate resources before each user request in a separate action that is signed by the owner of the service and broadcasted by the user(the custom UI in fact) together with the main action in a single transaction. And later undelegate resources from inactive accounts. That way we don't have to pre-delegate resources before user actually needs to interact with the service.

For example, let's say a user wants to send a friend request in a decentralized social network (friendRequest action). Let's assume that initially the user account has no delegated network resources. When pressing the 'Add Friend' button in the UI the following happens:

  1. The UI sends request to a backend service to receive the JSON of the delegatebw action and its signature. The staked amounts are calculated based on the action that needs to be performed by the user.
  2. The UI constructs the friendRequest action and signs it with the user's private key.
  3. Both actions are packed in the same transaction with 2 signatures one for each action.
  4. The transaction is sent to the network.

I'm not too familiar with how signatures work in case of a multi-action/multi-party transaction, but am wondering if this is the right direction.

andr11111 avatar Jun 18 '18 18:06 andr11111

@andrei-anisimov Interesting scenario, but I don't think it addresses the user RAM cost issue, e.g. in your example, consider the user who wants to send the friendRequest action.

How does that user's EOS account get created initially, and who pays for the minimum RAM requirement of that new account?

7-of-9 avatar Jun 19 '18 03:06 7-of-9

completely agree! Our company also have this problem. We have to prepare a lot of EOS for the user register. If BlockOne didn't solve this problem, I don't think there will have a lot of Dapp on EOS. Unless every ordinary people have his own EOS account.

red-butterfly avatar Jun 19 '18 07:06 red-butterfly

Also get an issue about RAM Fee. Today, I issued a token on EOS called XToken, and then I transferred XToken to another EOS account. I found that I was charged RAM fee for the transaction. I'm wondering what's the reasons behind this design? EOS transfer is free, while new token is charged. This will prevent developers to issue tokens on EOS. Remember that ETH grows because lots of people use it to issue tokens.

walnutown avatar Jun 19 '18 07:06 walnutown

After studying this issue in depth, I believe Github is the wrong forum to correct this problem. This is a fundamental problem with the vision of what EOS is supposed to be. I have started a thread on EOS Go to ask everyone to delay launch of the mainnet until this issue is corrected.

If you have thoughts you would like to share, please express them politely over there. This issue is big enough and ubiquitous enough that it needs to be thoroughly discussed and we need to get Dan involved to explain the thought process. Only by delaying the mainnet launch can we expect this to happen.

https://forums.eosgo.io/discussion/1459/please-vote-no-on-eos-mainnet-launch-until-ram-issue-is-properly-addressed

BreakingSiam avatar Jun 19 '18 10:06 BreakingSiam

I sent a tweet to Dan about this. Let's see if he can make a statement.

BreakingSiam avatar Jun 19 '18 10:06 BreakingSiam

0.5-1.0 USD per account simply can't work if your target is to create tens or hundreds of million user accounts for your dApp!

why would you go through the hassle and create a DApp for millions of users without a solid revenue stream?

other than that, yep, what happens if the limit is reached? no new users?

btsfav avatar Jun 19 '18 15:06 btsfav

it would appear that the price of ram can be regulated. there is a function called setram in the eosio.system contract which can be used to expand the current ram supply which leads to a mechanical decrease in the price of ram (due to the bancor algo)

who has the authority to call setram?

whoever has the auth is basically the FOMC / central bank of RAM on EOS

marketstack avatar Jun 19 '18 19:06 marketstack

whoever has the auth is basically the FOMC / central bank of RAM on EOS

setram is a system action that is privileged, and so can be adjusted by consensus. There's no one party that can unilaterally adjust supply.

dskvr avatar Jun 20 '18 06:06 dskvr

I found that I was charged RAM fee for the transaction.

@walnutown Did you publish your own eosio.token contract or did you create/issue with the network's eosio.token contract?

dskvr avatar Jun 20 '18 06:06 dskvr

The issue under consideration isn't actually the price of RAM or who can set the value.

The issue is that the current RAM model requires user accounts to have dedicated RAM. This is not a credible way to allocate RAM. It is hostile to the dApp developer community, who need to be able to create thousands to millions of user accounts, many of which will not be used. This is done to improve the user experience. Forcing the end user to know anything at all about EOS acts as an obstacle to user acceptance of the dApp.

The problem here is the very nature of what EOS is. Is it a tool for dApps, or is it some kind of operating system for end users? Block One seems to have designed it as the latter, which is a huge mistake, because this does not service the dApp community.

Failure to correct this model and make the RAM allocation a function of the contract, and not of the user, will lead to a fork of EOS with another system taking the correct action, which will ultimately prevail because the dApps, which are the real value of a blockchain, will choose the alternate system over EOS.

The price is largely irrelevant. Anything more than zero to create an account is too expensive.

BreakingSiam avatar Jun 20 '18 09:06 BreakingSiam