Each NFT
will require a transaction for creating the mint
(allocate the data instruction + initialize mint instruction) and allocating metadata
allocate the data
a mint
has a size of 82 bytes
.
Solana defines a constant cost as 1 byte per year and being rent exempt if you exceed 2 years. so
/// default rental rate in lamports/byte-year:
pub const DEFAULT_LAMPORTS_PER_BYTE_YEAR: u64 = 1_000_000_000 / 100 * 365 / (1024 * 1024);
/// default amount of time (in years) the balance has to include rent for:
pub const DEFAULT_EXEMPTION_THRESHOLD: f64 = 2.0;
this means a mint
account will require 82 * DEFAULT_LAMPORTS_PER_BYTES_YEAR * DEFAULT_EXEMPTION_THRESHOLD
Lamports
which is around ~0.0014 Sol
you can do the same to calculate the fee for creating a token account
(165 bytes) or custom accounts. You can also use getMinimumBalanceForRentExemption
initialize mint instruction
This is an instruction, no data allocation so it's a fixed fee of 5000 Lamports (currently)
allocating metadata
Metaplex metadata account is a data PDA that contains the nft metadata. It doens't have a fixed size so this will depend on how much metadata you allocate.
fee estimation
1000
NFT
82 bytes
mint
3
instructions: create mint, initialize mint, allocate metadata
500 bytes
metadata account
1000 *
( 0.0014
+ 3 * 5000
+ ( 500 * DEFAULT_LAMPORTS_PER_BYTES_YEAR * DEFAULT_EXEMPTION_THRESHOLD ))
which is around ~5 Sol
Don't take my calculations as 100% correct. I might be missing some instructions and you also have to take into consideration disabling mint authority
etc... This is just an example to help, you have to finish the rest.