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 Sep 17, 2023. It is now read-only.
sherlock-admin opened this issue
Mar 13, 2023
· 0 comments
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
Inconsistent parameter with burnFrom & decreaseCurrentMinted
Summary
Vulnerability Detail
The code is checking if accountMinted is greater than or equal to amount in _decreaseCurrentMinted(), but the subtraction is being performed on currentMinted[msg.sender] instead of currentMinted[account]. This means that the code is subtracting the amount from the currentMinted value of the msg.sender instead of the account that was passed as a parameter to the function.
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` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
SunSec
medium
Inconsistent parameter with burnFrom & decreaseCurrentMinted
Summary
Vulnerability Detail
The code is checking if accountMinted is greater than or equal to amount in _decreaseCurrentMinted(), but the subtraction is being performed on currentMinted[msg.sender] instead of currentMinted[account]. This means that the code is subtracting the amount from the currentMinted value of the msg.sender instead of the account that was passed as a parameter to the function.
It is better to make the parameter consistent.
Impact
If misuse it, it will cause accounting error.
Code Snippet
https://github.com/sherlock-audit/2023-03-taurus/blob/main/taurus-contracts/contracts/TAU.sol#L54-L81
Tool used
Manual Review
Recommendation
To fix this bug, the code should subtract amount from currentMinted[account] instead of currentMinted[msg.sender].
Duplicate of #149
The text was updated successfully, but these errors were encountered: