I was looking into the ERC20 Token Standards and Crowdsale. There are various sample contracts including the one from OpenZeppelin which exhibits locking the token transfers until the crowdsale is over.

Instead of a simple locking and unlocking mechanism, can we lock the tokens sold in pre-sale for a longer period than the tokens sold in the subsequent sales? How can we do that without changing the ERC20 standards?

  • OpenZeppelin has a TokenTimelock that allow storing tokens until an arbitrary release time for a single benefitiary, perhaps you can modify it to fit your needs.
    – Ismael
    Dec 26, 2017 at 4:53

2 Answers 2


Locking tokens once the crowdsale is over is a functionality that would have to go on the token contract. If you are using Open Zeppelin there's a Pausable contract you can use and make your token inherit from that in order to prevent tokens to be moved around.

But yes, that would require adding extra logic into your ERC20 token.

  • You are right. But my question was is there a way by which we can lock the token sold in a pre-sale for 3 months but lock the tokens sold later locked for just 1 month! Dec 24, 2017 at 22:05
  • Yes, but the logic by which the tokens can’t be transferred would have to go into the token contract by adding a check into the transfer methods according to some precondition you choose (like time) Dec 24, 2017 at 22:09

Presale specific lock ups can be done without need to modify EIP-20 tokens.

  1. Presale buyers deposit in the presale contract
  2. Presale contract buys from the main token sale, tokens are transferred on the presale contract
  3. Presale buyers need to claim their tokens by calling claim() function on the presale contract
  4. claim() is not available until the lock up period is over

Here is an example:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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