ERC-7818: Expirable ERC20

Hi @0xTraub, Thanks for your feedback and your concern about the function signature of overloading balanceOf with the identifier did you think it should be changed to something like balanceOfByIdentifier borrowing style form ERC-1400

The reason I am not proposing this as an extension to the ERC-1155. The specification would need to spread down into multiple behaviors and may become more complicated when implemented, I think ERC-7818 is more fungible because the expiration date becomes a shared, uniform trait across tokens.

  • ERC20 can be split into 2 characteristics (Fungible Token) (Uniform)
    • BulkExpire All tokens have the same expiration date. very straight forward

      • Example: seasonal loyalty points, bonds, or simple governance rights issued in limited amounts, which expire together under a single rule. In such cases, the
        ability to mint new tokens continuously may not be suitable.

      Behavior: All tokens expired after block x

    • IndependentExpire Each token has an individual expiration date.

      • Example: Common loyalty points, commodities have a life span, data packages, or e-money where each token can have a unique expiration, allowing more flexibility in managing user rewards.

      Behavior: Each token is valid for n blocks


  • ERC721 can be split into multiple characteristics (Non-Fungible Token) (Unique)
    • BulkExpire All tokenId have the same expiration date.

      • Example: seasonal coupons, vouchers, and rights, intended for services that affect a broad user base, where a uniform expiration is necessary.

      Behavior: All tokens were minted on the different blocks but expired at block x (same block)

    • IndependentExpireByTokenId Each tokenId has an individual expiration date.

      • Example: Very special coupon, or privileges tailored to individual users, where each token can expire independently.

      Behavior:
      tokenId 1 minted on block a and expired at block x
      tokenId 2 minted on block b and expired at block y
      tokenId 3 minted on block c and expired at block z

    • IndependentExpire Each tokenId has an individual expiration date but has the same valid period or duration.

      • Example: a very special coupons, vouchers, or rights can’t be stack

      Behavior: Each tokenId is valid for n blocks


  • ERC1155 can be split into multiple characteristics (Semi-Fungible Token) (Mixed)
    • BulkExpire All tokenId under the same smart contract has the same expiration date.

      • Example: vouchers, coupons, docs, or event tickets multiple types,s in the same contract, where all tokens within the same smart contract expire simultaneously.

      Behavior: All tokens of tokenId1, tokenId2, and tokenId3 expired at block x (same block)

    • BulkExpireByType All tokens under the same type Id have the same expiration date.

      • Example: limited quantity coupons, vouchers, and time-limited game items for events e.g. for loyalty use cases is Black Friday or Flash Sales, all tokens of a specific type (same id) expire simultaneously.

      Behavior:
      All tokens of token type Id 1 are valid for n1 blocks
      All tokens of token type Id 2 are valid for n2 blocks

    • IndependentExpireByType Each token under the same tokenId has an individual expiration date.

      • Example: casual coupon, voucher, and temporary access right within the same category can expire at different times.

      Behavior:
      Each token of token type Id 1 are valid for n1 blocks
      Each token of token type Id 2 are valid for n2 blocks,

1 Like