ERC-2981 in practice: what a 5... Note

ERC-2981 in practice: what a 5% royalty actually pays out

ERC-2981 specifies royalty information, not a transfer mechanism. Before creating a Seaport listing, the royaltyInfo function is called to determine the royalty recipient and amount for a given token and sale price. This royalty information is then integrated directly into the Seaport order's consideration array as an additional payment item. Settlement processes both the seller's payment and the royalty payment simultaneously from the same Seaport fulfillment, eliminating the need for subsequent transfers. Orders are rejected if the royalty consideration recipient or amount deviates from the current royaltyInfo result.The seller's net proceeds are calculated by subtracting both the royalty and the marketplace fee from the sale price. The marketplace fee is derived from the signed order's consideration items, not a hard-coded value. Practical implementation involves classifying each payment recipient before signing an order and validating the royalty item and total consideration. The additional overhead for implementing royalties includes extra order validation and more tests within the broader test suite.Marketplaces can deviate from the ERC-2981 standard by making royalties optional, applying overrides, or entirely omitting royalty consideration. To verify actual royalty payments, three sources are checked: directly calling royaltyInfo, decoding the signed Seaport order, and inspecting the fulfilled transaction's payment transfers. The contract call indicates the collection's requested royalty, the order shows what was promised, and the transaction reveals what was paid. Any discrepancies between these records signify a deviation from the standard.For practical purposes, it is crucial to compare royaltyInfo with the Seaport consideration array before signing or accepting a listing. Relying solely on marketplace displayed information for royalty payments is insufficient. The provided collection serves as a reference for these processes.