- TEP: 66
- title: NFTRoyalty Standard Extension
- status: Active
- type: Contract Interface
- authors: EmelyanenkoK, Tolya
- created: 12.02.2022
- replaces: -
- replaced by: -
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.
It is convenient to standardize royalty, so all NFT markets will pay royalty to collection author independently of how this collection was deployed.
- report_royalty_params example implementation: ton-blockchain/token-contract.
- get_royalty_params example implementation: ton-blockchain/token-contract.
Royalty data example in Fift:
"EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N" parse-smc-addr drop 2=: royalty-addr
<b
11 16 u, // numerator
1000 16 u, // denominator
royalty-addr Addr, // address to send royalty
b> =: royalty-params
The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.
NFT Collection smart contract MUST implement:
(if this is a variant of NFT items without collection then NFT item smart contract MUST implement this).
royalty_params()
returns(int numerator, int denominator, slice destination)
Royalty share isnumerator / denominator
. E.g ifnumerator = 11
anddenominator = 1000
then royalty share is11 / 1000 * 100% = 1.1%
.numerator
must be lessdenominator
.destination
- address to send royalty. Slice of typeMsgAddress
.
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-mode64
(return msg amount except gas fees): TL-B schemareport_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, numerator, 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.
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
There is no way to enforce royalty for each sale. There should be an option to gift NFT for free, however, it is not possible to track, was it really for free or not. See the relevant paragraph in TEP-62.
We do not know in what currency the sale will take place. Percentage royalty is universal.
- Shall we standardize internal message with royalties which markets send to the author?
None