# Another NFT royalty solution

By [Kyle](https://paragraph.com/@weiscracker) · 2022-11-13

---

Current State of NFT Royalties
------------------------------

In their current form NFT royalties are notoriously difficult to enforce. Because of this, several marketplaces have decided not to enforce royalties either because they don’t like the idea of royalties or because they can provide cheaper trades for customers. Regardless of the reason, OpenSea has made an effort to make royalties more enforceable with their operator filter registry. This can be added to ERC721/1155 contracts and effectively acts as an allowlist for which NFT marketplaces the token is allowed to be traded on, regardless of how OpenSea wants to phrase it to make it sound more palatable. I don’t think this is the best we can come up with as a community. That being said, I do respect the fact that OpenSea is trying to fix this problem and proposing technical solutions. If nothing else, it acts as a forcing function to make people like me write about my ideas like this… Going from Step 0 to Step 1 can be the hardest part.

Why are royalties so hard?
--------------------------

Royalties _in their current form_ are hard, if not impossible to enforce on chain. Instead of focusing on how to enforce the current form of royalties, I propose we take a step back and reinvestigate the purpose of royalties and if there is a better, more easily enforceable way. The reason that royalties are hard to enforce right now requires delving into the details of what happens when you sell or buy an NFT. This isn’t an exhaustive explanation and I reserve the right to be inaccurate. From the ERC721/1155 contract point of view, the only function that gets called is the Transfer function. This simply checks if whoever is trying to transfer the token is the owner of the token, or has approval from the owner to transfer the token. There is no money trading hands here. All of the money moves happens externally to the actual transfer of the NFT and that’s why we need marketplaces like OpenSea and others to facilitate the buying/selling. Because the NFT contract that does the transfers and the contracts that handle the money are separate, it is very hard for the NFT contract to prevent the transfer if some percentage of the transaction value wasn’t sent to the royalty receiver. It simply has no understanding that there is money being sent around, it just knows someone wants to send a token to someone else.

Proposed solution
-----------------

However, if royalties were a fixed amount instead of a percentage of the sales price, this becomes very easy to enforce in the NFT contract itself. The contract needs a few variables added to identify who receives royalties, which token ids have paid royalties, and what the flat royalty fee is. The Transfer function then just also checks if the fee has been paid for the token in question in addition to checking for permissions. This flat fee can be updated on-chain as the NFT project’s floor prices grows or shrinks, basically mimicking the percentage model but with a lag. This is not a perfect solution, but I believe it is a much better starting point than what OpenSea is proposing. The main drawback to this solution is that it still cannot distinguish between transfers between wallets that aren’t a sale (moving to cold storage or just rotating wallets) and sales. One potential solutions is an initial number of free transfers per token. In a similar vein, transfers which involve trading NFT for NFT would still be subject to this flat fee.

Next steps
----------

Again, while I feel that OpenSea optimized for the wrong variables here (how do we make percentage royalties work instead of how do we get the same effect), I do think that what they’ve come up with will force all of us to put up our own ideas and will facilitate faster progress. They took the first step and that takes some guts.

This flat-fee royalty ERC721/1155 contract is a simple upgrade, but it will require the support of marketplaces and the community to make it work. Please let me know what your thoughts are and I hope this helps to spark other ideas within the community as well. Reach out to me on twitter and let me know what you think.

[https://twitter.com/weiscracka](https://twitter.com/weiscracka)

---

*Originally published on [Kyle](https://paragraph.com/@weiscracker/another-nft-royalty-solution)*
