2

I have minted 1000 items using sugar and candy machine in devnet, and everything is fine. now I have created new wallet in mainnet and tried to mint, but I am getting Error running command (re-run needed): AccountNotFound: pubkey=2nXfP... Which I guess is because I don't have sol in it.

So, if I am not wrong with the process, anyone please tell me how much it costs to mint 1000?

1
  • Others have outlined the costs, but the reason you were not able to mint is because your Candy Machine collection was on devnet, and you tried to mint on mainnet.
    – Chris
    Oct 3, 2022 at 4:25

4 Answers 4

3

You can use this tool to calculate the cost for creating the Candy Machine: https://www.feecalc.live/

5
  • it shows 1.67 for 1000 items, which is cool, but sugar and candy machine costs me a lot. idk why
    – Amanullah
    Aug 5, 2022 at 13:08
  • Sugar doesn't have a cost, is just a CLI tool. The cost you pay is the rent for the Candy Machine, which you can recover when you close the Candy Machine after the mint. The tool above shows you how much the Candy Machine will charge you.
    – Andres
    Aug 5, 2022 at 13:17
  • so if this is for candy machine, how much would it be to mint 1000 items? any way to get discounts on bulk mint? cuz as of now, it is counting individual
    – Amanullah
    Aug 5, 2022 at 14:33
  • There isn't any blockchain where you get discounts for bulks. You pay the Blockchain gas for every instruction you send to the Blockchain. If you will mint the NFT yourself, you don't need a Candy Machine. A Candy Machine is a mint contract for generative art projects. What are you trying to do? Mint the NFTs for an airdrop?
    – Andres
    Aug 5, 2022 at 14:38
  • nope, I have created a collection of 1000 items, just wanted to bulk mint them instead of minting 1 by 1. also we can't directly mint sol into opensea. and regarding bulk mint, i red somewhere that, if we bulk mint, it would cost as much as minting 1 nft. in eth i guess not sure.
    – Amanullah
    Aug 5, 2022 at 14:45
2

A NFT in Solana is represented using 4 accounts.

  1. Mint account -> the spl account
  2. ATA -> A PDA that is the space in ur wallet that your mint account will be stored
  3. (Master) Edition Account -> This account is the main difference between a NFT with FT, SFT.
  4. Metadata Account -> Store all the metadata of the NFT (Name, uri pointing to the json file, creators, royalties, etc).

When you mint 1 NFT you have to pay the rent for all this 4 accounts + gas, this will cost you ~0.012 SOL per NFT.

Knowing that 1 NFT cost 0.012 SOL, then 1000 NFTs will cost you 12 SOL.

I give a really basic explanation of the accounts, I invite you to read some of the accounts that are created here and an explanation on how NFTs are represented on solana here

1

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.

3
  • well it seems that it cost me way more than expected. I tried in devnet by airdropping 10 sol to my account and then tried to mint. it has gone somewhere below 100 and if we count it as 100, then it will cost 10 SOL per 100 which is 100 SOL for 1000 nfts. first i used with nft storage, then with bundlr, both are same. disabling authority gives me this error "Error running command (re-run needed): Candy Machine Error: CandyCollectionRequiresRetainAuthority: Retain authority must be true for Candy Machines with a collection set" I thought bulk mint would cost lesser, but its same.
    – Amanullah
    Aug 5, 2022 at 8:07
  • I'm pretty sure I'm missing a lot of instructions and data accounts for Metaplex standard. It's more to give you an example and you do the rest ;)
    – vicyyn
    Aug 5, 2022 at 8:09
  • I followed this docs.metaplex.com/tools/sugar/installation instruction, which very simple and clear. still, idk why it costs me so much
    – Amanullah
    Aug 5, 2022 at 13:09
-1

Apparently I'm too new to comment, so here goes.

Knowing that 1 NFT cost 0.012 SOL, then 1000 NFTs will cost you 12 SOL.

This is a great answer and absolutely correct at the time of posting just stumbled on this and wanted to give an update! Metaplex now adds a .01 SOL fee to each mint tx.

1
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Dec 31, 2023 at 23:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.