5

This may be a noob question, but does any know how a market like Nifty or any similar nft marketplace actually implement paying a "creator share" or royalty back to the original creator after any secondary market sales? Would this be included somewhere in the actual ERC-721 smart contract itself or are they tracking/disbursing these creator shares another way, some sort of logic layer that's tracking the transactions?

To be clear, I'm talking about a secondary sale within the same marketplace, not referring to any implementations of EIP-2981.

2
  • I'm trying to figure this out myself. From what I can tell so far it appears that places like open sea just charge a percentage when traded through their contract and then pay part of that to the creators in batches. If they are traded directly there are no Royalties. Once I figure it out I'll post a full answer unless someone beats me to it which would save me some time.
    – sschueller
    Mar 30, 2021 at 16:32
  • @sschueller did you find answer? May 11, 2022 at 21:25

2 Answers 2

0

I see you are not talking about the EIP-2981 specifically, but one way could be implementing the EIP2981 and calling it on transfers instead of just the minting part.

Here is an example for which I'll assume the payment is done with eth, if you need to receive payments with erc-20 just change the logic:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extension/ERC721Royalty.sol";

contract MyToken is ERC721, ERC721Royalty {
    constructor() ERC721("MyToken", "MTK") {}
    
     function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public payable virtual override {
        
       (address artist, uint256 value) = royaltyInfo(_tokenId, msg.value);
       payable(artist).transfer(value);

       ///LOGIC...
    }
}

That way every secondary sale, that is just a transfer from the previous buyer to the next, delivers some money to the artist.

As far as how Nifty might do it, its unknown since their code isnt open sourced.

0

There are basically 2 options on how to implement this:

  1. Implement EIP-2981 in your NFT contract, however not all NFT marketplaces support the standard. Since the standard only directs how to give information about royalties, not actually processing it, its up to marketplace to actually send the royalties.
  2. Most marketplaces (like Opensea) simply take the royalty % from the sale price and then every month distribute the royalty to the receivers. If you wish to set a royalty for your collection, you will have to do so manually on their page. Since Opensea is not operating 100% on-chain, but uses signatures to insure data integrity, they can just add the royalty to the order data without actually sending any transaction.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.