Storage Limit and Account Minimum Balance

Important

Storage limit and account minimum balance were released on the emulator.

This is a breaking change. This also emulates what will be on the testnet in the near future. That is why it is highly recommended that you get familiar with this version of the emulator. However if you really need to, you can turn off storage limits and account minimum balance by running the emulator with a --storage-limit=false flag.

Description of changes

Each account now has storage used and storage capacity. Storage used is the byte size of all the data that is on that account. Storage capacity of an account depends on the amount of FLOW the account has. The conversion rate between FLOW and storage capacity is 1 megabyte per 1 FLOW.

An account can use storage up to its capacity. If a transaction would put an accounts storage used over its storage capacity the transaction fails and is reverted.

A minimum account balance of 0.1 FLOW is also introduced. This is so that accounts always have at least 100 kilobytes of storage. The minimum account balance is deducted from the account creator an put on the newly created account during account creation. Existing accounts on testnet and mainnet will be given the minimum account balance during the spork that will turn this on.

Impact

  • The 100kb minimum storage means most accounts wont need to worry about storage capacity.
  • If you have 100 FLOW on your account, you can’t withdraw 100 FLOW. If you are storing less then 100kB you can withdraw 99.9 FLOW. If you are for example storing 3MB you can only withdraw 97 FLOW.
  • To create an account the account creating it has to be at least 0.1 FLOW (100kb) below its storage capacity, because 0.1 FLOW will be moved to the new account.
  • If a transaction is adding an NFT to an account (or increasing its storage some other way), that same transaction can then check if the account is over capacity and also sent it some flow.

References

User doc that explains storage capacity and storage used - Storing Data on Flow - Flow Documentation
Documentation for the new cadence fields - Accounts - Flow Documentation

3 Likes

Just wanted to follow up on the above to clarify that specific cost for storage and conversion into required amount of FLOW mentioned above are just placeholder now. Those numbers were initially derived few months ago for reference.

Flow blockchain has been designed from day one with the intent to handle mainstream consumer scale adoption, so rest assured that accessibility, including cost of generating and maintaining accounts, is key factors being considered. Please stay tuned for more updates to come in the near future.

3 Likes

Some updated reference to minimum storage (account creation) and transaction fees. Please take it as relative reference until they are actually implemented and rolled out. Key Concepts - Flow Documentation

  • Account Creation: 0.001 FLOW
  • Transaction Fee: 0.000001 FLOW
1 Like

Could you please clarify if Minimum Account Balance is 0.1 or 0.001?

Yes the doc needs to be updated. Here is the latest announcement on storage minimum March 31 - Account Minimum Balance in Effect for Flow - #2 by unlocked