Raisebox Faucet

First Flight #50
Beginner FriendlySolidity
100 EXP
Submission Details
Impact: high
Likelihood: high
Invalid

Unownable contructor raise box faucet contest

Author Revealed upon completion

The contract fails to compile and deploy due to the invalid Ownable constructor argument, preventing ownership from being initialized and causing all onlyOwner functions (like minting, burning, and pausing) to become unusable.



Description

In the constructor of the RaiseBoxFaucet contract, the developer incorrectly attempts to pass msg.sender into the parent Ownable contract’s constructor:


Ownable(msg.sender)


However, according to OpenZeppelin’s standard Ownable implementation for Solidity ^0.8.0, the Ownable constructor does not take any parameters. It automatically assigns the deployer (msg.sender) as the contract’s initial owner during deployment.


Because of this, passing an argument (msg.sender) causes a constructor mismatch error, which leads to compilation failure and prevents the contract from being deployed.


This mistake also breaks the ownership initialization process, meaning onlyOwner functions will not be properly secured or executable until corrected.


In summary, this is a critical logic flaw in inheritance usage that blocks deployment and compromises access contro

l functionality.


// Root cause in the codebase with @> marks to highlight the relevant section

Risk

Likelihood :

The vulnerability will occur every time the contract is compiled or deployed, since the incorrect Ownable(msg.sender) call always causes a constructor mismatch and deployment failure.

Impact:

  • Access control function broken

  • Ownership misconfiguration

Proof of Concept

TypeError: Wrong arguments passed to base constructor. Expected 0 arguments but got 1.
--> RaiseBoxFaucet.sol:XX:XX:
|
| ERC20(name_, symbol_) Ownable(msg.sender)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Recommended Mitigation

- constructor(
string memory name_,
string memory symbol_,
uint256 faucetDrip_,
uint256 sepEthDrip_,
uint256 dailySepEthCap_
) ERC20(name_, symbol_) Ownable(msg.sender) { // ❌ Invalid constructor argument
faucetDrip = faucetDrip_;
sepEthAmountToDrip = sepEthDrip_;
dailySepEthCap = dailySepEthCap_;
_mint(address(this), INITIAL_SUPPLY);
}
+ constructor(
string memory name_,
string memory symbol_,
uint256 faucetDrip_,
uint256 sepEthDrip_,
uint256 dailySepEthCap_
) ERC20(name_, symbol_) Ownable() { // ✅ Correct parameterless constructor
faucetDrip = faucetDrip_;
sepEthAmountToDrip = sepEthDrip_;
dailySepEthCap = dailySepEthCap_;
_mint(address(this), INITIAL_SUPPLY);
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 2 days ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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