How to create an NFT Index Fund
Last updated
Last updated
One of the advantages of using the NFTX platform is the permissionless way in which anyone can create a fund. Below are the steps you need to go through to create a fund yourself.
Note: SushiSwap is currently having issues listing the tokens on the frontend, which should be resolved shortly.
Funds created on NFTX are currently only for Ethereum-based NFTs, and the following contract types are supported for fund creation:
ERC721
ERC1155
Once you have confirmed you are creating a fund for one of the supported NFT formats listed above, you can move to the next step.
You must have at least one NFT for the fund you plan to create. You will use this NFT to add your first asset to the fund/vault.
The next thing to do is head over to https://nftx.org/#/backend****
After connecting with your wallet, you will notice there are two (2) contracts, NFTX and XStore. We will be primarily using NFTX for this tutorial.
Choose the Write
action from the [...]
dropdown menu next to the NFTX Contact.
Scroll through the list until you see the CreateVault
function where you will need to fill in four (4) fields. We've used Twerky Pepes as an example in the tutorial:
Name of fund: Twerky Pepe (This is the name your fund token will have)
Token Name: TWERKY (Try to keep the token name simple. One word, if possible. No dashes. Seven (7) characters or fewer, if possible.)
Contract Address: 0xf4680c917A873E2dd6eAd72f9f433e74EB9c623C (the NFT contract address)
D2 Vault: false
If you are unsure what the contract address is for your NFT, you can find it in the Chain Info dropdown menu on your NFT OpenSea page (you can also get an individual Token ID from here).
Clicking on the link will take you to Etherscan where you can copy the address. Keep that Etherscan page open; you'll need it soon.
Once you've got those details, click on CreateVault
to advance in creating your first NFT index fund. At this point, you will get a prompt from MetaMask to pay Gas for the transaction.
Once you get confirmation that the process has been completed, you will need to find the vaultID
.
Every fund that is created gets its own vaultID. You will need to finish setting up the vault. In the future, these steps will be taken care of for you through a new frontend.
You should still be on https://nftx.org/#/backend, but this time we need to interact with the XStore contract.
Copy the XStore contract address, 0xBe54738723cea167a76ad5421b50cAa49692E7B7 and head over to Etherscan.
Paste in the contract address and go down to Contracts → Read Contract.
Alternatively, here's a link: https://etherscan.io/address/0xBe54738723cea167a76ad5421b50cAa49692E7B7#readContract
Scroll to the bottom of the page until you come across vaultsLength
which will show how many funds have been created. The image below shows thirty-two (32) vaults, but because the vaultID's start at 0 the latest vault created will be number 31.
For our purposes, our vaultID
was number 29 when we created the TWERKY fund.
Now that we have the vaultID
, we need to confirm what type of fund this is and finalise, but before we do that, let's double check that we've got the right ID.
While still in the XStore Contract, move down to function number 33, xTokenAddress, and add the vaultID
(in our example, 29).
This provides us with the address for the token as a link to that contract on Etherscan. Click the link and you will be able to see what the token contract address is.
As you can see, the Token Tracker contains the name and the token for the fund we just created. If this doesn't match your fund, someone might have created a new fund just after you, so try the preceding or following vaultID
.
This step is only required if you are creating an ERC1155 fund, otherwise skip to Step 3: Finalising the vault.
Return to the https://nftx.org/#/backend and choose the NFTX Write
function again, except this time instead of creating a vault we want to use setIs1155
.
Include the vaultID as 29 (which is the vaultID for TWERKY) in the first field and the value "true" for the second field.
This will require a bit (but not much) more gas, as it involves another transaction. Confirm the transaction on the MetaMask prompt.
Once that has been completed, it's time to finalise your vault.
We've almost finished.
Head back to https://nftx.org/#/backend and into the NFTX → Write
option again. This time find the finalizeVault
function. Add the vaultID
you confirmed a couple of steps back (in our example, 29).
This is the final transaction for creating the Vault.
Congratulations, now you've created your first vault! 🦧🕳
Once you create your vault, you will not appear on the list of available funds on the NFTX.org site automatically. While it is permissionless to create funds, we want to manually approve them for display in order to prevent scams. You can still send people to your fund by providing them with a direct link, https://nftx.org/#/fund/vaultID, or in this case https://nftx.org/#/fund/29
Minting tokens isn't immediately possible until you have completed step 4. See the instructions below.
Your fund will not automatically be displayed on the NFTX Gallery site. This is done for two (2) reasons: to prevent scam funds from being promoted on the NFTX site AND because there are some image/content requirements for fund displays. If you would like to be added to the Gallery, please complete this form: https://docs.google.com/forms/d/e/1FAIpQLScnaUGFuz6-iyLTCeLhcLcFfxAdpPhGzGfxDtET7qgBIJO_xg/viewform. Once you complete and submit this form, we will review your fund.
Now that the fund has been created, we need to give permissions in order to mint NFTs into that fund.
We will need the Etherscan NFT Contract Address page for the next step(s).
As a reminder, the contract address for the NFT collection (not your fund) can be found listed in the Chain Info on an OpenSea page:
Now that you've got that link (in our example https://etherscan.io/address/0xf4680c917a873e2dd6ead72f9f433e74eb9c623c), visit it and move to Contract -> Write
.
In this step, we are specifying the NFTX Proxy contract to allow interacting with the NFT contract, with the intent to mint index fund tokens in step 5 of this tutorial.
Use the following information to fill in the setApprovalforAll
fields on Etherscan.
_operator: 0xAf93fCce0548D3124A5fC3045adAf1ddE4e8Bf7e (NFTX proxy contract)
_approved: true
This will require another transaction and transaction fee.
Now that you have set up your new NFT Index Fund and allowed Minting, you can start using your fund to create Index Fund tokens (ERC20) using Mint
.
This can be done from the frontend once the fund has been approved. If you don't want to wait, you can get started instantly on Etherscan by following the guide below.
Go to the NFTX contract address **0xAf93fCce0548D3124A5fC3045adAf1ddE4e8Bf7e , click on Contracts → Write as Proxy
, and then choose Mint
.
You want to include:
payableAmount — put a 0
vaultID — the vault you want to mint into (likely the one you just created)
nftids — you need to put these in [48] square brackets. You can mint more than one, but separate them with commas and no spaces i.e. [48,53,89]. These ID numbers are also listed on the OpenSea info.
d2Amount — put 0 into this field
Once you're happy, you can click Write
and it will ask you to confirm the transaction with your MetaMask.
Once completed, you can verify that the NFT has gone into the fund two ways.
First way: Check the OpenSea listing after a few minutes (takes a while to refresh) and you should see a transfer of ownership between you and NFTX.
Second way: Head to the XStore contract on Etherscan and run the Read Contract holdingsLength
which should return the number of NFTs in your new fund.
You're now a proud parent of an NFT Index Fund.
We weren't able to cover every scenario in this tutorial, but the instructors cover the process of creating your own fund. The current vault creation process is being refined by our team. Soon, the process will be simplified for our users.
Some things that weren't covered in this guide, but are possible, include:
Adding Allow Deny lists for Funds. This is great if you want to create a fund like Punk Zombie and only allow certain NFTs (the ones with Zombie traits) from the same collection (CryptoPunks) to be minted.
Allowing Allow ranges — This is great for funds like Art Blocks that are all on the same NFT Contract, but each project has its own distinctive range for their NFTs (based on the ID of the project).
If you have any suggestions or comments please drop by discord for a chat.