We have gathered the most popular inquiries and questions from clients with regards to the functioning and architecture of smart contracts used for the launch of NFTs (Non-fungible tokens). Questions have been answered by our Tech division at ROIexpress.com – so if you are looking to audit, create, launch, or deploy your own smart contract we will be happy to help!

How are smart contracts for ICOs different from smart contracts for NFTs?

A: While an ICO’s smart contract (Initial offering crowdsale for cryptocurrency) is structured around fundraising tiers and financing stages, an NFT’s smart contract is structured around the transfer of artwork, collectibles, or other assets that the NFT represents, as well as the asset’s associated data/metadata, etc.)

Why use smart contracts for NFTs if you can just mint your tokens using popular marketplaces such as OpenSea or KnownOrigin? What is the applicable use of smart contracts for NFTs?

A: There are many different types of NFL smart contract functionalities and NFT marketplaces. By creating your own smart contract, deploying it to a blockchain of your choice, and minting your own NFTs, a developer can then own a marketplace, cater to specific audiences, and have complete control over the NFT. However, the NFT would still be exchanged on some type of user-facing marketplace. In addition, smart contracts bring a whole new infrastructure within gaming, allowing users to “level-up” or “burn” NFTs. Another example of the smart contract infrastructure is the ability to whitelist users and allow them to purchase NFTs with ERC20/BEP20 tokens.

How does art generation work through smart contracts, and why is it not possible to foresee the rarity?

A: Generative art through a smart contract is algorithmically determined, computer-generated artwork that was created in whole or in part with the use of an autonomous system. The generative art’s rarity is impossible to foresee due to the random nature of the algorithms used for image generation.

How much gas is typically used during the execution of an NFT smart contract?

A: The price per gas these days is typically 100-150 gwei with a high ETH value. Years ago, it was generally lower, hovering around the 10-11 gwei rang with a low ETH value. For creating and deploying a decentralized app on the main Ethereum network, there are a few things that affect deploy costs, such as:

  • The units of gas used in the transaction.
  • The price per gas  based on traffic conditions.
  • Network congestion.
  • The value of ETH  based on the market.

Therefore, the total cost is Units * Price * Value. Let’s look at the CryptoPunks contract deployment from 2017 as a starting example. The following is derived from Etherscan’s transaction information:

  • UNITS of gas = 2,142,276 gas
  • PRICE per gas = 0.000000011 ETH per gas (or 11 gwei)
  • VALUE of ETH = $320.97 per ETH

TOTAL COST = 2,142,276 * 0.000000011 * $320.97

TOTAL COST = $7.56

For transactions: https://ethgasstation.info/

For every transaction on the blockchain (Ethereum), there is a series of computational steps that is executed. Each step requires resources, and the end-user pays the bill for the resources required to execute a transaction on the blockchain. Gas feels, like real-life gas fees, can vary. Gas prices are based on supply and demand, as well as the marketplace. The fees also will vary depending on the speed of the transaction. Higher execution speeds carry high gas prices. If you have more time to wait then you do not have to pay additional gas fees. Gas fees can, at times, exceed the actual price of the NFT by thousands of dollars.

The gas fee itself is separate from the price of Ether (ETH) and has nothing to do with Ether’s value directly. The gas fee is equivalent to a small fraction of Ether units that are called “gwei”. One gwei is equal to 0.000000001 ETH.

Gas fees, before the London hard fork, follow the model of an open auction. Users would bid for miners to accept their transactions. Now, after the London hard fork, users pay a variable base fee that even includes options for tipping the miner in order to prioritize their transactions. The price changes in maximum amounts of 12.5% – its previous block on the blockchain. Using BSC, Polygon and Solana will be cheaper than Ethereum.

Does the NFT smart contract need auditing? What are some potential technical issues that occur during a launch? What checks should be performed? Is it possible to do a test launch? If not, is there a test procedure that can be followed?

A: NFT smart contracts need auditing, and there is an extensive process to do so. There are numerous technical issues and cyber-attacks that can arise during launch. Oracle manipulations, reentrancy attacks, and other bug exploits are all issues to be aware of and to prepare for. Furthermore, there are basic logic and numerical errors that come from incorrect calculations. There are control authorization issues that can allow for unauthorized parties to slip through. Failure to run tests throughout the entirety of the development process will increase vulnerability. Clear goals and simple code will help keep procedures risk-free. It is possible to do a test-launch.

What technical infrastructure is needed to launch and deploy an NFT smart contract?

A: There is a plethora of platforms and technologies used to launch/deploy NFTs, and that does not include auditing.

Let’s say you are creating generative art. You need to code and create a unique art collection using data from somewhere as well as import the necessary packages. Once you have all the generative collection, you need to build the core of your NFT, which is its metadata. To do that, you need an understanding of JSON, which is kind of like a language to transport data. You then need a program, such as Pinata, to upload your NFT to the cloud. In order to handle the transferability and verify the NFT ownership, you need a smart contract. To do that, you need a whole environment setup. You can use something like Alchemy to skip the hard technical blockchain programming and jump into a developer platform. After you create your project there, you can add the project and your Metamask wallet to your test network. This allows you to use fake free ETH to test your network. You need to create your project and use Hardhat development environment to build the contract locally. You can use Solidity to write the contract and npm/web dev technology to deploy it.

How are smart contracts that are built on ETH, BSC, Polygon, and Solana different? What are some pros and cons of each?

A: ETH, BSC, Polygon, and Ethereum are based and written in Solidity while Solana is written in Rust. Solana contracts are stateless and represent just program logic. Ethereum contracts become immutable once they are executed. Solana features parallel smart contract runtime. Ethereum contracts are deployed to their individual accounts. Solana’s contract data and code are decoupled. Ethereum contracts have their logic and state combined into one contract deployed on-chain.

How much time does it take to build and deploy a typical smart contract? This does not include a complex smart contract.

A: The programming itself might not be so time-consuming, but it takes time to get proper requirements correct and to conduct testing. It can take months depending on what you’re trying to accomplish. A simple smart contract can be coded in a single day.

What are some tips when choosing a development team, such as what to look at and questions to ask?

A: With blockchain development still being so new, it’s very important to find developers who can learn new technologies and stay up to date with existing ones. It’s also very important to find someone with a strong fundamental understanding of the environments, technologies, and processes that go into developing and deploying a Dapp, NFT, etc. Specific questions about the functionalities and data design of the blockchain, as well as solidity/rust/web-dev technical and behavioral interviews, would be ideal.

What should you ask for from the development team to make sure you have won the smart contract once it is deployed. Additionally, how does one ensure the ownership is preserved?

A: You will need to check some sensitive variables and functions like withdraw function and double-check wallet address. Test script must be in place so that you can make sure the smart contract works properly. There are also additional considerations that should be checked.

Is an NFT smart contract reusable?

A: No, an NFT smart contract is not reusable.

Why is smart contract development more expensive than other frameworks?

A: There is a lot of cyber-security risk associated with smart contract development. It is also emerging tech and more lucrative because not as many people understand it. Currently, demand surpluses the supply of good trustworthy reliable developers.