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.
ERC20can be split into 2 characteristics (Fungible Token) (Uniform)-
BulkExpireAll tokens have the same expiration date. very straight forward- Example: seasonal
loyalty points,bonds, or simplegovernance rightsissued 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
- Example: seasonal
-
IndependentExpireEachtokenhas an individual expiration date.- Example: Common
loyalty points,commoditieshave a life span,data packages, ore-moneywhere each token can have a unique expiration, allowing more flexibility in managing user rewards.
Behavior: Each token is valid for n blocks
- Example: Common
-
ERC721can be split into multiple characteristics (Non-Fungible Token) (Unique)-
BulkExpireAlltokenIdhave the same expiration date.- Example: seasonal
coupons,vouchers, andrights, 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)
- Example: seasonal
-
IndependentExpireByTokenIdEachtokenIdhas an individual expiration date.- Example: Very special
coupon, orprivilegestailored 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 - Example: Very special
-
IndependentExpireEachtokenIdhas an individual expiration date but has the same valid period or duration.- Example: a very special
coupons,vouchers, orrightscan’t be stack
Behavior: Each tokenId is valid for n blocks
- Example: a very special
-
ERC1155can be split into multiple characteristics (Semi-Fungible Token) (Mixed)-
BulkExpireAlltokenIdunder the same smart contract has the same expiration date.- Example:
vouchers,coupons,docs, orevent ticketsmultiple 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)
- Example:
-
BulkExpireByTypeAll tokens under the same typeIdhave the same expiration date.- Example: limited quantity
coupons,vouchers, andtime-limited game itemsfor events e.g. for loyalty use cases is Black Friday or Flash Sales, all tokens of a specific type (sameid) 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 - Example: limited quantity
-
IndependentExpireByTypeEach token under the sametokenIdhas an individual expiration date.- Example: casual
coupon,voucher, andtemporary access rightwithin 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, - Example: casual
-