Detailed description of the impact of this finding.
Checks for Zero Balance: The burnTokensInContract function does not check if the balance is zero before attempting to burn, which would result in unnecessary gas usaAccessge if there are no tokens to burn.
Proof of Concept
Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.
Lines of code
https://github.com/code-423n4/2024-01-salty/blob/main/src/Salt.sol#L25
Vulnerability details
Impact
Detailed description of the impact of this finding. Checks for Zero Balance: The burnTokensInContract function does not check if the balance is zero before attempting to burn, which would result in unnecessary gas usaAccessge if there are no tokens to burn.
Proof of Concept
Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.
function burnTokensInContract() external { uint256 balance = balanceOf( address(this) ); @> _burn( address(this), balance );
Tools Used
Recommended Mitigation Steps
Add a require statement to check balance is greater than 0.
Assessed type
Context