-
Notifications
You must be signed in to change notification settings - Fork 3
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
Should not minting new collection token before burning the old collection token #1198
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-1597
satisfactory
satisfies C4 submission criteria; eligible for awards
Comments
c4-submissions
added
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
labels
Nov 12, 2023
c4-pre-sort
added
the
primary issue
Highest quality submission among a set of duplicates
label
Nov 19, 2023
141345 marked the issue as primary issue |
This was referenced Nov 19, 2023
c4-pre-sort
added
duplicate-1597
and removed
primary issue
Highest quality submission among a set of duplicates
labels
Nov 20, 2023
141345 marked the issue as duplicate of #1597 |
141345 marked the issue as duplicate of #1742 |
alex-ppg marked the issue as not a duplicate |
alex-ppg marked the issue as duplicate of #1597 |
alex-ppg changed the severity to 2 (Med Risk) |
c4-judge
added
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
downgraded by judge
Judge downgraded the risk level of this issue
and removed
3 (High Risk)
Assets can be stolen/lost/compromised directly
labels
Dec 5, 2023
c4-judge
added
the
satisfactory
satisfies C4 submission criteria; eligible for awards
label
Dec 8, 2023
alex-ppg marked the issue as satisfactory |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-1597
satisfactory
satisfies C4 submission criteria; eligible for awards
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/NextGenCore.sol#L217-L222
Vulnerability details
Impact
Should not minting new collection token before burning the old collection token, or the old collection may be leveraged by the owner before burning.
Proof of Concept
mintAndAuction allows collection token owner to mint a new collection token by burning the old one. The minting and burning is done through burnToMint in
NextGenCore
contract.The new collection token will be minted to the receiver before the old collection token is burned.
Given that the old collection token can be used as a collateral in a lending platform as it has value of mintpass.
Consider a case where:
mintAndAuction
from a contract to mint a new collection token;onERC721Received
is called on the contract, contract uses the old collection token as collateral and borrows money from the lending platform;Tools Used
Manual Review
Recommended Mitigation Steps
To mitigate this issue, please burn the old collection token before minting the new one.
Assessed type
ERC721
The text was updated successfully, but these errors were encountered: