Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: alternate token standard and extensions #26

Open
7 of 19 tasks
MASDXI opened this issue Aug 29, 2024 · 1 comment
Open
7 of 19 tasks

feat: alternate token standard and extensions #26

MASDXI opened this issue Aug 29, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@MASDXI
Copy link
Collaborator

MASDXI commented Aug 29, 2024

For ERC20 and ERC721

  • ERC20 can be split into multiple types (Fungible Token)
    • bulk All tokens have the same expiration date. very straight forward

      • Example: Special loyalty points 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.

      Example: All tokens expired after block x

    • default:granular Each token has an individual expiration date. see ERC-7818

      • Common loyalty points where each point can have a unique expiration, allowing more flexibility in managing user rewards.

      Example: Each token is valid for n blocks


Interface for ERC-721 should be ERC-7858

  • ERC721 can be split into multiple types (Non-Fungible Token)
    • bulk All tokenId have the same expiration date.
      • Example: coupons or vouchers intended for services that affect a broad user base, where a uniform expiration is necessary.
    • default:granular Each tokenId has an individual expiration date.
      • Coupon tailored to individual users, where each voucher can expire independently.

      Example:
      tokenId1 minted on block a and expired at block x
      tokenId2 minted on block b and expired at block y
      tokenId3 minted on block c and expired at block z
      Example: All tokens were minted on the different blocks but expired at block x (same block)

    • additional:granular Each tokenId has an individual expiration date but has the same valid period it's can be done by default:granular but adding default duration
      • Example: a simple coupons or vouchers

      Example: Each token is valid for n blocks


Extension feature for ERC-7818 below.

  • Blacklist for restricting receiving and spending.
  • GreyList can receive but restrict spending, only to members on the list.
  • Exception addresses are exempt from token expiration, meaning tokens held by these addresses will not expire.
  • Freeze fund can only move in or out by mint and burn action.
  • Permit for support gasless approval of tokens (standardized as ERC2612) Openzeppelin Implementation.
  • QuotaMint is used to limit the minting of tokens, providing easier and more efficient budget management.
  • QuotaMintSchedule allows the periodic renewal of a minting quota, enabling budget management over specified time intervals.
  • DailySpending to limit daily spending amounts for all users.
  • SpendingTier to limit spending amounts depends on the user tier.
    • use uint8 as level it's enough.
  • DailyReceiving will limit daily receiving amounts for all users.
  • ReceivingTier to limit receiving amounts depends on the user tier.
    • use uint8 as level it's enough.
  • NearestExpiryQuery facilitates querying the nearest expiration balance for a specified account.
  • AcceptedBefore restricts the acceptance of tokens set to expire within a defined threshold.

Extension feature for ERC-721 below.

  • TBD
@MASDXI MASDXI self-assigned this Aug 29, 2024
@MASDXI MASDXI added the enhancement New feature or request label Aug 29, 2024
@MASDXI MASDXI changed the title Potential extension for asset. feat: Potential extension for asset. Aug 29, 2024
@MASDXI MASDXI changed the title feat: Potential extension for asset. feat: Alternate token standard and extensions Sep 6, 2024
@MASDXI MASDXI pinned this issue Sep 16, 2024
@MASDXI MASDXI changed the title feat: Alternate token standard and extensions feat: alternate token standard and extensions Oct 1, 2024
@MASDXI MASDXI assigned ADISAKBOONMARK and unassigned MASDXI Oct 19, 2024
@MASDXI
Copy link
Collaborator Author

MASDXI commented Jan 14, 2025

we should consider freeze extension again it's a little different from 'blacklist'

@MASDXI MASDXI unpinned this issue Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants