EIP-5507: Refundable NFTs

Bit of bikeshedding on the function names. The base interfaces you’re extending don’t use a get prefix for getters.

  • refundOf, or maybe compensationOf.
  • refundableUntil?

refundOf and refundDeadlineOf seem like sensible names.

Have to say, this is an amazing idea. I had a similar idea before and paid attention to its early version 721R.

For EIP-721 Refund Extension and EIP-1155 Refund Extension, it is recommended to support batch refunds to improve efficiency.
EIP-721 Refund Extension :

function refund(uint256[] tokenId) external;

EIP-1155 Refund Extension:

 function refund(uint256[] tokenId, uint256[] amount) external;

How does this increase efficiency? Generic multicalls make this entirely redundant.

Refunds for multiple NFTs can be combined into 1 transaction.
For example, NFT#1:1ETH;nft#2:2ETH;nft#3:3ETH
This method can directly transfer 6ETH to the refunder.

This is fair enough, but with EIP-5920: PAY opcode (CFI Cancun), this would take effectively the same amount of gas.

This does remind me: multicall hasn’t been standardized yet. I’ll go ahead and do that.