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 simplegovernance 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
- Example: seasonal
-
IndependentExpire
Eachtoken
has an individual expiration date.- Example: Common
loyalty points
,commodities
have a life span,data packages
, ore-money
where each token can have a unique expiration, allowing more flexibility in managing user rewards.
Behavior: Each token is valid for n blocks
- Example: Common
-
ERC721
can be split into multiple characteristics (Non-Fungible Token) (Unique)-
BulkExpire
AlltokenId
have 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
-
IndependentExpireByTokenId
EachtokenId
has an individual expiration date.- Example: Very special
coupon
, orprivileges
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 - Example: Very special
-
IndependentExpire
EachtokenId
has an individual expiration date but has the same valid period or duration.- Example: a very special
coupons
,vouchers
, orrights
can’t be stack
Behavior: Each tokenId is valid for n blocks
- Example: a very special
-
ERC1155
can be split into multiple characteristics (Semi-Fungible Token) (Mixed)-
BulkExpire
AlltokenId
under the same smart contract has the same expiration date.- Example:
vouchers
,coupons
,docs
, orevent 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)
- Example:
-
BulkExpireByType
All tokens under the same typeId
have the same expiration date.- Example: limited quantity
coupons
,vouchers
, andtime-limited game items
for 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
-
IndependentExpireByType
Each token under the sametokenId
has an individual expiration date.- Example: casual
coupon
,voucher
, andtemporary 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, - Example: casual
-