15,000 USDC
View results
Submission Details
Severity: gas

Consider Events

Summary

Consider having specific events for minting and burning for better transparency and tracking.

Informational

When new tokens are minted using the _mint function, a Transfer event is emitted with the _from address as the zero address, the _to address, as the address receiving the newly minted tokens, and _value as the number of tokens minted. Similarly with the _burn function.

The zero address is used in the Transfer event for minting and burning to indicate the creation or destruction of tokens as tokens aren't technically being transferred from or to another address.

Impact

The suggested events provide detailed information about the address involved and the amount of tokens minted or burned. They can help users track actions more effectively; More transparency allows users more risk calculation in comparing this protocol to different asset classes.

Recommendations

// Events declaration
28-29:
event Mint(address indexed to, uint256 amount);
event Burn(address indexed from, uint256 amount);
54: emit Burn(msg.sender, _amount);
65: emit Mint(_to, _amount);

Support

FAQs

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