How to implement NFT with royalties

Hello everyone,

For a hobby/learning project, I am attempting to create NFT with royalty feature.
Meaning that each time the NFT owner change, part of the price paid for the NFT goes to the original author public address.

I have done several research on the forum and my conclusions are :

  • NFT should not be created as unique native token, otherwise it could be transfered freely
  • NFT property should be handled via smart contract

Would some of you be able to explain me how to handle NFT royalties via smart contract ?

(FYI, I followed several lectures of the Plutus Pioneer Program & have basic knowledge on Haskell)

Thank you so much in advance !