You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelHighA valid High severity issueRewardA payout will be made for this issue
Token.sol : Function updateFounders does not clear the correct base id
Summary
Difference in first base id in function _addFounders and updateFounders will result in function updateFounders not clearing the correct base id
Vulnerability Detail
baseTokenId calculation is different in the functions as baseTokenId starts from reserveUntilTokenId in _addFounders and 0 in updateFounders. So old founders will not be removed from tokenRecipient mapping and will receive tokens if the vesting period is not over
Impact
Old founders will not be removed from the tokenRecipient mapping and will recieve tokens if the vesting period is not completed
uint256 baseTokenId;
for (uint256 j; j < cachedFounder.ownershipPct; ++j) {
// Get the next index that hasn't already been clearedwhile (clearedTokenIds[baseTokenId] !=false) {
baseTokenId = (++baseTokenId) %100;
}
delete tokenRecipient[baseTokenId];
clearedTokenIds[baseTokenId] =true;
emitMintUnscheduled(baseTokenId, i, cachedFounder);
// Update the base token id
baseTokenId = (baseTokenId + schedule) %100;
}
}
sherlock-admin
changed the title
Lucky Clear Dragonfly - Token.sol : Function updateFounders does not clear the correct base id
saian - Token.sol : Function updateFounders does not clear the correct base id
Dec 13, 2023
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelHighA valid High severity issueRewardA payout will be made for this issue
saian
medium
Token.sol : Function
updateFounders
does not clear the correct base idSummary
Difference in first base id in function
_addFounders
andupdateFounders
will result in functionupdateFounders
not clearing the correct base idVulnerability Detail
baseTokenId calculation is different in the functions as baseTokenId starts from reserveUntilTokenId in
_addFounders
and 0 inupdateFounders
. So old founders will not be removed from tokenRecipient mapping and will receive tokens if the vesting period is not overImpact
Old founders will not be removed from the tokenRecipient mapping and will recieve tokens if the vesting period is not completed
Code Snippet
https://github.com/sherlock-audit/2023-09-nounsbuilder/blob/main/nouns-protocol/src/token/Token.sol#L375
Tool used
Manual Review
Recommendation
Change the first base token id in
_addFounders
toDuplicate of #42
The text was updated successfully, but these errors were encountered: