EIP-5007: EIP-721 Time Extension

Dear @0xanders, @LanceSnow and EIP Editor @SamWilsn

After writing ERC-7818, I came across this EIP and realized it has many potential use cases. However, there are still areas where improvements can be made to enhance this EIP without breaking its original intention and idea.

I would like to respectfully ask if it would be possible for my teammate @parametprame and me to take over as co-authors and maintainers of this EIP.

The area I am focusing on and would like to improve

Motivation

Should mention potential use case for these tokens can be applied to

  • Privileges or Tickets: Ideal for loyalty programs where tokens represent time-limited benefits.
  • Authentication: Ensures that invalid tokens cannot be used for accessing products or services.
  • Insurance or Warranty: Provides a clear expiration for coverage or guarantees.
  • Certificates: Certifies validity within a specific time frame.

Specification

normative should avoid to change

  • isTokenValidMUST retrieve the status of given tokenId return true if the token is still valid otherwise false
  • TokenTimeSetMUST be emitted after setting the startTime and endTime for a given tokenId. The event should be indexed by tokenId.
  • ERC5007TransferredInvalidTokenOPTIONAL custom error returns the tokenId, startTime, endTime, and currenTime
  • tokenValidityRemainingOPTIONAL returns the remaining time, in seconds, before the given tokenId becomes invalid and unusable

Function Behavior

  • balanceOf that was inherited from ERC-721 needs to be clarified should return all tokens including invalid or not.
  • transferFrom and safeTransferFrom MUST check if the token is still usable before transferring. If the condition is not met, they MUST revert the transaction.
  • startTime and endTime of tokenId, the startTime MUST less than endTime except in the case where both are set to 0. A startTime and endTime of 0 indicates that the tokenId has no time-limited.

Security Consideration

  • Denial of Service
    transfer and transferFrom are not restricted by startTime and endTime tokens are still transferable but may be unusable in the contract that checks the time info of the token
2 Likes