Variable royalties

Hello all.
I want to implement a variable royalty payment in a NFT (ERC-721) smart contract, is this possible? and What is the best way to implement any royalties today?

To explain the variable royalties a bit better. If the NFT is sold for 1 eth or more, we want 2.5% royalties, if it is sold for less than 0.2 eth, we take 10% and so on.
Anyone know if this is possible and if yes, how would you do it?
Thanks

1 Like

Hi @endre,

You may want to take a look at ERC2981 and ERC721Royalty. You can override the royaltyInfo function to accommodate your custom logic based on the salePrice parameter.

Note that the royalties can't be enforced given how the ERC is designed.

Thanks, @ernestognw.
This is the same I have managed to find out. There is some talk about ETC-721-C that can enforce royalties, but as of now it might limit the marketplaces.