1

I want to understand Solana rent and it's relation to the CLI usage. I understand the basics, that you need 2 years worth of rent in order to be rent-exempt but I have several questions in order to reach a better understanding:

I have wallet keypair keypair.json

I run:

solana account keypair.json

Balance: 2.95953572 SOL 
Owner: 11111111111111111111111111111111
executable: false
Rent Epoch: 280 

Should I assume that rent is 280 lamports per. Epoch? Do I need to calculate this based on how many epochs in two year to figure out what sol is required for rent exempt? Isn't there an easier way simply find out rent-exempt requirements if I have the keypair file or even just the public key of an account? Usage of "solana rent" command is confusing since I have no idea of the "data length" of my account.

When running the following commands in order to create different types of accounts can I always assume that enough Sol is automatically put into the account for it to be rent-exempt?

spl-token create-account
spl-token create-multisig

When creating a nonce account i'm required to specify the amount to put into the nonce account? If I'm using this nonce account temporarily for a multisig process how much SOL should I put in there?

solana create-nonce-account nonce-keypair.json 1

1 Answers1

2

If you want to know how rent is calculated you can use the solana rent CLI command.

For example, any account in the system that is not a data account (i.e. has no data requirement) will display the rent exempt minimal fee:

solana rent 0

Rent per byte-year: 0.00000348 SOL
Rent per epoch: 0.000002439 SOL
Rent-exempt minimum: 0.00089088 SOL

For program data accounts (i.e. any account that is created to be owned by a program to read/write state to) will be a higher cost because of the storage needs. Let's assume your program stores a PublicKey (32 bytes) in an account, then rent for that account is calculated:

solana rent 32

Rent per byte-year: 0.00000348 SOL
Rent per epoch: 0.000003048 SOL
Rent-exempt minimum: 0.0011136 SOL
Frank C.
  • 7,758
  • 4
  • 35
  • 45
  • I presume a wallet is not a "data account". I also presume a Nonce account is a "data account". But is multisig a "data account"? – Börkur Jónsson Jan 29 '22 at 14:53
  • You can test any account to determine: `solana account PUBKEY_BASE58STRING` – Frank C. Jan 31 '22 at 10:16
  • Could someone explain how to get . Docs say: Length of data field in the account to calculate rent for, or moniker: [nonce, stake, system, vote]. Who is writing these docs... my god – Digital Dom Aug 07 '22 at 10:48