Search code examples
metaplexserum-dex

Handling royalty fees payments when trading semi-fungible SPL Tokens


We are building a Solana based application which will mint Semi-Fungible tokens (for Fungible Assets) let people trade them.

What we want next is to add metadata to this mint through which we are also going to set the creators and the seller fee basis points for royalty payments. We know how to do this and we have done it.

Anyway, the problem is the following: all the docs available on Metaplex we’ve seen are revolving around NFTs, Master Editions, Printing Editions, Auctions, etc. - which is not the case for us as we need to mint more than one token from the same mint.

The most important thing is to manage to benefit from the royalty fees each time shares are being traded on the secondary market. So we don't need auctions, vaults or other mechanisms like these.

  1. Initially, we were thinking about Serum, but we don’t know whether Serum also takes care of transferring the royalty fee to the creators when the funds are settled.

  2. After Serum, we’ve looked at the examples in the Metaplex documentation about Metaplex Storefronts, but, as I said above, that was really focusing on NFTs, Master Editions, Printing Editions, Auctions, etc. - which don’t seem to fit our use case of Fungible Asset. Maybe can this be customized for our Fungible Assets use case somehow?

Would you be so kind to help us clear up a little bit what approach is the best for our use case and our needs?


Solution

  • Serum v4 (not released on mainnet yet) does support Metaplex royalties (see this commit). It should be released on mainnet in the coming weeks/month.

    I am not aware of any other smart contract on Solana which supports this feature. However, you could probably create your own fork of an open source AMM and add a logic similar to the commit above.