BriVault

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

No checks for time variables, deployer can disturb the whole protocol functionality

No checks for time variables, deployer can disturb the whole protocol functionality

Description

  • lacks checks for

    uint256 public eventStartDate;
    uint256 public eventEndDate;

Likelihood:

  • low, assuming owner will initialized correctly, but there are chances

Impact:

  • Protocol might not working correctly


Recommended Mitigation

with this checks if the owner initialized incorrectly it will revert

+ error startCannotBeBiggerThanEndDate();
constructor(
IERC20 _asset,
uint256 _participationFeeBsp,
uint256 _eventStartDate,
address _participationFeeAddress,
uint256 _minimumAmount,
uint256 _eventEndDate
) ERC4626(_asset) ERC20("BriTechLabs", "BTT") Ownable(msg.sender) {
if (_participationFeeBsp > PARTICIPATIONFEEBSPMAX) {
revert limiteExceede();
}
+ if (_eventStartDate > _eventEndDate) {
+ revert startCannotBeBiggerThanEndDate();
}
participationFeeBsp = _participationFeeBsp;
eventStartDate = _eventStartDate;
eventEndDate = _eventEndDate;
participationFeeAddress = _participationFeeAddress;
minimumAmount = _minimumAmount;
_setWinner = false;
}
Updates

Appeal created

bube Lead Judge 19 days ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Missing Constructor Validation

This is owner action and the owner is assumed to be trusted and to provide correct input arguments.

Support

FAQs

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

Give us feedback!