-
Notifications
You must be signed in to change notification settings - Fork 254
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
Create new ARC20 spec #41
base: master
Are you sure you want to change the base?
Conversation
8d335c4
to
211dc15
Compare
Let's not use the outdated approach of approve() and transfer_from(). The probem with this is that this is a two step procedure, while it is possible to do it in one step like ERC-2612 using permit(). |
Agree with r001. Would also second the importance of being able to transfer tokens into smart contracts, which I believe is part of r001's wip proposal. |
Hi @r001 & @asharma13524, thank you for the thoughts! I had some discussions about this with the people mentioned at the top of this PR and almost ended up in a flamewar. I decided to pursue the ERC20 route for now because it is well known, and it makes sense to call it ARC20 if it looks like ERC20. Also note that due to the nature of the batch zero knowledge proofs on Aleo, it should be possible in the near-term to execute both approve and transfer_from for effectively the price of a single execution. More proposals like ERC-2612 are very much welcome, maybe it will have merit to name it ARC-2612 as well! |
I don't want to push things hard, but I forgot to mention that approve() takes considerably more system resources during execution than offline signature method:
(https://github.com/r001/arc20_0001/blob/main/reference/main.aleo#L47-L51)
(https://github.com/r001/arc20_0001/blob/main/reference/main.aleo#L60-L61) |
@vicsn @evanmarshall Do you think |
You might want to consider an update to the unapprove logic. As it stands, if someone wants to unapprove the entire balance of another user, they have to specify the exact amount the user is currently approved for. This could cause some some annoying usability issues as it creates a race condition on the current approval. Instead, if an amount greater than the current approval is specified, the approval should just be reduced to zero (rather than reverting). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This ARC introduces a design for minimal Fungible Tokens just like ERC20. It allows for transferring tokens and approving programs to transfer tokens on your behalf.
A big thank you to Valentin Seehausen, Evan Marshall, FullTimeMike and authors of the previous two ARC20 specs Ghostant-1017 and EdVeralli.
Discussion link: #42