Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

Misalignment in documentation and Smart Contract

Summary

Misalignment in Documentation and Smart Contract

Vulnerability Details

In the documentation is noted that users are allowed to buy presents for 2e18 of SantaTokens, but the burn function in SantaToken will burn only the 1e18 token, while the mint function in the same contract will mint 1e18 of a SantaToken

Impact

If a protocol is implemented as intended EXTRA_NICE won't be able to buyPresent for others as collectPresent will mint only 1e18 of SantaTokens

Tools Used

Manually

Recommendations

Keep the present price of 1e18 or update the burn and mint functions to 2e18 of SantaToken

burn function update

...
function burn(address from) external {
if (msg.sender != i_santasList) {
revert SantaToken__NotSantasList();
}
- _burn(from, 1e18);
+ _burn(from, 2e18);
}
...

mint function update

...
function mint(address to) external {
if (msg.sender != i_santasList) {
revert SantaToken__NotSantasList();
}
- _mint(to, 1e18);
+ _mint(to, 2e18);
}
...
Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.