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

[AIP-2][Discussion] Multiple Token Changes #2

Closed
areshand opened this issue Nov 9, 2022 · 11 comments
Closed

[AIP-2][Discussion] Multiple Token Changes #2

areshand opened this issue Nov 9, 2022 · 11 comments
Assignees
Labels

Comments

@areshand
Copy link
Contributor

areshand commented Nov 9, 2022

Summary

This proposal contains the following changes:

  1. token CollectionData mutation functions: provide set functions to mutate the TokenData fields based on the token mutability setting.
  2. token TokenData metadata mutation functions: provide set functions to mutate the CollectionData fields based on collection mutability setting.
  3. A bug fix for collection supply underflow: fix a bug that cause underflow error when burning unlimited collection’s TokenData.
  4. Fix the order of events: when minting token, the deposit events enter queue before the mint events. This changes corrects the order to make the token deposit event after the mint event.
  5. Make a public entry for transfer with opt-in: provide an entry function to allow transfer token directly when users opt-in direct transfer.
  6. Ensure royalty numerator is smaller than denominator: we observe about 0.004% token having a royalty > 100%. This change introduces an assertion to ensure royalty is always smaller or equal to 100%.

Motivation

Change 1, 2: the motivation is to support CollectionData and TokenData mutation based on the mutability config so that creators can update the fields based on their own application logic to support new product features

Change 3,4: the motivation is fix existing issues to make the token contract works correctly

Change 5: this motivation is to allow the dapp to directly call the function without deploying their own contracts or scripts

Change 6: this is to prevent potential malicious token that could lead to charging a higher fee than the token price.

Rationale

Change 1, 2 are fulling existing token standard specification without introducing new functionalities

Change 3, 4, 5 and 6 are small fix and straightforward changes.

Reference Implementation

The PRs of the changes above are listed below:

Change 1, 2:
aptos-labs/aptos-core#5382
aptos-labs/aptos-core#5265
aptos-labs/aptos-core#5017

Change 3: aptos-labs/aptos-core#5096

Change 4: aptos-labs/aptos-core#5499

Change 5: aptos-labs/aptos-core#4930

Change 6: aptos-labs/aptos-core#5444

Risks and Drawbacks

Change 1, 2 are internally reviewed and undergo auditing to fully vet the risks

Change 3, 4 and 6 are to reduce the identified risks and drawbacks

Change 5 is to improve usability. This change doesn’t introduce new functionality

Timeline
Reference implementation changes will be deployed in devnet on 11/14 (PST) for ease of testing and providing feedback/discussion.
This AIP will be open for public comments until 11/17.
After discussion, reference implementation changes will be deployed in testnet on 11/17 for testing.

@sherry-x
Copy link
Contributor

This AIP has been reviewed by @sherry-x @aching @davidiw @movekevin . The conclusion is to deploy it to devnet, and open for community feedback.

@orhanba
Copy link

orhanba commented Nov 28, 2022

very nice

@COTOARAYA
Copy link

excelente y mejor integrar toda la informacion a la comunidad que hace el proyecto aun mas fuerte

@tie-creator
Copy link

This will greatly benefit Aptos

@Kusergit
Copy link

To describe in detail the motivation for the upgrade and what it fixes is very trainable for us

@OlyushaVibe
Copy link

OlyushaVibe commented Dec 1, 2022

i'm sure that this improves and changes is for better! I appretiate it!

@VooDoo087
Copy link

That's the right decision.

@sirouk
Copy link

sirouk commented Dec 1, 2022

Sounds good!

@ElagabalxNode
Copy link

Let's do it

@sherry-x sherry-x changed the title Multiple Token Changes [AIP-1][Discussion] Multiple Token Changes Dec 7, 2022
@sherry-x sherry-x changed the title [AIP-1][Discussion] Multiple Token Changes [AIP-2][Discussion] Multiple Token Changes Dec 7, 2022
@mathiyarasu65
Copy link

Excellent.

@michelle-aptos
Copy link
Collaborator

AIP is executed: https://governance.aptosfoundation.org/proposal/4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests