ERC-5173 NFT Future Rewards (nFR)

Draft · NFTs & multi-token · created 2022-05-08

An ERC-721 extension standard that lets previous owners share in a portion of realized gains if an NFT's value rises after they sell it.

Why it is needed

Under the current NFT standard (ERC-721), once an NFT is sold, the relationship with that asset is completely severed. No matter how much the price rises afterward, no share returns to the previous owner. The source text points out that traditional financial markets operate unfavorably for most participants due to inefficiency, opaque practices, and structural imbalances. While blockchain provides transaction transparency, it argues that the current implementation alone makes it difficult to distribute value fairly or align the interests of participants. This standard defines a structure that records ownership and price-change history on the token and distributes a fixed percentage of any sale profit to previous owners. It explains that this keeps owners invested in the asset's growth even after selling, creating a cooperative trading model that recognizes the contribution of every stage of ownership.

What to implement

In depth

FRInfo and ListInfo storage requirements

The contract must implement and maintain FRInfo for each token ID. FRInfo consists of numGenerations (number of generations, uint8), percentOfProfit (profit distribution ratio scaled by 1e18), successiveRatio (common ratio of the geometric sequence), lastSoldPrice (last sale price in ETH mantissa terms), ownerAmount (number of owners the token has passed through), and addressesInFR (array of addresses currently in the FR cycle). These can be packed into a single mapping or split across several, but they must be public mappings or have accessor functions so clients can query and verify them. ListInfo (salePrice, lister, isListed) must also be stored in a per-token-ID mapping with a public means of querying it, and the _allottedFR mapping holding per-address allotments must likewise be public or have a query function.

Ratios use 1e18 fixed point

The ratio used in the allocatedFR calculation must be fixed point with 1e18 as the scale factor (X/1e18). For example, 5% is 5e16. This is REQUIRED for consistency across the standard, with a maximum and minimum value of 1e18 - 1. The Rationale explains that representing 1e18 as 100% and 1e16 as 1% is a common convention across several Solidity libraries that handle fixed point arithmetic.

ERC-721 function overrides

_mint, _transfer, and _burn must be overridden. _mint must set up the default FR model and update the owner count even when called via the plain ERC-721 _mint rather than an nFR-specific mint, and must add the recipient to the FR cycle immediately. _transfer must update state as if the token were sold for 0 ETH, to prevent FR bypass, and must require that the transfer is not sent to the sender itself or to an address already within the FR sliding window; otherwise the FR order could be filled with the same or duplicate addresses. _burn must delete the FRInfo and ListInfo for that token after burning.

list, unlist, buy

These three functions provide the token sale functionality and must be implemented. list should verify that msg.sender is the owner or an approved address, then update ListInfo and emit a Listed event. unlist should verify ownership and then delete ListInfo. buy must be payable, must verify that msg.value matches salePrice and that the token is listed, and must then call the FR version of _transferFrom. It must also verify that the buyer is not already within the FR sliding window.

FR _transferFrom and distribution logic

The FR version of transferFrom(from, to, tokenId, soldPrice) determines whether there is a profit by comparing against the stored lastSoldPrice. If there is no profit, it updates lastSoldPrice, increments the owner count, shifts generations, and sends the full msg.value to the lister. If there is a profit, it calls _distributeFR. To prevent a seller from paying itself, _distributeFR excludes the last address in addressesInFR when determining recipients; if there are no recipients because this is the first sale, it returns 0 or sends msg.value to the lister. It applies _calculateFR to the difference between the sale price and lastSoldPrice to distribute the profit, returns the difference between the total distributed amount (allocatedFR) and soldPrice to the lister, and emits an FRDistributed event. ListInfo must be cleared once this is complete.

Sliding window and geometric sequence calculation

Distribution recipients are determined using a fixed-size sliding window (n). Owners are ordered from the first owner to the immediately preceding owner, and only prior owners within the window participate in the distribution. The actual number of participating owners is n = min(m, w), where m is the current owner count and w is the window size. The realized profit P is split using a geometric sequence that applies a buyer reward ratio R and a common ratio g, so that earlier buyers receive a larger share and the first-generation owner receives the largest reward. An owner who sold at a loss owes no FR share since there was no profit to split, but still continues to receive distributions from profits realized in later generations.

Claims are full payment, generation shifting is unconditional

FR payouts should use a pull-payment model, similar to OpenZeppelin's PaymentSplitter, where the recipient claims the funds themselves. A successful claim via releaseFR emits an FRClaimed event. According to the Rationale, since a recipient may not be actively watching secondary sales, payout events must be left on record so that, as with ERC-2981, the contract can be queried to confirm a deposit. _shiftGenerations must be called regardless of whether the sale was profitable, and removes the oldest account from _addressesInFR based on the array length and the total number of generations for that token.

Compatibility and proposal status

This proposal states that it is fully compatible with ERC-721 and ERC-2981, and can easily be adapted for ERC-1155. ERC-165 support is required. The reference implementation uses OpenZeppelin contracts and the PRB Math library for fixed point arithmetic. This proposal is currently in Draft status, so its contents may change.

Things to watch out for

Original ERC · ← ERCs