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.

  • Does the soft cap usually include funds raised during private and pre-sale rounds?
    – Aran Joyce
    Commented Mar 30, 2018 at 12:32

1 Answer 1


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.

  • 4
    Why 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
  • What is Cap standing for?
    – Tosho
    Commented Dec 20, 2017 at 20:49
  • 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.
    – Qqwy
    Commented Feb 9, 2018 at 7:58
  • martinfowler.com/bliki/TwoHardThings.html
    – barrymac
    Commented Aug 13, 2018 at 12:57

Not the answer you're looking for? Browse other questions tagged or ask your own question.