15,000 USDC
View results
Submission Details
Severity: low
Valid

the balance of the DSC token is updated without events

Summary

the balance of the DSC token is updated without events

Vulnerability Details

after the user call mintDsc or burnDsc functions there is no event has been sent to the off-Chain components

function mintDsc(uint256 amountDscToMint) public moreThanZero(amountDscToMint) nonReentrant {
s_DSCMinted[msg.sender] += amountDscToMint;
// if they minted too much ($150 DSC, $100 ETH)
_revertIfHealthFactorIsBroken(msg.sender);
bool minted = i_dsc.mint(msg.sender, amountDscToMint);
if (!minted) {
revert DSCEngine__MintFailed();
}
}

and

function burnDsc(uint256 amount) public moreThanZero(amount) {
_burnDsc(amount, msg.sender, msg.sender);
_revertIfHealthFactorIsBroken(msg.sender); // I don't think this would ever hit...
}

Impact

the off-chain components of the protocol may mislead and not be updated

Tools Used

manual review

Recommendations

emit an event within the functions mintDsc and burnDsc

Support

FAQs

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