Source of Presale contract:https://github.com/laronlineworld/BYBPresale/blob/main/BYBPresale.sol
/**
* @dev Calculates the token amount per ETH contributed based on the time now.
* @return Rate of amount of GSTAR per Ether as of current time.
*/
function getRate() public view returns (uint256) {
//calculate bonus based on timing
if (block.timestamp <= startTime) { return ((rate / 100) * 120); } // 20 percent bonus on presale period, returns 12000
if (block.timestamp <= startTime.add(1 days)) {return ((rate / 100) * 108);} // 8 percent bonus on day one, return 10800
return rate;
}
I want to change the rate that instead of timestamp base to earn additional 20%, User need to buy worth of 5 BNB to get additional 20% of token worth bought of 5 BNB