3

I am new to blockchain and i am trying to play with blockchain so I used metaplex and candy-machine to upload and mint dummy nft's which is working fine. The opensource repositories that I am playing with are below:

https://github.com/metaplex-foundation/metaplex https://github.com/exiled-apes/candy-machine-mint

Then for learning purposes, I wanted to divide minting and secondary sales into more than one wallet so I changed JSON and added three test wallets into the creator's array.

{
  "name": "#0",
  "symbol": "%$%",
  "description": "description goes here",
  "seller_fee_basis_points": 500,
  "image": "image.png",
  "external_url": "",
  "edition": 0,
  "attributes": [
    {
      "trait_type": "Background",
      "value": "Street"
    }
  ],
  "properties": {
    "files": [
      {
        "uri": "image.png",
        "type": "image/png"
      }
    ],
    "category": "image",
    "creators": [
      {
        "address": "<public address 1>",
        "share": 34
      },
      {
        "address": "<public address 1>",
        "share": 33
      },
      {
        "address": "<public address 1>",
        "share": 33
      }
    ]
  }
}

But the problem is splitting is happening on secondary sales and not on minting. On minting the wallet set as treasury resource is getting all amount. I want to split the transaction amount on minting too.

Abdulmoiz Ahmer
  • 1,953
  • 17
  • 39
  • 2
    After contacting the Solana blockchain developer it came to my attention this is not possible for minting. Mint fee goes entirely to the treasury wallet. – Abdulmoiz Ahmer Oct 29 '21 at 23:09
  • I have been researching this same question. Can you elaborate a bit on what you learned? Who was the source of this information? Do you know if this a limitation of Candy Machine or Solana (or perhaps something else)? – emersonthis Nov 25 '21 at 00:59
  • 1
    I have learned that a candy machine allows only one wallet for minting but secondary sales can be divided into multiple wallets using a metadata array of creators. The Source of information was metaplex devs. I think this is a candy machine limitation but I am not sure on this one. – Abdulmoiz Ahmer Nov 26 '21 at 01:02
  • I think you're right. I posted an answer with a quote form the metaplex docs about the metadata spec that suggest what you want to do should be possible, in theory. – emersonthis Nov 26 '21 at 23:16

2 Answers2

2

Interestingly, I found this quote in the metaplex documentation:

The SPL Metadata program supports storing up to five co-creators that share potential future profits from sales for the items as defined by seller_fee_basis_points . Each creator needs to be added as part of the minting process and is required to approve metadata that was used in his name using the sign_metadata endpoint. Unverified artwork cannot be sold with Metaplex.

During the first sale, creators share in 100% of the proceeds, while in follow up sales, they share in proceeds as a percentage determined by seller_fee_basis_points. Whether or not a metadata is considered in second sale or not is determined by the primary_sale_happened boolean on the Metadata account.

My interpretation of this is that the expected behavior should be for the initial sale to get divided between creators using the ratios defined by each creator's share. Sounds like you're experiencing something different.

Keep in mind that this documentation is for the parent project. Candy-machine-mint seems to be a fork and they may have altered some of that behavior.

emersonthis
  • 32,822
  • 59
  • 210
  • 375
  • This does indeed seem to be the case. Which leads to the follow-up question: How is the splitting of this minting fee from the treasury wallet usually handled? – Torantula Nov 29 '21 at 22:45
  • @Torantula my best answer to your follow-up question is that the documentation I quoted above is incorrect. From conversations with others in the Solana community, it appears that the initial minting fee is paid entirely to the wallet that created the NFT. This also matches the behavior described by the OP. – emersonthis Nov 30 '21 at 23:01
2

The source code of the code of the contract you are intersted in can be found here: https://github.com/metaplex-foundation/metaplex-program-library/blob/master/nft-candy-machine/program/src/lib.rs

At line 247 the transfer of sol is called to a single treasury address of the candy machine. To change it to multiple addresses this contract would have to be updated and redeployed.

Another alternative I have seen deployed in the solana community atm is a second contract which will split the funds evenly. Unfortunately, the creator of this contract has been charging for it and has not open-sourced it yet. They can be found on the metaplex discord if you are interested.

Sean O
  • 302
  • 1
  • 9