BriVault

First Flight #52
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Impact: medium
Likelihood: high
Invalid

No Initial Token Mint During Deployment

Root + Impact

Description

  • Normal behavior:
    ERC20 tokens typically mint an initial supply during contract deployment to bootstrap liquidity, distribute to early contributors, or prepare for vault or staking operations.

Issue:
The BriTechToken contract constructor does not mint any tokens on deployment. The owner must later call mint() manually to create the initial supply, leaving the contract in an empty state after deployment.
This breaks expectations for automated integrations or token-based systems (like vaults or DEX pairs) that assume a non-zero supply at launch.

// Root cause in the codebase with @> marks to highlight the relevant section
@> constructor() ERC20("BriTechLabs", "BTT") Ownable(msg.sender) {}
// No initial supply minted here — vaults and external integrations will fail until mint() is called.

Risk

Likelihood:

  • This issue occurs every time the contract is deployed since the initial mint is omitted from the constructor.

It will cause operational failures in integrations that rely on token balance existence at deployment (e.g., ERC4626 vault initialization).

Impact:

  • External protocols integrating this token (vaults, liquidity pools, or DEXes) may fail due to zero supply or revert when reading balances.

If the owner delays minting or forgets to mint, the entire ecosystem relying on this token halts temporarily.

Proof of Concept

Explanation:
Right after deployment, the token’s totalSupply() equals zero, causing dependent systems to fail initialization.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
contract DeploymentTest {
function testEmptySupply(address token) external view returns (uint256) {
return ERC20(token).totalSupply(); // returns 0 immediately after deployment
}
}

Recommended Mitigation

Mint the initial supply in the constructor to align with ERC20 launch expectations.

Explanation:
Automatically minting an initial supply ensures smooth integration with vaults, exchanges, and other contracts that require non-zero liquidity at launch.

- remove this code
+ add this code
- constructor() ERC20("BriTechLabs", "BTT") Ownable(msg.sender) {}
+ constructor() ERC20("BriTechLabs", "BTT") Ownable(msg.sender) {
+ _mint(msg.sender, 10_000_000 * 1e18);
+ }
Updates

Appeal created

bube Lead Judge 19 days ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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

Give us feedback!