2

Looking to add royalties for artists (up to 10%) whenever their art sells on a secondary market. Having trouble finding a specific mention of royalty transfers in rust onchain programs and was wondering if anyone had some insight on how to create one? Or if anything point me in the right direction? Thanks in advance.

3 Answers 3

2

In the new SPL 2022 Tokens, there is SPL level support for transfer fees.

https://github.com/solana-labs/solana-program-library/tree/master/token/program-2022/src/extension/transfer_fee

UPDATE:

Looking closer at the source, I'm not sure this would do what I expected. It's a new feature and documentation is scarce.

Looking at the source code though.

It looks like the new program may be subtracting quantity of the token being transferred, rather than requiring sol be present in the transaction to be paid to the fee withdraw authority.

If I understand that right, it's burning or "withholding" a portion of the transferred fungible token quantity on transfer, which would not allow for fee enforcement on NFTs as I had initially understood.

I do believe metaplex fee basis points + creator shares, as has been posted already, may be the only way to do this.

Though note that because metaplex extends the SPL token program, it can't enforce the fee transfer. The exchanges will generally honor it though, as I understand it.

2
  • 1
    it might help to elaborate how this feature of token-2022 might be used to implement the requested functionality
    – trent.sol
    Commented Jul 28, 2022 at 18:12
  • The token transfer fee is not meant for NFT, it withheld a % of the amount of the tokens transferred, later this fee can be withdrawn by the withdraw authority.
    – Sr.PEDRO
    Commented Nov 6 at 12:31
1

The Transfer Hook extension enables enforcement of NFT royalties. You don't want transfer fee extension for NFTs (per the other answer) since the transfer fee must be the same token mint (currency) as the NFT itself, which wouldn't make sense.

I don't think there's a specific royalty program right now, but check out the transfer hook extension guide to create your royalty enforcement program.

Specifically Transfer Hook with wSOl Transfer fee (advanced example):

In the next part of this guide, we will build a more advanced Transfer Hook program using the Anchor framework. This program will require the sender to pay a wSOL fee for every token transfer.

0

For providing royalties to creators, Metaplex has launched programmable NFTs, which guarantee 100% of the royalty to the specified address on every sale made on the marketplace.

https://developers.metaplex.com/token-metadata/pnfts

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.