15,000 USDC
View results
Submission Details
Severity: gas

Functions guaranteed to when called by normal users can be marked Payable

Summary

[G-4] Functions guaranteed to when called by normal users can be marked Payable

The onlyOwner modifier makes a function revert if not called by the address registered as the owner

file: /src/DecentralizedStableCoin.sol
46 function burn(uint256 _amount) public override onlyOwner {

https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/blob/main/src/DecentralizedStableCoin.sol#L46

file: /src/DecentralizedStableCoin.sol
57 function mint(address _to, uint256 _amount) external onlyOwner returns (bool) {

https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/blob/main/src/DecentralizedStableCoin.sol#L57

Support

FAQs

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