EIP-5507: Refundable NFTs

1 Like

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.

In fact, in the UK and other EU countries, consumers are legally entitled to a 14-day cooling-off period when purchasing goods or services online, under what is known as the “Distance Selling Regulations”, which also cover digital goods and downloads, such as books, in-game purchases, and NFTs. So, perhaps in the sale of NFTs, eip5507 is not optional but mandatory.


I’d like to discuss the motivation for this proposal, in the context of whether or not it should be an ERC. I want to make it very clear that I do see a non-zero value in having refundable tokens, but I don’t believe the idea is general enough to be put in an EIP.

Greater Compliance with EU “Distance Selling Regulations,” which require a 14-day refund period for goods (such as tokens) purchased online

Presumably any token sale in the EU—and not just the initial purchase—needs to have the 14 day return policy?

I fear this will cause more trouble than its worth. If the badge is automated, a malicious contract could claim to support ERC-5507, but not actually allow users to refund. If the badge is manual, only high profile (or high paying) tokens will get the verification on marketplaces.

DExes could offer to refund tokens if doing so would give a higher yield

If possible, this one seems like a point in favour of standardizing. I’d like to see some comments from an exchange developer to see what their thoughts on this are.

Better wallet confirmation dialogs

I’m not sure I understand this one. Would this just be a notice on the transaction signing screen that says “this token might be refundable”? If so, how would a wallet decide to show it? Heuristics on mint functions?

All of that aside, I have a few more technical-ish questions:

  • What differentiates a refund from a collateral-backed loan with an expiry date? Are there existing standards/libraries that handle these loans we could take inspiration from?
  • Why does this need to be an extension on the token itself, and not in a separate escrow contract?
  • Could an attacker mint large amounts of the token, dump it on the market while the token is hot, buy it back once the token price drops and refund it?


in terms of the smallest divisible unit

Should that be “indivisible” unit?

Yes. But this helps specifically for ITOs, which would definitely require greater legal scrutiny. This is mentioned in the abstract (emphasis added):

This ERC adds refund functionality for initial token offerings to ERC-20, ERC-721, and ERC-1155.

I meant special prompts, for example with ERC-20/721/1155 transfer. Instead of an ugly prompt showing the ABI-decoded transaction data, the wallets could instead display a more human-readable prompt.

Yes. Thanks for catching that typo!


I don’t think there’s any functional difference here. But “collateral-backed loan with an expiry date” is harder to understand than “tokens are refundable until X date.”

Easier introspection by DApps, and avoiding extra gas fees through unnecessary CALLs.

Yes. This is a feature, not a bug.

Not that I’m aware of.

I think this should be in the metadata, not in the contract.

0.1eth on day of purchase will not be 0.1eth on day of asking refund. So this can not be directly automated on-chain.
Needs to go through projects’ management contact.

So an EIP, maybe, but not to standardize the behavior on-chain, only its representation in the meta: until when it can be refunded, and who to contact/how to contact them to get this refund.

I have learned about some projects that promised refunds, but their verbal or written promises were not trusted by community members, even if these projects had a strong background. Community members accept that code is law, and on-chain automated execution is a more trusted mechanism.

1 Like

That people are trusting the companies or not should definitely not be the concern of the EIP.

I do think it’s good to add refund policy and contact somewhere, but I don’t think it can work on-chain, for various reasons:

  • Not everyone buys using a wallet. You can buy using credit card and expect refunds to happen to your bank account. Any company doing off-ramp will redirect you to the seller’s websit if you ask them about refund policy.
  • calling refund has a tx cost. There is nothing to stop a company to make fees to ask the refund so expensive that people will just never call it.
  • ETH price varies way too much. It will require an oracle to do the refund (to store $/€ price at buy time or to retrieve it at refund time), which again will be very expensive both in term of fees for the buyer/refund asker & the seller.
  • People are (righlty) using more and more hot wallet to buy stuff and then send to cold wallet. This would void the policy since there is no way to know if this was a sale or not.

I would like to add:

European refund policy has exceptions. Concert Tickets, digital content considered “open” after start of use etc…
NFTs are still young, but I have little to no doubts the ones with high speculative values will enter these exceptions. Especially because NFTs do not have the same status everywhere in Europe.

So for sure we need these for the future, when NFTs will be more than just jpegs, but on-chain is not sustainable.

This EIP does not specify whether the refund should be voided on transfer, and the most common implementation of it doesn’t void it on transfer (a good thing, IMO).

The approve/refundFrom pattern allows refunds with stablecoins.

This is a good point, but it is partially mitigated by AA.

Again, this can be done using the approve/refundFrom flow.

Side note: do we want to add refundTo/safeRefundTo methods? I’m actually leaning towards yes on this one.

  • Keep as-is
  • Add refundTo and safeRefundTo
  • Add refundTo and safeRefundTo and REMOVE the old refund

0 voters

Even if a person buys with a credit card, he still actually owns the wallet. And we can’t implement a direct refund to his credit card, so it doesn’t have to be too complicated.

Yep my bad. I was actually thinking companies wouldn’t refund something that might have been resold, but thinking about it, as long as you own the receipt, it should be ok.

Good luck saving for each buy the current price in stable. Let’s make those mints way more expensive than they should.

No, lots of places are actually doing custodial stuff. There is a bigger picture to look at here for something supposed to target laws.
And if as a consumer I buy with a CC, I want my refund to my CC. Each tx cost.

An on-chain refund system will have a hard time to work at scale. Both because of tokens volatility and cost of tx.

As of now, I have not seen statistical data to support this conclusion. It does exist, but it is not widespread.

Each EIP has its own scope and standards. We may not overcomplicate things and make it inconvenient to adopt, while also considering the importance of its general applicability. If you want to pay with a credit card and the project can also accept credit card payments, then the refund process becomes simpler for you. However, this situation may not be among the issues that this EIP aims to address.