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

RareNFT and nonce issue #16

Open
mtomassoli opened this issue Nov 15, 2022 · 0 comments
Open

RareNFT and nonce issue #16

mtomassoli opened this issue Nov 15, 2022 · 0 comments

Comments

@mtomassoli
Copy link

mtomassoli commented Nov 15, 2022

The POC for the RareNFT assumes that the nonce doesn't change between the off-chain reading and the on-chain attack but that's unrealistic when there are other users.
Luckily, the nonce and the latest token id are in sync, and the latest id can be deduced on-chain in O(logN) time, where N is the number of users who called mint after we read nonce.
edit: Actually, MockERC721.nftId is public so we can just read it in O(1).

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

No branches or pull requests

1 participant