Royalties

The one piece of WNS that is unique is the implementation of royalties. There are two key components to royalties on WNS.

  1. Storing creators - Creators and their ownership are stored in the extra_metadata field of the NFT metadata account. The amount of royalties for the NFT are stored as the first field with ROYALTY_BASIS_POINTS as the key and the basis points value of royalties for the NFT as the value. The following metadata fields are the creator address as the key and their share as a percent as the value.

  2. Distributing royalties - Royalties are sent via a pre-transfer instruction that also marks the transfer as completed in a way that can be read from the transfer hook. Royalty funds are placed in a separate account and are split up based on the creator shares in the Metadata of the NFT that was transferred. Creators can claim their share of royalties by calling the claim function and withdrawing the assets.

Last updated