Closed kingofclubstroyDev closed 1 year ago
~line 332: uint256 stage = _getCurrentStage(); uint256 darwinAmount; uint256 rate; uint256 stageAmount; uint256 stageCap; while (bnbAmount > 0) { (rate, stageAmount, stageCap) = _getStageDetails(stage); if (bnbAmount <= stageAmount) { darwinAmount += (bnbAmount * rate); bnbAmount = 0; break; } else { darwinAmount += (stageAmount * rate); bnbAmount -= stageAmount; } ++stage; } return darwinAmount; }
It seems like the stage amount is being compared with the deposited bnb amount, but i think it could be the stageCap - amountRaised, or something along those lines, as i think this doesn't include intermediate deposits within the stage
resolved in pull request
It seems like the stage amount is being compared with the deposited bnb amount, but i think it could be the stageCap - amountRaised, or something along those lines, as i think this doesn't include intermediate deposits within the stage