-
Notifications
You must be signed in to change notification settings - Fork 24
NFTRoyalty Standard Extension #66
Description
⚠️ WARNING: Standards are now published and discussed in the TEPs repository. This page may be out of date.
NFTRoyalty
Summary
Extension for NFT Standard.
A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal support for royalty payments across all NFT marketplaces and ecosystem participants.
Specification
NFT Collection smart contract must implement:
(if this is a variant of NFT items without collection then NFT item smart contract must implement this).
Get-methods
-
royalty_params()
returns(int numerator, int denominator, slice destination)
Royalty share is
numerator / denominator
.E.g if
numerator = 11
anddenominator = 1000
then royalty share is11 / 1000 * 100% = 1.1%
.numerator
must be lessdenominator
.destination
- address to send royalty. Slice of typeMsgAddress
.
Internal messages
-
get_royalty_params
Request
TL-B schema of inbound message:
get_royalty_params#693d3950 query_id:uint64 = InternalMsgBody;
query_id
- arbitrary request number.Should do:
Send back message with the following layout and send-mode
64
(return msg amount except gas fees):TL-B schema
report_royalty_params#a8cb00ad query_id:uint64 numerator:uint16 denominator:uint16 destination:MsgAddress = InternalMsgBody;
It is expected that marketplaces which want to participate in royalty payments will send muldiv(price, nominator, denominator)
to destination
address after NFT sale.
Marketplaces SHOULD neglect zero-value royalty payments.
Marketplaces MAY deduct gas and message fees required to send royalty from royalty amount.
Rationale
Why are there no obligatory royalties to the author from all sales?
See the relevant paragraph in NFT Standard.
Why can't I set a fixed amount of royalties?
We do not know in what currency the sale will take place. Percentage royalty is universal.
TL-B Schema
get_royalty_params query_id:uint64 = InternalMsgBody;
report_royalty_params query_id:uint64 numerator:uint16 denominator:uint16 destination:MsgAddress = InternalMsgBody;
crc32('get_royalty_params query_id:uint64 = InternalMsgBody') = 0xe93d3950 & 0x7fffffff = 0x693d3950
crc32('report_royalty_params query_id:uint64 numerator:uint16 denominator:uint16 destination:MsgAddress = InternalMsgBody') = 0xa8cb00ad | 0x80000000 = 0xa8cb00ad