code-423n4 / 2023-01-rabbithole-findings

1 stars 2 forks source link

Upgraded Q -> 2 from #648 [1675725462703] #699

Closed c4-judge closed 1 year ago

c4-judge commented 1 year ago

Judge has assessed an item in Issue #648 as 2 risk. The relevant finding follows:

  1. Missing require condition in function start Link : https://github.com/rabbitholegg/quest-protocol/blob/8c4c1f71221570b14a0479c216583342bd652d8d/contracts/Erc20Quest.sol#L58

Summary:

The function start doesn't have a require condition to check if the current time is greater than or equal to the start time of the quest.

Impact:

If a user calls start before the quest's start time, the quest may be started but the rewards will not be redeemable by the users.

Recommendation:

Add a require condition to check if the current time is greater than or equal to the start time of the quest.

Example:

function start() public override { require(now >= startTime, "Start time has not been reached yet."); if (IERC20(rewardToken).balanceOf(address(this)) < maxTotalRewards() + maxProtocolReward()) revert TotalAmountExceedsBalance(); super.start(); }

c4-judge commented 1 year ago

kirk-baird marked the issue as duplicate of #84

c4-judge commented 1 year ago

kirk-baird marked the issue as not a duplicate

c4-judge commented 1 year ago

kirk-baird marked the issue as nullified

kirk-baird commented 1 year ago

Nullify to downgrade back to QA

c4-judge commented 1 year ago

This auto-generated issue was withdrawn by kirk-baird