20,000 USDC
View results
Submission Details
Severity: gas

Setting the constructor to `Payable`

Summary

Setting the constructor to Payable

Vulnerability Details

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

File: src/utils/Ownable.sol
constructor(address _owner) {
owner = _owner;
emit OwnershipTransferred(address(0), _owner);
}

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

File: src/Beedle.sol
constructor() ERC20("Beedle", "BDL") ERC20Permit("Beedle") Ownable(msg.sender) {
_mint(msg.sender, 1_000_000_000 * 1e18);
}

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

File: src/Fees.sol
constructor(address _weth, address _staking) {
WETH = _weth;
staking = _staking;
}

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

File: src/Lender.sol
constructor() Ownable(msg.sender) {
feeReceiver = msg.sender;
}

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Staking.sol#L31-L34

File: src/Staking.sol
constructor(address _token, address _weth) Ownable(msg.sender) {
TKN = IERC20(_token);
WETH = IERC20(_weth);
}

Support

FAQs

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