Network
Launch Date
Consensus
Note
Sepolia
Oct 2021
PoW
Like-for-like representation of Ethereum
Görli
Jan 2019
PoA
Proof-of-Authority
Kiln
Mar 2022
PoS
Post-Merge (for ETH2), shadow fork of the mainnet
Kintsugi
Dec 2021
PoS
DEPRECATED, use Kiln; post-Merge (for ETH2)
Ropsten
Nov 2016
PoW
DEPRECATED, use Sepolia; the Merge to happen on Jun 8, 2022
Rinkeby
Apr 2017
PoA
DEPRECATED, use Görli and Görli Faucet
Kovan
Mar 2017
PoA
DEPRECATED, use Sepolia or Görli
List of active and deprecated Ethereum testnets, including Kintsugi.
Features
Optimistic rollup 
ZK-rollup 
Proof
Uses fraud proofs to prove transaction validity. 
Uses validity (zero-knowledge) proofs to prove transaction validity. 
Capital efficiency
Requires waiting through a 1-week delay (dispute period) before withdrawing funds. 
Users can withdraw funds immediately because validity proofs provide incontrovertible evidence of the authenticity of off-chain transactions. 
Data compression
Publishes full transaction data as calldata to Ethereum Mainnet, which increases rollup costs. 
Doesn't need to publish transaction data on Ethereum because ZK-SNARKs and ZK-STARKs already guarantee the accuracy of the rollup state. 
EVM compatibility
Uses a simulation of the Ethereum Virtual Machine (EVM), which allows it to run arbitrary logic and support smart contracts. 
Doesn't widely support EVM computation, although a few EVM-compatible ZK-rollups have appeared. 
Rollup costs
Reduces costs since it publishes minimal data on Ethereum and doesn't have to post proofs for transactions, except in special circumstances. 
Faces higher overhead from costs involved in generating and verifying proofs for every transaction block. ZK proofs require specialized, expensive hardware to create and have high on-chain verification costs. 
Trust assumptions
Doesn't require a trusted setup. 
Requires a trusted setup to work. 
Liveness requirements
Verifiers are needed to keep tabs on the actual rollup state and the one referenced in the state root to detect fraud. 
Users don't need someone to watch the L2 chain to detect fraud. 
Security properties 
Relies on cryptoeconomic incentives to assure users of rollup security. 
Relies on cryptographic guarantees for security. 
Start building
on Alchemy.
Sign up for free
Start building on Optimism.
Sign up for free
Start building on Arbitrum.
Sign up for free
Start building on Ethereum.
Sign up for free
Start building on Polygon.
Sign up for free
Start building on Starknet.
Sign up for free
Start building on Flow.
Sign up for free
kiln faucet
Get free Kiln ETH.
Start building today
Goerli faucet
Get free Goerli ETH.
Start building today
mumbai faucet
Get free Mumbai Matic.
Start building today
rinkeby faucet
Get free Rinkeby
ETH.
Start building today
Start building on Ethereum.
Get started for free
Start building on Ethereum.
Get started for free
Start building on Flow.
Get started for free
Start building on Polygon.
Get started for free
Start building on Starknet.
Get started for free
Start building on Optimism.
Get started for free
Start building on Solana.
Get started for free
Start building on Solana.
Sign up for beta access
Start building on Solana.
Join the waitlist
Arbitrum logo
Start building on Arbitrum.
Get started for free
Learn
Solidity at
Alchemy
University
Get started today
curl 
https://release.solana.com/v1.10.32/solana-install-init-x86_64-pc-windows-msvc.exe 
--output 
C:\solana-install-tmp\solana-install-init.exe 
--create-dirs
Solana
CANDY MACHINE OVERVIEW

What is Candy Machine v2? A Complete Guide

Everything You Need to Know About Metaplex's Candy Machine v2
Last Updated:
July 21, 2022

Candy Machine is a Solana-based program developed by Metaplex Studios, an NFT ecosystem for marketplaces, games, and arts & collectibles, to reliably sell non-fungible tokens (NFTs). The studio and its community have been moving fast to support several thousand NFT developers and the most popular Solana NFT collections and creators who are interested in launching their very own NFT projects on the Solana blockchain network.

Metaplex is a collection of tools, smart contracts, and other technologies that have been designed to make the process of minting and releasing NFTs simpler. Metaplex has three major projects; Token Metadata, Candy Machine, and Auction House.

For the purposes of this article, we will solely focus on Candy Machine, often described as working like the gumball-style candy machine where users insert one token to receive an NFT.

The program uses the Metaplex command line interface (CLI) to generate an NFT, connect relevant metadata and an image to the NFT token, and ultimately set-up a fair auction. This implies that end-users are unable to purchase NFTs ahead of the mint time and once the limit of NFT mints has been reached, no more are generated.

In addition to generative NFTs, creators can also generate 1-of-1 NFTs or even semi-fungible tokens for their respective communities. Moreover, Candy Machine’s name has been derived from a real-world mechanical candy machine. This is because there is a general expectation that once an individual puts a token into the machine, they will only receive one item. Of course, there are some exceptions such as when the Candy Machine will return your token if there are no more NFTs left to mint.  

What is the difference between Candy Machine v1 and v2?

The second version of Candy Machine provides many functionality improvements over its predecessor. In general, the latest version of the program enables new distribution possibilities and offers enhanced protection from bot attacks, all packaged in the same easy-to-use interface.

As a result of the upgrade, Candy Machine v1 has been deprecated and is no longer supported. This means that creating a new instance of Candy Machine v1 is no longer possible and end-users are encouraged to use Candy Machine v2 instead.

In Candy Machine v2, Metaplex has introduced improvements associated with how end-users configure Candy Machine and new settings that enable mint pausing at a certain point. In addition, any configuration value can be updated. Nevertheless, here are a few features that developers and creators can be excited about:

1. Unpredictable Mint Index

In the previous version of Candy Machine, it was feasible to estimate the specific NFT that would be minted during a generative NFT launch because the mint would happen in a sequential order.

This non-randomized order created the opportunity to be able to choose which NFT to mint, given that all of the information about the items was available on-chain. This provided an unfair advantage to NFT collectors with developer backgrounds.

The second-iteration eliminates this possibility by using an unpredictable mint index, which is not possible to predict. This functionality ensures that there’s a level playing field when it comes to minting NFTs using Candy Machine v2. 

2. Captcha Settings

By incorporating Captchas, mints have now been limited to humans which means far fewer bots. While there are Solana NFT communities that give access to NFT minting bots through their own NFT collection and token-gated Discord, Candy Machine's Captcha settings make it more difficult to auto-mint NFTs using bots.

3. Whitelist

Users now have the ability to create numerous configurations for NFT whitelists where users can mint before the official start date, obtain NFTs at discounted prices, or even have exclusive access to mints. Because any SPL token can be used to create whitelists, it is up to the project creator's discretion how they are distributed. 

4. Large Collection Support and Hide-and-Reveal Drops

Using version 2 of Candy Machine it is now possible to create large collections and hide-and-reveal drops by specifying a single hash. Though the hash is the same across all the mints, the name of each item is specified with a unique number, allowing an off-chain process to later update the metadata with the actual item. 

What can you build with Candy Machine v2?

Using Candy Machine v2, developers and creators can set up their own Solana NFT shops, add a mint page to their website, and safely launch a successful NFT project.

According to Metaplex, over 11.5 million NFTs have been minted using the organization’s protocols which have provided standards & tools for more than 100,000 projects and online communities. 

How does Candy Machine v2 work?

Once you have downloaded the prerequisite Solana developer tools and configured your machine, you should be able to create a new Candy Machine that is ready to mint tokens after initial deployment.

Creators who are interested in providing a convenient end-to-end consumer experience should consider providing a frontend minting experience to allow the community the chance to mint as well.

Metaplex’s native user interface supports a variety of configurations of Candy Machine v2 such as whitelisting (for both pre-sale and discounts) and end-settings (i.e., automatically adapting the UI components depending on whether the whitelist token is detected or not.

What common problems does Candy Machine solve?

The motivation behind Candy Machine was to address problems with the way NFT drops were being managed and processed on the Solana blockchain. Some important problems that have been addressed in the latest update include the following: 

  • Acceptance of buyer funds even when the underlying project was out of NFTs to sell 
  • Not having a precise and global start time 
  • Projects were not producing consistent, valid NFTs 
  • Structuring NFT metadata correctly 
  • Protection from persistent NFT bot attacks 
  • Creating an on-chain collection of NFTs for authentication purposes

In general, there was a clear need to create an easier way to solve the most fundamental problems that buyers, sellers, and marketplaces experienced in the NFT landscape. Metaplex’s Candy Machine addresses these shortcomings in a dynamic way. 

Why is it best to build an NFT drop with Candy Machine?

There are a few reasons why developers should consider using Candy Machine. Even though globally recognized NFT creators use automated minting tools similar to Candy Machine, the Metaplex-developed tool is highly recommended because it is now a fully on-chain distribution program for NFTs.

Today, Metaplex’s tool has become common across the industry as a result of its inherent utility, noteworthy documentation, and logic to combat threats such as bot attacks. In conjunction with Strata's Dynamic NFT Pricing Mint tool, creators can reliably launch NFT campaigns on Solana with a simple toolkit.

What is a Candy Machine ID?

Each NFT project using Candy Machine to mint NFTs, is always designated with a unique identifier (ID), which developers can use to verify the authenticity of the underlying asset on the Solana blockchain. If the NFT was supposedly generated on Candy Machine but lacks a Candy Machine ID (CMID), users should be cautious of minting, buying, or trading for the NFT. 

Because each project has a specific CMID, NFT bots will analyze the Solana blockchain to find listed CMIDs and try to mint the NFT before the launch starts. Because NFT sniping tools exist, come NFT projects create honeypots, or fake CMIDs that accept SOL tokens, but don't return an NFT, to deter bots.

How to Deploy Candy Machine v2

There are a few important steps to follow to ensure Candy Machine v2 is up-and-running. To start, you will need the following Solana development tools downloaded on your local machine.

If running the program on Mac OS with the Apple M1 chip, additional dependencies will be required.  

  1. Git - an open-source and distributed version control system 
  2. Node - an open-source JavaScript (JS) runtime environment that executes JS code outside a web browser 
  3. Yarn - software packaging system developed by Meta Platforms for the Node.js Javascript runtime environment
  4. TypeScript Node - a TypeScript-based execution environment
  5. Solana CLI - a command-line interface to interact with the Solana blockchain 
  6. Metaplex - a command-line interface to interact with Metaplex 

1. Install Metaplex Candy Machine v2

Developers can clone the Metaplex repository by pulling the CLI from GitHub. Subsequently, by downloading the relevant dependences, end-users should be able to compile and run the software. Nonetheless, users should check whether everything has been installed properly and ensure that they have defined environment variables.

2. Set up a Solana Wallet

Connect a relevant Solana wallet and add funds to create and deploy a Candy Machine. Users can either rely upon an existing keypair with funds or create a new keypair specifically for this project. Then, add funds.

3. Configure Candy Machine

Maintain your choice of settings across areas such as whitelisting, Captcha protection, and gatekeeper settings. The Candy Machine reads a JSON file that can be adjusted to your preferences. 

4. Prepare Your NFTs

As the Candy Machine is a distribution program for NFTs, it’s important for it to be loaded with your project’s artwork and metadata. Once you have completed the initial preparation, it is critical that you verify that the files are ready to be uploaded. In fact, the Candy Machine CLI provides the verify_assets command to check that uploaded assets are in the correct format. 

5. Deploy the Candy Machine

Once you verify that your keypair has funds and your assets have been uploaded appropriately, you are ready to deploy the candy machine. In addition, you can also confirm whether the upload is ready to be deployed using the Candy Machine CLI. 

6. Mint Tokens

Now that you have completed the majority of the initialization steps, your Candy Machine is ready to mint Solana NFTs. Depending on configurations, it is either restricted to whitelist users or the goLiveDate has not been reached yet. Nevertheless, the owner of the Candy Machine should be ready to mint tokens. 

7. Sign Mints

Once you have finished minting, you may want to consider you will want to sign your NFTs to verify yourself as the creator. Being verified means that the creator with that wallet address has signed the NFT, proving that they are the actual creator.

Typically, the verified creator will be the Candy Machine by default. This permits the broader marketplace, storefronts, and CLIs to search for NFTs that were minted by a Candy Machine seamlessly and with trust. For example, you could use a Solana-based NFT analytics tool that relies on data being parsed through by a Solana API. 

8. Set Up a Website

For the most convenient setup, creators are encouraged to use the frontend UI provided by Metaplex. More information on creating a frontend for your NFT mint, or how to use Candy Machine v2, refer to the official documentation Metaplex.

Congratulations! You’re all set and ready to mint your very first NFT using Candy Machine v2.

ALCHEMY SUPERNODE - ETHEREUM NODE API

Scale to any size, without any errors

Alchemy Supernode finally makes it possible to scale blockchain applications without all the headaches. Plus, our legendary support will guide you every step of the way.

Get started for free
Supernode footer
Solana
CANDY MACHINE OVERVIEW

What is Candy Machine v2? A Complete Guide

Everything You Need to Know About Metaplex's Candy Machine v2
Last Updated:
July 21, 2022
Don't miss an update
Sign up for our newsletter to get alpha, key insights, and killer resources.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Candy Machine is a Solana-based program developed by Metaplex Studios, an NFT ecosystem for marketplaces, games, and arts & collectibles, to reliably sell non-fungible tokens (NFTs). The studio and its community have been moving fast to support several thousand NFT developers and the most popular Solana NFT collections and creators who are interested in launching their very own NFT projects on the Solana blockchain network.

Metaplex is a collection of tools, smart contracts, and other technologies that have been designed to make the process of minting and releasing NFTs simpler. Metaplex has three major projects; Token Metadata, Candy Machine, and Auction House.

For the purposes of this article, we will solely focus on Candy Machine, often described as working like the gumball-style candy machine where users insert one token to receive an NFT.

The program uses the Metaplex command line interface (CLI) to generate an NFT, connect relevant metadata and an image to the NFT token, and ultimately set-up a fair auction. This implies that end-users are unable to purchase NFTs ahead of the mint time and once the limit of NFT mints has been reached, no more are generated.

In addition to generative NFTs, creators can also generate 1-of-1 NFTs or even semi-fungible tokens for their respective communities. Moreover, Candy Machine’s name has been derived from a real-world mechanical candy machine. This is because there is a general expectation that once an individual puts a token into the machine, they will only receive one item. Of course, there are some exceptions such as when the Candy Machine will return your token if there are no more NFTs left to mint.  

What is the difference between Candy Machine v1 and v2?

The second version of Candy Machine provides many functionality improvements over its predecessor. In general, the latest version of the program enables new distribution possibilities and offers enhanced protection from bot attacks, all packaged in the same easy-to-use interface.

As a result of the upgrade, Candy Machine v1 has been deprecated and is no longer supported. This means that creating a new instance of Candy Machine v1 is no longer possible and end-users are encouraged to use Candy Machine v2 instead.

In Candy Machine v2, Metaplex has introduced improvements associated with how end-users configure Candy Machine and new settings that enable mint pausing at a certain point. In addition, any configuration value can be updated. Nevertheless, here are a few features that developers and creators can be excited about:

1. Unpredictable Mint Index

In the previous version of Candy Machine, it was feasible to estimate the specific NFT that would be minted during a generative NFT launch because the mint would happen in a sequential order.

This non-randomized order created the opportunity to be able to choose which NFT to mint, given that all of the information about the items was available on-chain. This provided an unfair advantage to NFT collectors with developer backgrounds.

The second-iteration eliminates this possibility by using an unpredictable mint index, which is not possible to predict. This functionality ensures that there’s a level playing field when it comes to minting NFTs using Candy Machine v2. 

2. Captcha Settings

By incorporating Captchas, mints have now been limited to humans which means far fewer bots. While there are Solana NFT communities that give access to NFT minting bots through their own NFT collection and token-gated Discord, Candy Machine's Captcha settings make it more difficult to auto-mint NFTs using bots.

3. Whitelist

Users now have the ability to create numerous configurations for NFT whitelists where users can mint before the official start date, obtain NFTs at discounted prices, or even have exclusive access to mints. Because any SPL token can be used to create whitelists, it is up to the project creator's discretion how they are distributed. 

4. Large Collection Support and Hide-and-Reveal Drops

Using version 2 of Candy Machine it is now possible to create large collections and hide-and-reveal drops by specifying a single hash. Though the hash is the same across all the mints, the name of each item is specified with a unique number, allowing an off-chain process to later update the metadata with the actual item. 

What can you build with Candy Machine v2?

Using Candy Machine v2, developers and creators can set up their own Solana NFT shops, add a mint page to their website, and safely launch a successful NFT project.

According to Metaplex, over 11.5 million NFTs have been minted using the organization’s protocols which have provided standards & tools for more than 100,000 projects and online communities. 

How does Candy Machine v2 work?

Once you have downloaded the prerequisite Solana developer tools and configured your machine, you should be able to create a new Candy Machine that is ready to mint tokens after initial deployment.

Creators who are interested in providing a convenient end-to-end consumer experience should consider providing a frontend minting experience to allow the community the chance to mint as well.

Metaplex’s native user interface supports a variety of configurations of Candy Machine v2 such as whitelisting (for both pre-sale and discounts) and end-settings (i.e., automatically adapting the UI components depending on whether the whitelist token is detected or not.

What common problems does Candy Machine solve?

The motivation behind Candy Machine was to address problems with the way NFT drops were being managed and processed on the Solana blockchain. Some important problems that have been addressed in the latest update include the following: 

  • Acceptance of buyer funds even when the underlying project was out of NFTs to sell 
  • Not having a precise and global start time 
  • Projects were not producing consistent, valid NFTs 
  • Structuring NFT metadata correctly 
  • Protection from persistent NFT bot attacks 
  • Creating an on-chain collection of NFTs for authentication purposes

In general, there was a clear need to create an easier way to solve the most fundamental problems that buyers, sellers, and marketplaces experienced in the NFT landscape. Metaplex’s Candy Machine addresses these shortcomings in a dynamic way. 

Why is it best to build an NFT drop with Candy Machine?

There are a few reasons why developers should consider using Candy Machine. Even though globally recognized NFT creators use automated minting tools similar to Candy Machine, the Metaplex-developed tool is highly recommended because it is now a fully on-chain distribution program for NFTs.

Today, Metaplex’s tool has become common across the industry as a result of its inherent utility, noteworthy documentation, and logic to combat threats such as bot attacks. In conjunction with Strata's Dynamic NFT Pricing Mint tool, creators can reliably launch NFT campaigns on Solana with a simple toolkit.

What is a Candy Machine ID?

Each NFT project using Candy Machine to mint NFTs, is always designated with a unique identifier (ID), which developers can use to verify the authenticity of the underlying asset on the Solana blockchain. If the NFT was supposedly generated on Candy Machine but lacks a Candy Machine ID (CMID), users should be cautious of minting, buying, or trading for the NFT. 

Because each project has a specific CMID, NFT bots will analyze the Solana blockchain to find listed CMIDs and try to mint the NFT before the launch starts. Because NFT sniping tools exist, come NFT projects create honeypots, or fake CMIDs that accept SOL tokens, but don't return an NFT, to deter bots.

How to Deploy Candy Machine v2

There are a few important steps to follow to ensure Candy Machine v2 is up-and-running. To start, you will need the following Solana development tools downloaded on your local machine.

If running the program on Mac OS with the Apple M1 chip, additional dependencies will be required.  

  1. Git - an open-source and distributed version control system 
  2. Node - an open-source JavaScript (JS) runtime environment that executes JS code outside a web browser 
  3. Yarn - software packaging system developed by Meta Platforms for the Node.js Javascript runtime environment
  4. TypeScript Node - a TypeScript-based execution environment
  5. Solana CLI - a command-line interface to interact with the Solana blockchain 
  6. Metaplex - a command-line interface to interact with Metaplex 

1. Install Metaplex Candy Machine v2

Developers can clone the Metaplex repository by pulling the CLI from GitHub. Subsequently, by downloading the relevant dependences, end-users should be able to compile and run the software. Nonetheless, users should check whether everything has been installed properly and ensure that they have defined environment variables.

2. Set up a Solana Wallet

Connect a relevant Solana wallet and add funds to create and deploy a Candy Machine. Users can either rely upon an existing keypair with funds or create a new keypair specifically for this project. Then, add funds.

3. Configure Candy Machine

Maintain your choice of settings across areas such as whitelisting, Captcha protection, and gatekeeper settings. The Candy Machine reads a JSON file that can be adjusted to your preferences. 

4. Prepare Your NFTs

As the Candy Machine is a distribution program for NFTs, it’s important for it to be loaded with your project’s artwork and metadata. Once you have completed the initial preparation, it is critical that you verify that the files are ready to be uploaded. In fact, the Candy Machine CLI provides the verify_assets command to check that uploaded assets are in the correct format. 

5. Deploy the Candy Machine

Once you verify that your keypair has funds and your assets have been uploaded appropriately, you are ready to deploy the candy machine. In addition, you can also confirm whether the upload is ready to be deployed using the Candy Machine CLI. 

6. Mint Tokens

Now that you have completed the majority of the initialization steps, your Candy Machine is ready to mint Solana NFTs. Depending on configurations, it is either restricted to whitelist users or the goLiveDate has not been reached yet. Nevertheless, the owner of the Candy Machine should be ready to mint tokens. 

7. Sign Mints

Once you have finished minting, you may want to consider you will want to sign your NFTs to verify yourself as the creator. Being verified means that the creator with that wallet address has signed the NFT, proving that they are the actual creator.

Typically, the verified creator will be the Candy Machine by default. This permits the broader marketplace, storefronts, and CLIs to search for NFTs that were minted by a Candy Machine seamlessly and with trust. For example, you could use a Solana-based NFT analytics tool that relies on data being parsed through by a Solana API. 

8. Set Up a Website

For the most convenient setup, creators are encouraged to use the frontend UI provided by Metaplex. More information on creating a frontend for your NFT mint, or how to use Candy Machine v2, refer to the official documentation Metaplex.

Congratulations! You’re all set and ready to mint your very first NFT using Candy Machine v2.

Candy Machine is a Solana-based program developed by Metaplex Studios, an NFT ecosystem for marketplaces, games, and arts & collectibles, to reliably sell non-fungible tokens (NFTs). The studio and its community have been moving fast to support several thousand NFT developers and the most popular Solana NFT collections and creators who are interested in launching their very own NFT projects on the Solana blockchain network.

Metaplex is a collection of tools, smart contracts, and other technologies that have been designed to make the process of minting and releasing NFTs simpler. Metaplex has three major projects; Token Metadata, Candy Machine, and Auction House.

For the purposes of this article, we will solely focus on Candy Machine, often described as working like the gumball-style candy machine where users insert one token to receive an NFT.

The program uses the Metaplex command line interface (CLI) to generate an NFT, connect relevant metadata and an image to the NFT token, and ultimately set-up a fair auction. This implies that end-users are unable to purchase NFTs ahead of the mint time and once the limit of NFT mints has been reached, no more are generated.

In addition to generative NFTs, creators can also generate 1-of-1 NFTs or even semi-fungible tokens for their respective communities. Moreover, Candy Machine’s name has been derived from a real-world mechanical candy machine. This is because there is a general expectation that once an individual puts a token into the machine, they will only receive one item. Of course, there are some exceptions such as when the Candy Machine will return your token if there are no more NFTs left to mint.  

What is the difference between Candy Machine v1 and v2?

The second version of Candy Machine provides many functionality improvements over its predecessor. In general, the latest version of the program enables new distribution possibilities and offers enhanced protection from bot attacks, all packaged in the same easy-to-use interface.

As a result of the upgrade, Candy Machine v1 has been deprecated and is no longer supported. This means that creating a new instance of Candy Machine v1 is no longer possible and end-users are encouraged to use Candy Machine v2 instead.

In Candy Machine v2, Metaplex has introduced improvements associated with how end-users configure Candy Machine and new settings that enable mint pausing at a certain point. In addition, any configuration value can be updated. Nevertheless, here are a few features that developers and creators can be excited about:

1. Unpredictable Mint Index

In the previous version of Candy Machine, it was feasible to estimate the specific NFT that would be minted during a generative NFT launch because the mint would happen in a sequential order.

This non-randomized order created the opportunity to be able to choose which NFT to mint, given that all of the information about the items was available on-chain. This provided an unfair advantage to NFT collectors with developer backgrounds.

The second-iteration eliminates this possibility by using an unpredictable mint index, which is not possible to predict. This functionality ensures that there’s a level playing field when it comes to minting NFTs using Candy Machine v2. 

2. Captcha Settings

By incorporating Captchas, mints have now been limited to humans which means far fewer bots. While there are Solana NFT communities that give access to NFT minting bots through their own NFT collection and token-gated Discord, Candy Machine's Captcha settings make it more difficult to auto-mint NFTs using bots.

3. Whitelist

Users now have the ability to create numerous configurations for NFT whitelists where users can mint before the official start date, obtain NFTs at discounted prices, or even have exclusive access to mints. Because any SPL token can be used to create whitelists, it is up to the project creator's discretion how they are distributed. 

4. Large Collection Support and Hide-and-Reveal Drops

Using version 2 of Candy Machine it is now possible to create large collections and hide-and-reveal drops by specifying a single hash. Though the hash is the same across all the mints, the name of each item is specified with a unique number, allowing an off-chain process to later update the metadata with the actual item. 

What can you build with Candy Machine v2?

Using Candy Machine v2, developers and creators can set up their own Solana NFT shops, add a mint page to their website, and safely launch a successful NFT project.

According to Metaplex, over 11.5 million NFTs have been minted using the organization’s protocols which have provided standards & tools for more than 100,000 projects and online communities. 

How does Candy Machine v2 work?

Once you have downloaded the prerequisite Solana developer tools and configured your machine, you should be able to create a new Candy Machine that is ready to mint tokens after initial deployment.

Creators who are interested in providing a convenient end-to-end consumer experience should consider providing a frontend minting experience to allow the community the chance to mint as well.

Metaplex’s native user interface supports a variety of configurations of Candy Machine v2 such as whitelisting (for both pre-sale and discounts) and end-settings (i.e., automatically adapting the UI components depending on whether the whitelist token is detected or not.

What common problems does Candy Machine solve?

The motivation behind Candy Machine was to address problems with the way NFT drops were being managed and processed on the Solana blockchain. Some important problems that have been addressed in the latest update include the following: 

  • Acceptance of buyer funds even when the underlying project was out of NFTs to sell 
  • Not having a precise and global start time 
  • Projects were not producing consistent, valid NFTs 
  • Structuring NFT metadata correctly 
  • Protection from persistent NFT bot attacks 
  • Creating an on-chain collection of NFTs for authentication purposes

In general, there was a clear need to create an easier way to solve the most fundamental problems that buyers, sellers, and marketplaces experienced in the NFT landscape. Metaplex’s Candy Machine addresses these shortcomings in a dynamic way. 

Why is it best to build an NFT drop with Candy Machine?

There are a few reasons why developers should consider using Candy Machine. Even though globally recognized NFT creators use automated minting tools similar to Candy Machine, the Metaplex-developed tool is highly recommended because it is now a fully on-chain distribution program for NFTs.

Today, Metaplex’s tool has become common across the industry as a result of its inherent utility, noteworthy documentation, and logic to combat threats such as bot attacks. In conjunction with Strata's Dynamic NFT Pricing Mint tool, creators can reliably launch NFT campaigns on Solana with a simple toolkit.

What is a Candy Machine ID?

Each NFT project using Candy Machine to mint NFTs, is always designated with a unique identifier (ID), which developers can use to verify the authenticity of the underlying asset on the Solana blockchain. If the NFT was supposedly generated on Candy Machine but lacks a Candy Machine ID (CMID), users should be cautious of minting, buying, or trading for the NFT. 

Because each project has a specific CMID, NFT bots will analyze the Solana blockchain to find listed CMIDs and try to mint the NFT before the launch starts. Because NFT sniping tools exist, come NFT projects create honeypots, or fake CMIDs that accept SOL tokens, but don't return an NFT, to deter bots.

How to Deploy Candy Machine v2

There are a few important steps to follow to ensure Candy Machine v2 is up-and-running. To start, you will need the following Solana development tools downloaded on your local machine.

If running the program on Mac OS with the Apple M1 chip, additional dependencies will be required.  

  1. Git - an open-source and distributed version control system 
  2. Node - an open-source JavaScript (JS) runtime environment that executes JS code outside a web browser 
  3. Yarn - software packaging system developed by Meta Platforms for the Node.js Javascript runtime environment
  4. TypeScript Node - a TypeScript-based execution environment
  5. Solana CLI - a command-line interface to interact with the Solana blockchain 
  6. Metaplex - a command-line interface to interact with Metaplex 

1. Install Metaplex Candy Machine v2

Developers can clone the Metaplex repository by pulling the CLI from GitHub. Subsequently, by downloading the relevant dependences, end-users should be able to compile and run the software. Nonetheless, users should check whether everything has been installed properly and ensure that they have defined environment variables.

2. Set up a Solana Wallet

Connect a relevant Solana wallet and add funds to create and deploy a Candy Machine. Users can either rely upon an existing keypair with funds or create a new keypair specifically for this project. Then, add funds.

3. Configure Candy Machine

Maintain your choice of settings across areas such as whitelisting, Captcha protection, and gatekeeper settings. The Candy Machine reads a JSON file that can be adjusted to your preferences. 

4. Prepare Your NFTs

As the Candy Machine is a distribution program for NFTs, it’s important for it to be loaded with your project’s artwork and metadata. Once you have completed the initial preparation, it is critical that you verify that the files are ready to be uploaded. In fact, the Candy Machine CLI provides the verify_assets command to check that uploaded assets are in the correct format. 

5. Deploy the Candy Machine

Once you verify that your keypair has funds and your assets have been uploaded appropriately, you are ready to deploy the candy machine. In addition, you can also confirm whether the upload is ready to be deployed using the Candy Machine CLI. 

6. Mint Tokens

Now that you have completed the majority of the initialization steps, your Candy Machine is ready to mint Solana NFTs. Depending on configurations, it is either restricted to whitelist users or the goLiveDate has not been reached yet. Nevertheless, the owner of the Candy Machine should be ready to mint tokens. 

7. Sign Mints

Once you have finished minting, you may want to consider you will want to sign your NFTs to verify yourself as the creator. Being verified means that the creator with that wallet address has signed the NFT, proving that they are the actual creator.

Typically, the verified creator will be the Candy Machine by default. This permits the broader marketplace, storefronts, and CLIs to search for NFTs that were minted by a Candy Machine seamlessly and with trust. For example, you could use a Solana-based NFT analytics tool that relies on data being parsed through by a Solana API. 

8. Set Up a Website

For the most convenient setup, creators are encouraged to use the frontend UI provided by Metaplex. More information on creating a frontend for your NFT mint, or how to use Candy Machine v2, refer to the official documentation Metaplex.

Congratulations! You’re all set and ready to mint your very first NFT using Candy Machine v2.

Build web3 with Alchemy

Alchemy combines the most powerful web3 developer products and tools with resources, community and legendary support.

Get started for free