Please someone provide me details about the hard cap and soft cap in ICO. I have to build an ICO with an hard cap. How do I implement it in a smart contract using solidity? Provide me concept behind the hard cap so I will implement the same in a smart contract.
1 Answer
A hard cap is defined as the maximum amount a crowdsale will receive. Most projects set a very high cap that is unlikely to happen. Only very famous projects like Status or Brave browser have reached its hard cap.
contract crowdsale {
uint public maximumEther;
uint public totalEther;
function () payable {
// Do not accept payment if recaudation is above maximumEther
if (totalEther + msg.value >= maximumEther) throw;
// Emit tokens
totalEther = totalEther + msg.value;
}
}
A soft cap is the amount received at which your crowdsale will be considered a success. It is the minimal amount required by your project.
If you do not reach that amount during the ICO then you will allow the investors to retire their apport.
-
4Why is the soft cap called a cap? It sounds like the hard cap is an actual cap, while the soft cap really is a minimum threshold, or reserve threshold. Commented Dec 5, 2017 at 14:25
-
-
1@Tosho From the dictionary cap: An upper limit; a ceiling: placed a cap on mortgage rates– Ismael ♦Commented Dec 20, 2017 at 20:55
-
@FrancescoBovoli Completely agree. Minimum Goal is a more accurate term, and one that was used before the soft/hard cap nomenclature took over.– QqwyCommented Feb 9, 2018 at 7:58
-