20,000 USDC
View results
Submission Details
Severity: gas

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

Summary

[G-07] 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/Beedle.sol
36 function mint(address to, uint256 amount) external onlyOwner {

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Beedle.sol#L36

file: /src/Lender.sol
84 function setLenderFee(uint256 _fee) external onlyOwner {

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol#L84

file: /src/Lender.sol
92 function setBorrowerFee(uint256 _fee) external onlyOwner {

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol#L92

file: /src/Lender.sol
100 function setFeeReceiver(address _feeReceiver) external onlyOwner {

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol#L100

file: /src/utils/Ownable.sol
19 function transferOwnership(address _owner) public virtual onlyOwner {

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/utils/Ownable.sol#L19

Support

FAQs

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