This repository has been archived by the owner on Sep 17, 2023. It is now read-only.
HonorLt - Mint limit is not reduced when the Vault is burning TAU #149
Labels
Has Duplicates
A valid issue with 1+ other issues describing the same vulnerability
Medium
A valid Medium severity issue
Reward
A payout will be made for this issue
Sponsor Confirmed
The sponsor acknowledged this issue is valid
Will Fix
The sponsor confirmed this issue will be fixed
HonorLt
medium
Mint limit is not reduced when the Vault is burning TAU
Summary
Upon burning TAU, it incorrectly updates the
currentMinted
when Vault is acting on behalf of users.Vulnerability Detail
When the burn of
TAU
is performed, it calls_decreaseCurrentMinted
to reduce the limit of tokens minted by the Vault:The issue is that it subtracts
accountMinted
(which iscurrentMinted[account]
) fromcurrentMinted[msg.sender]
. When the vault is burning tokens on behalf of the user, theaccount
!=msg.sender
meaning thecurrentMinted[account]
is 0, and thus thecurrentMinted
of Vault will be reduced by 0 making it pretty useless.Another issue is that users can transfer their
TAU
between accounts, and thenamount > accountMinted
will not be triggered.Impact
currentMinted
is incorrectly decreased upon burning so vaults do not get more space to mint new tokens.Code Snippet
https://github.com/sherlock-audit/2023-03-taurus/blob/main/taurus-contracts/contracts/TAU.sol#L76-L83
Tool used
Manual Review
Recommendation
A simple solution would be to:
But I suggest revisiting and rethinking this function altogether.
The text was updated successfully, but these errors were encountered: