This repository has been archived by the owner on Jun 2, 2024. It is now read-only.
KupiaSec - The founder allocation should be updated after changing reservedUntilTokenId
.
#171
Labels
Non-Reward
This issue will not receive a payout
KupiaSec
medium
The founder allocation should be updated after changing
reservedUntilTokenId
.Summary
After changing
reservedUntilTokenId
usingToken.setReservedUntilTokenId()
, the founder allocation mechanism wouldn't work as expected.Vulnerability Detail
The owner can update
reservedUntilTokenId
usingsetReservedUntilTokenId()
before starting the auction.As
reservedUntilTokenId
is used while adding founders, the founder allocation wouldn't work as expected.ownershipPct = 1, reservedUntilTokenId = 0
._addFounders()
,tokenRecipient[0]
will be booked for the founder.setReservedUntilTokenId()
is called andreservedUntilTokenId = 1
now.tokenId
will start from reservedUntilTokenId = 1.Impact
The founder allocation mechanism would be broken after changing
reservedUntilTokenId
.Code Snippet
https://github.com/sherlock-audit/2023-09-nounsbuilder/tree/main/nouns-protocol/src/token/Token.sol#L486
Tool used
Manual Review
Recommendation
We should update the founder allocations again after changing
reservedUntilTokenId
insetReservedUntilTokenId()
.The text was updated successfully, but these errors were encountered: